设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1277|回复: 3
打印 上一主题 下一主题

[已经解决] 关于VA视频播放的问题

[复制链接]

Lv2.观梦者

梦石
0
星屑
908
在线时间
212 小时
注册时间
2006-10-8
帖子
293
跳转到指定楼层
1
发表于 2013-9-1 10:55:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
自己做的游戏,自己做了视频,有30秒左右

转换好了,可以播放

但是问题来了,如果每次运行游戏都得等30秒似乎不是那么人性化

怎么样做才能实现“任意键跳过视频”呢?

求教各位老大啊,搜索主站发现有一脚本可以直接地图播放动画并支持跳过,但是却发现下载不了,郁闷啊


(这里)
EST - SOV Video Player ++ Script Conversion 1.4
http://www.rpgmakervxace.net/topic/7177-est-sov-video-player-script-conversion-v-12-20120927/


求各位解决难题。

Lv2.观梦者

梦石
0
星屑
362
在线时间
1292 小时
注册时间
2013-1-12
帖子
3590

贵宾

2
发表于 2013-9-1 11:54:13 | 只看该作者
RUBY 代码复制
  1. #==============================================================================
  2. #
  3. # [ACE]EST_SOV_Video_Player ++ Conversion
  4. #
  5. # v1.4
  6. #==============================================================================
  7. # Author : Estriole
  8. # (Conversion to ace and improving)
  9. # VX version author: SuperOverlord
  10. #
  11. # also credit Crystal Noel for solution for title that have encoding problem character
  12. # also credit ruin for fixes he made to this script.
  13. #
  14. # History :
  15. # version 1.4 2013.05.16 - apply fixes from ruin. typo error and ability to use
  16. #                          play video using battle event page.
  17. # version 1.3 2013.03.05 - create configuration for people that have encoding character
  18. #                          problem with their title. ex: Pokémon Ace.
  19. #                          set the IGNORE_TITLE to true inside module Sov::Video
  20. # version 1.2 2012.09.27 - made if game at fullscreen automaticly become windowed
  21. # version 1.1 2012.09.25 - some bug fix. now avi video can played at full screen mode(alt enter) with some position error.
  22. #                        - can play other format such as mkv but it will play full screen and when played at full screen
  23. #                          mode (alt enter) the size will be smaller and the game switched.
  24. #                        - basicly this script not support full screen game yet. will try to fix this in next version
  25. # version 1.0 2012.09.23 - finish converting + some change
  26. #
  27. #
  28. #==============================================================================
  29. # Features:
  30. #------------------------------------------------------------------------------
  31. # o Play video's on the map or in battle using a simple script event command.
  32. #
  33. # o Optionally pause or exit video's while they play.
  34. #
  35. # o View the video in the game window or in fullscreen.
  36. #
  37. # o Setup video skills, which show the video before damage effects.
  38. #
  39. # o ACE version also made not only video skill but can use video item too
  40. #
  41. # o ACE version also can play video before title scene
  42. #
  43. #==============================================================================
  44. # Instructions:
  45. #------------------------------------------------------------------------------
  46. # o Place all videos in a folder with the same name as in configuration.
  47. #   This folder is created automatically the first time the game is played if
  48. #   it doesn't already exist.
  49. #
  50. # o Playing Videos when on the map.
  51. #
  52. #   - See script calls below.
  53. #
  54. # o Playing videos in battle.
  55. #
  56. #   - As when on the map the script event command can be used in battle also.
  57. #
  58. #   - As well as this you can setup skills as video skills which display
  59. #     a video before damaging the enemy.
  60. #
  61. #     <now below setup can be also used for item video too>
  62. #     To do this the following tags can be used in the skills notebox:
  63. #     1) <video_name = "filename">
  64. #        ~ name is the name of the video file. If the filename extension is
  65. #          missing the first file matching that name is used.
  66. #          (Quotes are necessary around the filename)
  67. #
  68. #      As well as the first tag 2 others are available. These tags will only
  69. #      take effect if placed on a line below the first tag.
  70. #      If these don't exist they are assumed true.
  71. #
  72. #      2) <video_exitable = n>   ~ Can the video be exited by the exit input?
  73. #      3) <video_pausable = n>   ~ Can the video be paused?
  74. #         ~ n is replaced with either t or f (t : true, f : false)
  75. #
  76. #      For other Video properties (x,y,width,height,fullscreen) the default
  77. #      settings are used. (See script calls below)
  78. #
  79. # o Playing videos before title screen
  80. # ctrl + f this : CONFIGURATION FOR VIDEO BEFORE TITLE
  81. # and change the
  82. # @video_title = nil
  83. # to
  84. # @video_title = "yourvideonamewithoutextensionhere"
  85. #
  86. #==============================================================================
  87. # Script Calls:
  88. #------------------------------------------------------------------------------
  89. # Commands (From the script call command on page three of event commands)
  90. #------------------------------------------------------------------------------
  91. # o To change default values for video properties.
  92. #
  93. #  1) Video.default_x = n
  94. #  2) Video.default_y = n
  95. #  3) Video.default_width  = n
  96. #  4) Video.default_height = n
  97. #  5) Video.fullscreen = bool #disabled now since could make error
  98. #  
  99. #  In all 5 commands above:
  100. #  ~ n is an integer value
  101. #  ~ bool is either true or false
  102. #
  103. # o To play videos
  104. #
  105. #   play_video(filename,exitable,pausable)
  106. #   ~ filename : name of video file             (Must be in quotes)
  107. #   ~ exitable : Can the video be exited?       (When left out = true)
  108. #   ~ pausable : Can the video be paused?       (When left out = true)
  109. #  
  110. #   For all other values the default's are used.
  111. #==============================================================================
  112. # Compatibility:
  113. #------------------------------------------------------------------------------
  114. # o Skill videos will depend on the battle system but sould work.
  115. #==============================================================================
  116. # Credit:
  117. #------------------------------------------------------------------------------
  118. # o Credit goes to Trebor and Berka whose scripts helped be figure out the
  119. #   mci_send_stringA function.
  120. #==============================================================================
  121.  
  122. module SOV
  123.   module Video
  124.   #--------------------------------------------------------------------------
  125.   # Configuration
  126.   #--------------------------------------------------------------------------
  127.     # Name of folder for videos to be held in.
  128.     DIR_NAME = "Videos"
  129.     # Exit video input
  130.     EXIT_INPUT  = Input::B
  131.     # Pause video input
  132.     PAUSE_INPUT = Input::C
  133.  
  134.     IGNORE_TITLE = true
  135.     #set to true if your title contain strange character such as é or other.   
  136.   #--------------------------------------------------------------------------
  137.   # End Configuration
  138.   #--------------------------------------------------------------------------
  139.   end
  140. end
  141.  
  142. module SceneManager
  143. ################ CONFIGURATION FOR VIDEO BEFORE TITLE #######################  
  144.   @video_title = nil  # "example" # FILENAME OF THE VIDEO IN VIDEO FOLDER IN QUOTES
  145.   #IF YOU DON'T WANT TO USE THIS FEATURE JUST CHANGE TO NIL
  146. ################ END CONFIGURATION ##########################################  
  147.   def self.run
  148.     DataManager.init
  149.     Audio.setup_midi if use_midi?
  150.     if @video_title != nil
  151.     video = Cache.video(@video_title)
  152.     video.exitable = true # True/False
  153.     video.pausable = true # True/False
  154.     Video.play(video)
  155.     end
  156.     [url=home.php?mod=space&uid=420706]@Scene[/url] = first_scene_class.new
  157.     @scene.main while @scene
  158.   end
  159. end
  160.  
  161. class << Graphics
  162.   def Graphics.fullscreen? # Property
  163.     screen_size = Win32API.new('user32', 'GetSystemMetrics', 'I', 'I')
  164.     screen_width = screen_size.call(0);   screen_height = screen_size.call(1)   
  165.     detect_fullscreen = false
  166.     detect_fullscreen = true if screen_width == 640 and screen_height == 480
  167.     return detect_fullscreen
  168.   end
  169.   def Graphics.toggle_fullscreen # Main function
  170.     keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
  171.     keybd.call(0xA4, 0, 0, 0)
  172.     keybd.call(13, 0, 0, 0)
  173.     keybd.call(13, 0, 2, 0)
  174.     keybd.call(0xA4, 0, 2, 0)   
  175.   end
  176. end
  177.  
  178. #==============================================================================
  179. # Import
  180. #------------------------------------------------------------------------------
  181. $imported = {} if $imported == nil
  182. $imported['Videos'] = true
  183. #==============================================================================
  184.  
  185. #==============================================================================
  186. # ** SOV::Video::Commands
  187. #==============================================================================
  188.  
  189. module SOV::Video::Commands
  190.   #--------------------------------------------------------------------------
  191.   # * Play a video
  192.   #  filename : video's filename (with or without extension)
  193.   #  exitable : Can the video be exited
  194.   #  pausable : Can the video be paused
  195.   #--------------------------------------------------------------------------
  196.   def play_video(filename,exitable=true,pausable=true)
  197.     video = Cache.video(filename)
  198.     video.exitable = exitable
  199.     video.pausable = pausable
  200.     $game_map.video = video
  201.   end
  202.   #---------------------------------------------------------------------------
  203.   # Define as module function
  204.   #---------------------------------------------------------------------------
  205.   module_function :play_video
  206. end
  207.  
  208. #==============================================================================
  209. # ** SOV::Video::Regexp
  210. #==============================================================================
  211.  
  212. module SOV::Video::Regexp
  213.   #--------------------------------------------------------------------------
  214.   # * Skill
  215.   #--------------------------------------------------------------------------
  216.   module Skill
  217.     FILENAME   = /<video[_ ]?(?:file)?name = "(.+)">/i
  218.     PAUSABLE   = /<video[_ ]?paus(?:e|able) = (t|f)>/i
  219.     EXITABLE   = /<video[_ ]?exit(?:able)? = (t|f)>/i
  220.   end
  221. end
  222.  
  223. #==============================================================================
  224. # ** SOV::Game
  225. #==============================================================================
  226.  
  227. module SOV::Game
  228.   #--------------------------------------------------------------------------
  229.   # Constants
  230.   #--------------------------------------------------------------------------
  231.   INI = 'Game'
  232.   #--------------------------------------------------------------------------
  233.   # * Get the game windows handle
  234.   #--------------------------------------------------------------------------
  235.   def self.hwnd
  236.     unless defined?(@@hwnd)
  237.       find_window = Win32API.new('user32','FindWindow','pp','i')
  238. #      @@hwnd = find_window.call('RGSS Player',title)  
  239.       gamefullscreen = Graphics.fullscreen?
  240.       @@hwnd = find_window.call('RGSS Player',title)  
  241.     end
  242.     return @@hwnd
  243.   end
  244.   #--------------------------------------------------------------------------
  245.   # * Get game title
  246.   #--------------------------------------------------------------------------
  247.   def self.title
  248.     unless defined?(@@title)
  249.       @@title = read_ini('title')
  250.     end
  251.     return @@title
  252.   end
  253.   #--------------------------------------------------------------------------
  254.   # * Read ini (Returns nil or match)
  255.   #--------------------------------------------------------------------------
  256.   def self.read_ini(variable,filename=INI)
  257.     return nil if variable == 'title' && SOV::Video::IGNORE_TITLE
  258.     reg = /^#{variable}=(.*)$/
  259.     File.foreach(filename+'.ini') { |line| break($1) if line =~ reg }
  260.   end
  261. end
  262.  
  263. #==============================================================================
  264. # ** Cache
  265. #==============================================================================
  266.  
  267. module Cache
  268.   #--------------------------------------------------------------------------
  269.   # Class Variables
  270.   #--------------------------------------------------------------------------
  271.   @@vcache = {}
  272.   #--------------------------------------------------------------------------
  273.   # Define as class methods
  274.   #--------------------------------------------------------------------------
  275.   class << self
  276.     #------------------------------------------------------------------------
  277.     # Alias List
  278.     #------------------------------------------------------------------------
  279.     alias sov_video_clear clear unless $@
  280.     #------------------------------------------------------------------------
  281.     # * Get a video object
  282.     #  filename : basename of file
  283.     #------------------------------------------------------------------------
  284.     def video(filename)
  285.       # Get full filename if extension is missing
  286.       if File.extname(filename) == ''
  287.         files = Dir["#{SOV::Video::DIR_NAME}/#{filename}.*"]
  288.         filename = File.basename(files[0]) # Set as first matching file
  289.       end
  290.       # Create or get the video object.
  291.       if @@vcache.has_key?(filename)
  292.         @@vcache[filename]
  293.       else
  294.         @@vcache[filename] = Video.new(filename)
  295.       end
  296.     end
  297.     #------------------------------------------------------------------------
  298.     # * Clear
  299.     #------------------------------------------------------------------------
  300.     def clear
  301.       @@vcache.clear
  302.       sov_video_clear
  303.     end
  304.   end
  305. end
  306.  
  307. #==============================================================================
  308. # ** RPG::Skill
  309. #==============================================================================
  310.  
  311. class RPG::UsableItem
  312.   #--------------------------------------------------------------------------
  313.   # * Determine if skill has a video skill
  314.   #--------------------------------------------------------------------------
  315.   def video
  316.     if @video == nil
  317.       @note.each_line { |line|
  318.         if @video == nil
  319.           @video = Cache.video($1) if line =~ SOV::Video::Regexp::Skill::FILENAME
  320.         else
  321.           @video.pausable = ($1 == 't') if line =~ SOV::Video::Regexp::Skill::PAUSABLE
  322.           @video.exitable = ($1 == 't') if line =~ SOV::Video::Regexp::Skill::EXITABLE
  323.         end
  324.       }
  325.       @video = :invalid if @video == nil
  326.     end
  327.     return @video
  328.   end
  329. end
  330.  
  331. #==============================================================================
  332. # ** Video
  333. #------------------------------------------------------------------------------
  334. #  Class handling playing videos.
  335. #==============================================================================
  336.  
  337. class Video
  338.   #--------------------------------------------------------------------------
  339.   # Constants
  340.   #--------------------------------------------------------------------------
  341.   TYPE_AVI  = 'avivideo'
  342.   TYPE_MPEG = 'mpegvideo'
  343.   #--------------------------------------------------------------------------
  344.   # Class Variables
  345.   #--------------------------------------------------------------------------
  346.   @@default_x = 0
  347.   @@default_y = 0
  348.   @@default_width  = Graphics.width
  349.   @@default_height = Graphics.height
  350.   @@fullscreen = false
  351.   #--------------------------------------------------------------------------
  352.   # * Get and Set default_x/y/width/height
  353.   #--------------------------------------------------------------------------
  354.   for d in %w(x y width height)
  355.     # Define setter method
  356.     module_eval(%Q(def self.default_#{d}=(i); @@default_#{d} = i; end))
  357.     # Define getter method
  358.     module_eval(%Q(def self.default_#{d}; @@default_#{d}; end))
  359.   end
  360.   #--------------------------------------------------------------------------
  361.   # * Get fullscreen
  362.   #--------------------------------------------------------------------------
  363.   def self.fullscreen
  364.     @@fullscreen
  365.   end  
  366.   #--------------------------------------------------------------------------
  367.   # * Set fullscreen
  368.   #--------------------------------------------------------------------------
  369.   def self.fullscreen=(val)
  370.     @@fullscreen = val
  371.   end
  372.   #--------------------------------------------------------------------------
  373.   # * Win32API
  374.   #--------------------------------------------------------------------------
  375.   @@mciSendStringA = Win32API.new('winmm','mciSendStringA','pplp','i')
  376.   #--------------------------------------------------------------------------
  377.   # * Video Command
  378.   #  command_string : string following mci_command_string format
  379.   #  buffer : string to retrieve return data
  380.   #  buffer_size : number of characters in buffer
  381.   #  callback_handle : handle of window to callback to. Used if notify is used
  382.   #                    in the command string. (Not supported by game window)
  383.   #--------------------------------------------------------------------------
  384.   def self.send_command(cmnd_string,buffer='',buffer_size=0,callback_handle=0)
  385.     # Returns error code. No error if NULL
  386.     err = @@mciSendStringA.call(cmnd_string,buffer,buffer_size,callback_handle)
  387.     if err != 0
  388.       buffer = ' ' * 255
  389.       Win32API.new('winmm','mciGetErrorString','LPL','V').call(err,buffer,255)
  390.       raise(buffer.squeeze(' ').chomp('\000'))
  391.     end
  392.   end
  393.  
  394.   #--------------------------------------------------------------------------
  395.   # * Play a video
  396.   #--------------------------------------------------------------------------
  397.   def self.play(video)
  398.     # Make path and buffer
  399.     path = "#{SOV::Video::DIR_NAME}/#{video.filename}"
  400.     buffer = ' ' * 255
  401.     # Initialize device and dock window with game window as parent.
  402.     type = " type #{video.type}" if video.type != ''
  403.     send_command("open #{path}#{type} alias VIDEO style child parent #{SOV::Game.hwnd}")
  404.     # Display video in client rect at x,y with width and height.
  405.     x = video.x
  406.     y = video.y
  407.     width  = video.width
  408.     height = video.height
  409.     send_command("put VIDEO window at #{x} #{y} #{width} #{height}")
  410.     # Begin playing video
  411.     screen = @@fullscreen ? 'fullscreen' : 'window'
  412.     gamefullscreen = Graphics.fullscreen?
  413.     case video.type
  414.     when "avivideo"
  415.       if gamefullscreen == true
  416.       #send_command("put VIDEO window at #{x} #{y} 640 480")
  417.       Graphics.toggle_fullscreen
  418.       send_command("play VIDEO window")
  419.       else
  420.       send_command("play VIDEO window")
  421.       end
  422.     when "mpegvideo"
  423.         if gamefullscreen == true
  424.         Graphics.toggle_fullscreen
  425.         send_command("play VIDEO window")
  426.         else
  427.         send_command("play VIDEO fullscreen")
  428.         end
  429.     else
  430.     end
  431.     flag = 0
  432.     # Start Input and status processing loop
  433.     while buffer !~ /^stopped/
  434.       # Idle processing for a frame
  435.       sleep(1.0/Graphics.frame_rate)
  436.       # Get mode string
  437.       send_command('status VIDEO mode',buffer,255)
  438.       Input.update   
  439.       if Input.trigger?(SOV::Video::PAUSE_INPUT) and video.pausable?
  440.         Sound.play_cursor
  441.         if buffer =~ /^paused/                 # If already paused
  442.           send_command("resume VIDEO")         # Resume video
  443.         else                                   # Otherwise
  444.           send_command("pause VIDEO")          # Pause video
  445.         end
  446.       elsif Input.trigger?(SOV::Video::EXIT_INPUT) and video.exitable?
  447.         Sound.play_cancel
  448.         # Terminate loop on exit input
  449.         break
  450.       end
  451.     end
  452.     # Terminate the device
  453.     send_command('close VIDEO')
  454.   end
  455.   #--------------------------------------------------------------------------
  456.   # Public Instance Variables
  457.   #--------------------------------------------------------------------------
  458.   attr_accessor :x
  459.   attr_accessor :y
  460.   attr_accessor :width
  461.   attr_accessor :height
  462.   attr_writer :exitable
  463.   attr_writer :pausable
  464.   attr_reader :filename
  465.   #--------------------------------------------------------------------------
  466.   # * Initialize
  467.   #--------------------------------------------------------------------------
  468.   def initialize(filename)
  469.     unless FileTest.file?("#{SOV::Video::DIR_NAME}/#{filename}")
  470.       raise(Errno::ENOENT,filename)
  471.     end
  472.     @filename = filename
  473.     @x = @@default_x
  474.     @y = @@default_y
  475.     @width  = @@default_width
  476.     [url=home.php?mod=space&uid=291977]@height[/url] = @@default_height
  477.     @exitable = true
  478.     @pausable = true
  479.   end
  480.   #--------------------------------------------------------------------------
  481.   # * Get Type
  482.   #--------------------------------------------------------------------------
  483.   def type
  484.     if @type == nil
  485.       case File.extname(@filename)
  486.       when '.avi'; @type = TYPE_AVI
  487.       when '.mpeg'||'.mpg'; @type = TYPE_MPEG
  488.       else
  489.         @type = TYPE_MPEG#''
  490.       end
  491.     end
  492.     @type
  493.   end
  494.   #--------------------------------------------------------------------------
  495.   # * Is the video exitable?
  496.   #--------------------------------------------------------------------------
  497.   def exitable?
  498.     @exitable
  499.   end
  500.   #--------------------------------------------------------------------------
  501.   # * Is the video pausable?
  502.   #--------------------------------------------------------------------------
  503.   def pausable?
  504.     @pausable
  505.   end
  506.   #--------------------------------------------------------------------------
  507.   # Access
  508.   #--------------------------------------------------------------------------
  509.   private_class_method :send_command  
  510. end
  511.  
  512. #==============================================================================
  513. # ** Game_Interpreter
  514. #==============================================================================
  515.  
  516. class Game_Interpreter
  517.   #--------------------------------------------------------------------------
  518.   # Import
  519.   #--------------------------------------------------------------------------
  520.   include(SOV::Video::Commands)
  521. end
  522.  
  523. #==============================================================================
  524. # ** Game_Map
  525. #==============================================================================
  526.  
  527. class Game_Map
  528.   #--------------------------------------------------------------------------
  529.   # Public Instance Variables
  530.   #--------------------------------------------------------------------------
  531.   attr_accessor :video  
  532. end
  533.  
  534. #==============================================================================
  535. # ** Scene_Map
  536. #==============================================================================
  537.  
  538. class Scene_Map
  539.   #--------------------------------------------------------------------------
  540.   # Alias List
  541.   #--------------------------------------------------------------------------
  542.   alias sov_video_update update unless $@
  543.   #--------------------------------------------------------------------------
  544.   # * Play Video
  545.   #--------------------------------------------------------------------------
  546.   def play_video(video)
  547.     # Memorize and stop current bgm and bgs
  548.     bgm = RPG::BGM.last
  549.     bgs = RPG::BGS.last
  550.     RPG::BGM.stop
  551.     RPG::BGS.stop
  552.     # Play video
  553.     Video.play(video)
  554.     # Restart bgm and bgs
  555.     bgm.play
  556.     bgs.play
  557.   end
  558.   #--------------------------------------------------------------------------
  559.   # * Update
  560.   #--------------------------------------------------------------------------
  561.   def update
  562.     if $game_map.video != nil
  563.       play_video($game_map.video)
  564.       $game_map.video = nil
  565.       Input.update
  566.     else
  567.       sov_video_update
  568.     end
  569.   end
  570. end
  571.  
  572. #==============================================================================
  573. # ** Scene_Battle
  574. #==============================================================================
  575.  
  576. class Scene_Battle
  577.   #--------------------------------------------------------------------------
  578.   # * Alias list
  579.   #--------------------------------------------------------------------------
  580.   alias sov_video_update_battle update unless $@
  581.   alias sov_video_use_item use_item unless $@
  582.   #--------------------------------------------------------------------------
  583.   # * Play Video
  584.   #--------------------------------------------------------------------------
  585.   def play_video(video)
  586.     # Memorize and stop current bgm
  587.     bgm = RPG::BGM.last
  588.     RPG::BGM.stop
  589.     # Play video
  590.     Video.play(video)
  591.     # Restart bgm
  592.     bgm.play
  593.   end
  594.   #--------------------------------------------------------------------------
  595.   # * Execute Action Skill
  596.   #--------------------------------------------------------------------------
  597.   def use_item
  598.     skill = @subject.current_action.item   
  599.     if skill.video.is_a?(Video)
  600.       execute_action_video(skill)
  601.       sov_video_use_item
  602.     else
  603.       sov_video_use_item
  604.     end
  605.   end
  606.   #--------------------------------------------------------------------------
  607.   # * Execute Action Video
  608.   #--------------------------------------------------------------------------
  609.   def execute_action_video(skill)
  610.     br = Graphics.brightness
  611.     120.times { |i| Graphics.brightness = 255 - 255/60 * i; Graphics.update }
  612.     # Play video
  613.     play_video(skill.video)
  614.     # Reset brightness
  615.     Graphics.brightness = br
  616.   end
  617.   #ADDED UPDATE FUNCTION FROM SCENE_MAP TO SCENE_BATTLE
  618.   def update
  619.     if $game_map.video != nil
  620.       play_video($game_map.video)
  621.       $game_map.video = nil
  622.       Input.update
  623.     else
  624.       sov_video_update_battle
  625.     end
  626.   end
  627.  
  628. end
  629.  
  630.  
  631.  
  632.  
  633.  
  634. #==============================================================================
  635. # Pre-Main Processing
  636. #==============================================================================
  637.  
  638. unless FileTest.directory?(SOV::Video::DIR_NAME) # If directory doesn't exist.
  639.   Dir.mkdir(SOV::Video::DIR_NAME)                # Make the directory
  640. end
  641.  
  642. =begin
  643. =end


幫你拿出來了...  我人在加拿大所以可以進去

评分

参与人数 1星屑 +20 收起 理由
Jousun + 20 大恩不言谢

查看全部评分


回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
22963
在线时间
8639 小时
注册时间
2011-12-31
帖子
3367
3
发表于 2013-9-1 12:07:12 | 只看该作者
  1.        

  2.     #==============================================================================
  3.     #
  4.     # [ACE]EST_SOV_Video_Player ++ Conversion
  5.     #
  6.     # v1.4
  7.     #==============================================================================
  8.     # Author : Estriole
  9.     # (Conversion to ace and improving)
  10.     # VX version author: SuperOverlord
  11.     #
  12.     # also credit Crystal Noel for solution for title that have encoding problem character
  13.     # also credit ruin for fixes he made to this script.
  14.     #
  15.     # History :
  16.     # version 1.4 2013.05.16 - apply fixes from ruin. typo error and ability to use
  17.     #                          play video using battle event page.
  18.     # version 1.3 2013.03.05 - create configuration for people that have encoding character
  19.     #                          problem with their title. ex: Pokémon Ace.
  20.     #                          set the IGNORE_TITLE to true inside module Sov::Video
  21.     # version 1.2 2012.09.27 - made if game at fullscreen automaticly become windowed
  22.     # version 1.1 2012.09.25 - some bug fix. now avi video can played at full screen mode(alt enter) with some position error.
  23.     #                        - can play other format such as mkv but it will play full screen and when played at full screen
  24.     #                          mode (alt enter) the size will be smaller and the game switched.
  25.     #                        - basicly this script not support full screen game yet. will try to fix this in next version
  26.     # version 1.0 2012.09.23 - finish converting + some change
  27.     #
  28.     #
  29.     #==============================================================================
  30.     # Features:
  31.     #------------------------------------------------------------------------------
  32.     # o Play video's on the map or in battle using a simple script event command.
  33.     #
  34.     # o Optionally pause or exit video's while they play.
  35.     #
  36.     # o View the video in the game window or in fullscreen.
  37.     #
  38.     # o Setup video skills, which show the video before damage effects.
  39.     #
  40.     # o ACE version also made not only video skill but can use video item too
  41.     #
  42.     # o ACE version also can play video before title scene
  43.     #
  44.     #==============================================================================
  45.     # Instructions:
  46.     #------------------------------------------------------------------------------
  47.     # o Place all videos in a folder with the same name as in configuration.
  48.     #   This folder is created automatically the first time the game is played if
  49.     #   it doesn't already exist.
  50.     #
  51.     # o Playing Videos when on the map.
  52.     #
  53.     #   - See script calls below.
  54.     #
  55.     # o Playing videos in battle.
  56.     #
  57.     #   - As when on the map the script event command can be used in battle also.
  58.     #
  59.     #   - As well as this you can setup skills as video skills which display
  60.     #     a video before damaging the enemy.
  61.     #
  62.     #     <now below setup can be also used for item video too>
  63.     #     To do this the following tags can be used in the skills notebox:
  64.     #     1) <video_name = "filename">
  65.     #        ~ name is the name of the video file. If the filename extension is
  66.     #          missing the first file matching that name is used.
  67.     #          (Quotes are necessary around the filename)
  68.     #
  69.     #      As well as the first tag 2 others are available. These tags will only
  70.     #      take effect if placed on a line below the first tag.
  71.     #      If these don't exist they are assumed true.
  72.     #
  73.     #      2) <video_exitable = n>   ~ Can the video be exited by the exit input?
  74.     #      3) <video_pausable = n>   ~ Can the video be paused?
  75.     #         ~ n is replaced with either t or f (t : true, f : false)
  76.     #
  77.     #      For other Video properties (x,y,width,height,fullscreen) the default
  78.     #      settings are used. (See script calls below)
  79.     #
  80.     # o Playing videos before title screen
  81.     # ctrl + f this : CONFIGURATION FOR VIDEO BEFORE TITLE
  82.     # and change the
  83.     # @video_title = nil
  84.     # to
  85.     # @video_title = "yourvideonamewithoutextensionhere"
  86.     #
  87.     #==============================================================================
  88.     # Script Calls:
  89.     #------------------------------------------------------------------------------
  90.     # Commands (From the script call command on page three of event commands)
  91.     #------------------------------------------------------------------------------
  92.     # o To change default values for video properties.
  93.     #
  94.     #  1) Video.default_x = n
  95.     #  2) Video.default_y = n
  96.     #  3) Video.default_width  = n
  97.     #  4) Video.default_height = n
  98.     #  5) Video.fullscreen = bool #disabled now since could make error
  99.     #  
  100.     #  In all 5 commands above:
  101.     #  ~ n is an integer value
  102.     #  ~ bool is either true or false
  103.     #
  104.     # o To play videos
  105.     #
  106.     #   play_video(filename,exitable,pausable)
  107.     #   ~ filename : name of video file             (Must be in quotes)
  108.     #   ~ exitable : Can the video be exited?       (When left out = true)
  109.     #   ~ pausable : Can the video be paused?       (When left out = true)
  110.     #  
  111.     #   For all other values the default's are used.
  112.     #==============================================================================
  113.     # Compatibility:
  114.     #------------------------------------------------------------------------------
  115.     # o Skill videos will depend on the battle system but sould work.
  116.     #==============================================================================
  117.     # Credit:
  118.     #------------------------------------------------------------------------------
  119.     # o Credit goes to Trebor and Berka whose scripts helped be figure out the
  120.     #   mci_send_stringA function.
  121.     #==============================================================================
  122.      
  123.     module SOV
  124.       module Video
  125.       #--------------------------------------------------------------------------
  126.       # Configuration
  127.       #--------------------------------------------------------------------------
  128.         # Name of folder for videos to be held in.
  129.         DIR_NAME = "Videos"
  130.         # Exit video input
  131.         EXIT_INPUT  = Input::B
  132.         # Pause video input
  133.         PAUSE_INPUT = Input::C
  134.       
  135.         IGNORE_TITLE = true
  136.         #set to true if your title contain strange character such as é or other.   
  137.       #--------------------------------------------------------------------------
  138.       # End Configuration
  139.       #--------------------------------------------------------------------------
  140.       end
  141.     end
  142.      
  143.     module SceneManager
  144.     ################ CONFIGURATION FOR VIDEO BEFORE TITLE #######################  
  145.       @video_title = nil  # "example" # FILENAME OF THE VIDEO IN VIDEO FOLDER IN QUOTES
  146.       #IF YOU DON'T WANT TO USE THIS FEATURE JUST CHANGE TO NIL
  147.     ################ END CONFIGURATION ##########################################  
  148.       def self.run
  149.         DataManager.init
  150.         Audio.setup_midi if use_midi?
  151.         if @video_title != nil
  152.         video = Cache.video(@video_title)
  153.         video.exitable = true # True/False
  154.         video.pausable = true # True/False
  155.         Video.play(video)
  156.         end
  157.         [url=home.php?mod=space&uid=420706]@Scene[/url] = first_scene_class.new
  158.         @scene.main while @scene
  159.       end
  160.     end
  161.      
  162.     class << Graphics
  163.       def Graphics.fullscreen? # Property
  164.         screen_size = Win32API.new('user32', 'GetSystemMetrics', 'I', 'I')
  165.         screen_width = screen_size.call(0);   screen_height = screen_size.call(1)   
  166.         detect_fullscreen = false
  167.         detect_fullscreen = true if screen_width == 640 and screen_height == 480
  168.         return detect_fullscreen
  169.       end
  170.       def Graphics.toggle_fullscreen # Main function
  171.         keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
  172.         keybd.call(0xA4, 0, 0, 0)
  173.         keybd.call(13, 0, 0, 0)
  174.         keybd.call(13, 0, 2, 0)
  175.         keybd.call(0xA4, 0, 2, 0)   
  176.       end
  177.     end
  178.      
  179.     #==============================================================================
  180.     # Import
  181.     #------------------------------------------------------------------------------
  182.     $imported = {} if $imported == nil
  183.     $imported['Videos'] = true
  184.     #==============================================================================
  185.      
  186.     #==============================================================================
  187.     # ** SOV::Video::Commands
  188.     #==============================================================================
  189.      
  190.     module SOV::Video::Commands
  191.       #--------------------------------------------------------------------------
  192.       # * Play a video
  193.       #  filename : video's filename (with or without extension)
  194.       #  exitable : Can the video be exited
  195.       #  pausable : Can the video be paused
  196.       #--------------------------------------------------------------------------
  197.       def play_video(filename,exitable=true,pausable=true)
  198.         video = Cache.video(filename)
  199.         video.exitable = exitable
  200.         video.pausable = pausable
  201.         $game_map.video = video
  202.       end
  203.       #---------------------------------------------------------------------------
  204.       # Define as module function
  205.       #---------------------------------------------------------------------------
  206.       module_function :play_video
  207.     end
  208.      
  209.     #==============================================================================
  210.     # ** SOV::Video::Regexp
  211.     #==============================================================================
  212.      
  213.     module SOV::Video::Regexp
  214.       #--------------------------------------------------------------------------
  215.       # * Skill
  216.       #--------------------------------------------------------------------------
  217.       module Skill
  218.         FILENAME   = /<video[_ ]?(?:file)?name = "(.+)">/i
  219.         PAUSABLE   = /<video[_ ]?paus(?:e|able) = (t|f)>/i
  220.         EXITABLE   = /<video[_ ]?exit(?:able)? = (t|f)>/i
  221.       end
  222.     end
  223.      
  224.     #==============================================================================
  225.     # ** SOV::Game
  226.     #==============================================================================
  227.      
  228.     module SOV::Game
  229.       #--------------------------------------------------------------------------
  230.       # Constants
  231.       #--------------------------------------------------------------------------
  232.       INI = 'Game'
  233.       #--------------------------------------------------------------------------
  234.       # * Get the game windows handle
  235.       #--------------------------------------------------------------------------
  236.       def self.hwnd
  237.         unless defined?(@@hwnd)
  238.           find_window = Win32API.new('user32','FindWindow','pp','i')
  239.     #      @@hwnd = find_window.call('RGSS Player',title)  
  240.           gamefullscreen = Graphics.fullscreen?
  241.           @@hwnd = find_window.call('RGSS Player',title)  
  242.         end
  243.         return @@hwnd
  244.       end
  245.       #--------------------------------------------------------------------------
  246.       # * Get game title
  247.       #--------------------------------------------------------------------------
  248.       def self.title
  249.         unless defined?(@@title)
  250.           @@title = read_ini('title')
  251.         end
  252.         return @@title
  253.       end
  254.       #--------------------------------------------------------------------------
  255.       # * Read ini (Returns nil or match)
  256.       #--------------------------------------------------------------------------
  257.       def self.read_ini(variable,filename=INI)
  258.         return nil if variable == 'title' && SOV::Video::IGNORE_TITLE
  259.         reg = /^#{variable}=(.*)$/
  260.         File.foreach(filename+'.ini') { |line| break($1) if line =~ reg }
  261.       end
  262.     end
  263.      
  264.     #==============================================================================
  265.     # ** Cache
  266.     #==============================================================================
  267.      
  268.     module Cache
  269.       #--------------------------------------------------------------------------
  270.       # Class Variables
  271.       #--------------------------------------------------------------------------
  272.       @@vcache = {}
  273.       #--------------------------------------------------------------------------
  274.       # Define as class methods
  275.       #--------------------------------------------------------------------------
  276.       class << self
  277.         #------------------------------------------------------------------------
  278.         # Alias List
  279.         #------------------------------------------------------------------------
  280.         alias sov_video_clear clear unless $@
  281.         #------------------------------------------------------------------------
  282.         # * Get a video object
  283.         #  filename : basename of file
  284.         #------------------------------------------------------------------------
  285.         def video(filename)
  286.           # Get full filename if extension is missing
  287.           if File.extname(filename) == ''
  288.             files = Dir["#{SOV::Video::DIR_NAME}/#{filename}.*"]
  289.             filename = File.basename(files[0]) # Set as first matching file
  290.           end
  291.           # Create or get the video object.
  292.           if @@vcache.has_key?(filename)
  293.             @@vcache[filename]
  294.           else
  295.             @@vcache[filename] = Video.new(filename)
  296.           end
  297.         end
  298.         #------------------------------------------------------------------------
  299.         # * Clear
  300.         #------------------------------------------------------------------------
  301.         def clear
  302.           @@vcache.clear
  303.           sov_video_clear
  304.         end
  305.       end
  306.     end
  307.      
  308.     #==============================================================================
  309.     # ** RPG::Skill
  310.     #==============================================================================
  311.      
  312.     class RPG::UsableItem
  313.       #--------------------------------------------------------------------------
  314.       # * Determine if skill has a video skill
  315.       #--------------------------------------------------------------------------
  316.       def video
  317.         if @video == nil
  318.           @note.each_line { |line|
  319.             if @video == nil
  320.               @video = Cache.video($1) if line =~ SOV::Video::Regexp::Skill::FILENAME
  321.             else
  322.               @video.pausable = ($1 == 't') if line =~ SOV::Video::Regexp::Skill::PAUSABLE
  323.               @video.exitable = ($1 == 't') if line =~ SOV::Video::Regexp::Skill::EXITABLE
  324.             end
  325.           }
  326.           @video = :invalid if @video == nil
  327.         end
  328.         return @video
  329.       end
  330.     end
  331.      
  332.     #==============================================================================
  333.     # ** Video
  334.     #------------------------------------------------------------------------------
  335.     #  Class handling playing videos.
  336.     #==============================================================================
  337.      
  338.     class Video
  339.       #--------------------------------------------------------------------------
  340.       # Constants
  341.       #--------------------------------------------------------------------------
  342.       TYPE_AVI  = 'avivideo'
  343.       TYPE_MPEG = 'mpegvideo'
  344.       #--------------------------------------------------------------------------
  345.       # Class Variables
  346.       #--------------------------------------------------------------------------
  347.       @@default_x = 0
  348.       @@default_y = 0
  349.       @@default_width  = Graphics.width
  350.       @@default_height = Graphics.height
  351.       @@fullscreen = false
  352.       #--------------------------------------------------------------------------
  353.       # * Get and Set default_x/y/width/height
  354.       #--------------------------------------------------------------------------
  355.       for d in %w(x y width height)
  356.         # Define setter method
  357.         module_eval(%Q(def self.default_#{d}=(i); @@default_#{d} = i; end))
  358.         # Define getter method
  359.         module_eval(%Q(def self.default_#{d}; @@default_#{d}; end))
  360.       end
  361.       #--------------------------------------------------------------------------
  362.       # * Get fullscreen
  363.       #--------------------------------------------------------------------------
  364.       def self.fullscreen
  365.         @@fullscreen
  366.       end  
  367.       #--------------------------------------------------------------------------
  368.       # * Set fullscreen
  369.       #--------------------------------------------------------------------------
  370.       def self.fullscreen=(val)
  371.         @@fullscreen = val
  372.       end
  373.       #--------------------------------------------------------------------------
  374.       # * Win32API
  375.       #--------------------------------------------------------------------------
  376.       @@mciSendStringA = Win32API.new('winmm','mciSendStringA','pplp','i')
  377.       #--------------------------------------------------------------------------
  378.       # * Video Command
  379.       #  command_string : string following mci_command_string format
  380.       #  buffer : string to retrieve return data
  381.       #  buffer_size : number of characters in buffer
  382.       #  callback_handle : handle of window to callback to. Used if notify is used
  383.       #                    in the command string. (Not supported by game window)
  384.       #--------------------------------------------------------------------------
  385.       def self.send_command(cmnd_string,buffer='',buffer_size=0,callback_handle=0)
  386.         # Returns error code. No error if NULL
  387.         err = @@mciSendStringA.call(cmnd_string,buffer,buffer_size,callback_handle)
  388.         if err != 0
  389.           buffer = ' ' * 255
  390.           Win32API.new('winmm','mciGetErrorString','LPL','V').call(err,buffer,255)
  391.           raise(buffer.squeeze(' ').chomp('\000'))
  392.         end
  393.       end
  394.       
  395.       #--------------------------------------------------------------------------
  396.       # * Play a video
  397.       #--------------------------------------------------------------------------
  398.       def self.play(video)
  399.         # Make path and buffer
  400.         path = "#{SOV::Video::DIR_NAME}/#{video.filename}"
  401.         buffer = ' ' * 255
  402.         # Initialize device and dock window with game window as parent.
  403.         type = " type #{video.type}" if video.type != ''
  404.         send_command("open #{path}#{type} alias VIDEO style child parent #{SOV::Game.hwnd}")
  405.         # Display video in client rect at x,y with width and height.
  406.         x = video.x
  407.         y = video.y
  408.         width  = video.width
  409.         height = video.height
  410.         send_command("put VIDEO window at #{x} #{y} #{width} #{height}")
  411.         # Begin playing video
  412.         screen = @@fullscreen ? 'fullscreen' : 'window'
  413.         gamefullscreen = Graphics.fullscreen?
  414.         case video.type
  415.         when "avivideo"
  416.           if gamefullscreen == true
  417.           #send_command("put VIDEO window at #{x} #{y} 640 480")
  418.           Graphics.toggle_fullscreen
  419.           send_command("play VIDEO window")
  420.           else
  421.           send_command("play VIDEO window")
  422.           end
  423.         when "mpegvideo"
  424.             if gamefullscreen == true
  425.             Graphics.toggle_fullscreen
  426.             send_command("play VIDEO window")
  427.             else
  428.             send_command("play VIDEO fullscreen")
  429.             end
  430.         else
  431.         end
  432.         flag = 0
  433.         # Start Input and status processing loop
  434.         while buffer !~ /^stopped/
  435.           # Idle processing for a frame
  436.           sleep(1.0/Graphics.frame_rate)
  437.           # Get mode string
  438.           send_command('status VIDEO mode',buffer,255)
  439.           Input.update   
  440.           if Input.trigger?(SOV::Video::PAUSE_INPUT) and video.pausable?
  441.             Sound.play_cursor
  442.             if buffer =~ /^paused/                 # If already paused
  443.               send_command("resume VIDEO")         # Resume video
  444.             else                                   # Otherwise
  445.               send_command("pause VIDEO")          # Pause video
  446.             end
  447.           elsif Input.trigger?(SOV::Video::EXIT_INPUT) and video.exitable?
  448.             Sound.play_cancel
  449.             # Terminate loop on exit input
  450.             break
  451.           end
  452.         end
  453.         # Terminate the device
  454.         send_command('close VIDEO')
  455.       end
  456.       #--------------------------------------------------------------------------
  457.       # Public Instance Variables
  458.       #--------------------------------------------------------------------------
  459.       attr_accessor :x
  460.       attr_accessor :y
  461.       attr_accessor :width
  462.       attr_accessor :height
  463.       attr_writer :exitable
  464.       attr_writer :pausable
  465.       attr_reader :filename
  466.       #--------------------------------------------------------------------------
  467.       # * Initialize
  468.       #--------------------------------------------------------------------------
  469.       def initialize(filename)
  470.         unless FileTest.file?("#{SOV::Video::DIR_NAME}/#{filename}")
  471.           raise(Errno::ENOENT,filename)
  472.         end
  473.         @filename = filename
  474.         @x = @@default_x
  475.         @y = @@default_y
  476.         @width  = @@default_width
  477.         [url=home.php?mod=space&uid=291977]@height[/url] = @@default_height
  478.         @exitable = true
  479.         @pausable = true
  480.       end
  481.       #--------------------------------------------------------------------------
  482.       # * Get Type
  483.       #--------------------------------------------------------------------------
  484.       def type
  485.         if @type == nil
  486.           case File.extname(@filename)
  487.           when '.avi'; @type = TYPE_AVI
  488.           when '.mpeg'||'.mpg'; @type = TYPE_MPEG
  489.           else
  490.             @type = TYPE_MPEG#''
  491.           end
  492.         end
  493.         @type
  494.       end
  495.       #--------------------------------------------------------------------------
  496.       # * Is the video exitable?
  497.       #--------------------------------------------------------------------------
  498.       def exitable?
  499.         @exitable
  500.       end
  501.       #--------------------------------------------------------------------------
  502.       # * Is the video pausable?
  503.       #--------------------------------------------------------------------------
  504.       def pausable?
  505.         @pausable
  506.       end
  507.       #--------------------------------------------------------------------------
  508.       # Access
  509.       #--------------------------------------------------------------------------
  510.       private_class_method :send_command  
  511.     end
  512.      
  513.     #==============================================================================
  514.     # ** Game_Interpreter
  515.     #==============================================================================
  516.      
  517.     class Game_Interpreter
  518.       #--------------------------------------------------------------------------
  519.       # Import
  520.       #--------------------------------------------------------------------------
  521.       include(SOV::Video::Commands)
  522.     end
  523.      
  524.     #==============================================================================
  525.     # ** Game_Map
  526.     #==============================================================================
  527.      
  528.     class Game_Map
  529.       #--------------------------------------------------------------------------
  530.       # Public Instance Variables
  531.       #--------------------------------------------------------------------------
  532.       attr_accessor :video  
  533.     end
  534.      
  535.     #==============================================================================
  536.     # ** Scene_Map
  537.     #==============================================================================
  538.      
  539.     class Scene_Map
  540.       #--------------------------------------------------------------------------
  541.       # Alias List
  542.       #--------------------------------------------------------------------------
  543.       alias sov_video_update update unless $@
  544.       #--------------------------------------------------------------------------
  545.       # * Play Video
  546.       #--------------------------------------------------------------------------
  547.       def play_video(video)
  548.         # Memorize and stop current bgm and bgs
  549.         bgm = RPG::BGM.last
  550.         bgs = RPG::BGS.last
  551.         RPG::BGM.stop
  552.         RPG::BGS.stop
  553.         # Play video
  554.         Video.play(video)
  555.         # Restart bgm and bgs
  556.         bgm.play
  557.         bgs.play
  558.       end
  559.       #--------------------------------------------------------------------------
  560.       # * Update
  561.       #--------------------------------------------------------------------------
  562.       def update
  563.         if $game_map.video != nil
  564.           play_video($game_map.video)
  565.           $game_map.video = nil
  566.           Input.update
  567.         else
  568.           sov_video_update
  569.         end
  570.       end
  571.     end
  572.      
  573.     #==============================================================================
  574.     # ** Scene_Battle
  575.     #==============================================================================
  576.      
  577.     class Scene_Battle
  578.       #--------------------------------------------------------------------------
  579.       # * Alias list
  580.       #--------------------------------------------------------------------------
  581.       alias sov_video_update_battle update unless $@
  582.       alias sov_video_use_item use_item unless $@
  583.       #--------------------------------------------------------------------------
  584.       # * Play Video
  585.       #--------------------------------------------------------------------------
  586.       def play_video(video)
  587.         # Memorize and stop current bgm
  588.         bgm = RPG::BGM.last
  589.         RPG::BGM.stop
  590.         # Play video
  591.         Video.play(video)
  592.         # Restart bgm
  593.         bgm.play
  594.       end
  595.       #--------------------------------------------------------------------------
  596.       # * Execute Action Skill
  597.       #--------------------------------------------------------------------------
  598.       def use_item
  599.         skill = @subject.current_action.item   
  600.         if skill.video.is_a?(Video)
  601.           execute_action_video(skill)
  602.           sov_video_use_item
  603.         else
  604.           sov_video_use_item
  605.         end
  606.       end
  607.       #--------------------------------------------------------------------------
  608.       # * Execute Action Video
  609.       #--------------------------------------------------------------------------
  610.       def execute_action_video(skill)
  611.         br = Graphics.brightness
  612.         120.times { |i| Graphics.brightness = 255 - 255/60 * i; Graphics.update }
  613.         # Play video
  614.         play_video(skill.video)
  615.         # Reset brightness
  616.         Graphics.brightness = br
  617.       end
  618.       #ADDED UPDATE FUNCTION FROM SCENE_MAP TO SCENE_BATTLE
  619.       def update
  620.         if $game_map.video != nil
  621.           play_video($game_map.video)
  622.           $game_map.video = nil
  623.           Input.update
  624.         else
  625.           sov_video_update_battle
  626.         end
  627.       end
  628.      
  629.     end
  630.      
  631.      
  632.      
  633.      
  634.      
  635.     #==============================================================================
  636.     # Pre-Main Processing
  637.     #==============================================================================
  638.      
  639.     unless FileTest.directory?(SOV::Video::DIR_NAME) # If directory doesn't exist.
  640.       Dir.mkdir(SOV::Video::DIR_NAME)                # Make the directory
  641.     end
  642.      
  643.     =begin
  644.     =end

复制代码

评分

参与人数 2星屑 +95 收起 理由
熊喵酱 + 75 认可答案
Jousun + 20 这个和 2楼是一样的吗???

查看全部评分

回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
908
在线时间
212 小时
注册时间
2006-10-8
帖子
293
4
 楼主| 发表于 2013-9-1 14:44:07 | 只看该作者
tseyik 发表于 2013-9-1 12:07

放进去以后执行游戏一闪即退,实在不明白。。。。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-17 18:52

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表