查看: 1933|回复: 0

[已经过期] 关于截图扩展存档脚本的两个冲突问题 求高手解答

[复制链接]
梦石
0
星屑
94
在线时间
157 小时
注册时间
2006-7-2
回帖
250
发表于 2016-1-31 20:26:50 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 gkl0510 于 2016-1-31 20:30 编辑

在游戏中使用了“截图扩展存档”的脚本替换了原来的脚本,
以增加存档的上限和存档的美观。

1.png

但是发生了以下两个问题


1.游戏中调用“呼出存档”指令时,调出的是默认的存档菜单,
无法调出新加入的脚本

4.png

5.png


2.当读取存档的时候如果按Esc 返回键的话就会和好几个脚本报错

2.png

3.png


已经苦思冥想了许久不知道如何解决,期待大神解救T-T



截图扩展存档脚本

  1. ###使用说明
  2. #使用前请复制sceneshot.dll到游戏文件下,并新建文件夹Save
  3. #将此文本插入main前面
  4. #游戏前显示头像的文件名为:人物角色名_f,请自行建立几张做测试,不然找不到图片会报错
  5. #自动存档按钮F5 存入档位0(也就是自动存档那栏)
  6. #使用前,请在菜单脚本:scene_menu里面,
  7. #     when 4 # 存档
  8. #     # 禁止存档的情况下
  9. #     if $game_system.save_disabled
  10. #       # 演奏冻结 SE
  11. #       $game_system.se_play($data_system.buzzer_se)
  12. #       return
  13. #     end
  14. #     # 演奏确定 SE
  15. #     $game_system.se_play($data_system.decision_se)
  16. #     # 切换到存档画面
  17. #     $scene = Scene_Save.new <--这行
  18. #替换为:   $scene = Scene_Loadsave.new
  19. #另,在原scene_title里,48行左右
  20. #    for i in 0..3
  21. #          for i in 0..3
  22. #     if FileTest.exist?("Save#{i+1}.rxdata")
  23. ###################改成if FileTest.exist?("Save/Save#{i+1}.rxdata")
  24. #        @continue_enabled = true
  25. #      end
  26. #    end
  27. #否则继续游戏时会检测不到存档

  28. class Window_File < Window_Base
  29. attr_accessor :index
  30. def initialize(index = 0)
  31.    @backsp = Sprite.new
  32.   # @backsp.bitmap = Bitmap.new("Graphics/Pictures/菜单底图.jpg")
  33.    @backsp.z = 100
  34.    super(160,64,480,416)
  35.    #这行可以不用
  36.    self.contents = Bitmap.new(width - 32, height - 32)
  37.    #去框##
  38.    self.opacity=0
  39.    ##
  40.    @index = index
  41.    #这里我要说明一句,之所以用sprite是为了放缩图片
  42.    @sprite = Sprite.new
  43.    @sprite.visible = false
  44.    @sprite.z = 100
  45.    @sp_ch = []
  46.    @sp_ch[0] = Sprite.new
  47.    refresh
  48. end
  49. def refresh
  50.    self.contents.clear
  51.    for i in @sp_ch
  52.      i.visible = false
  53.    end
  54.    @sprite.visible = false
  55.    if FileTest.exist?(DIR+"Save#{@index}.rxdata")
  56.      @sprite.visible = true
  57.      if FileTest.exist?(DIR+"Save#{@index}.jpg")
  58.        @sprite.bitmap = Bitmap.new(DIR+"Save#{@index}.jpg")
  59.      else
  60.        self.contents.draw_text(32,64,400,32,"截图似乎有点问题……您搞什么了您?")
  61.      end
  62.      @sprite.x = 206
  63.      @sprite.y = 94
  64.      @sprite.zoom_x = 0.6
  65.      @sprite.zoom_y = 0.6
  66.      file = File.open(DIR+"Save#{@index}.rxdata", "r")
  67.      @time_stamp = file.mtime
  68.      @characters = Marshal.load(file)
  69.      @frame_count = Marshal.load(file)
  70.      @game_system = Marshal.load(file)
  71.      @game_switches = Marshal.load(file)
  72.      @game_variables = Marshal.load(file)
  73.      @total_sec = @frame_count / Graphics.frame_rate
  74.      file.close
  75.      for i in [email]0...@characters.size[/email]
  76.        bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
  77.        cw = bitmap.rect.width / 4
  78.        ch = bitmap.rect.height / 4
  79.        src_rect = Rect.new(0, 0, cw, ch)
  80.        x = i*100
  81.        y = 320
  82.        self.contents.blt(x, y, bitmap, src_rect)
  83.      end
  84.      # 描绘游戏时间
  85.      hour = @total_sec / 60 / 60
  86.      min = @total_sec / 60 % 60
  87.      sec = @total_sec % 60
  88.      time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
  89.      self.contents.font.color = normal_color
  90.      self.contents.draw_text(4, 326, 420, 32, time_string, 2)
  91.      # 描绘时间标记
  92.      self.contents.font.color = normal_color
  93.      time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
  94.      self.contents.draw_text(4, 346, 420, 32, time_string, 2)###356
  95.    else
  96.      self.contents.draw_text(32,32,420,32,"这个存档是空的")
  97.    end

  98. end
  99. def dispose
  100.    super
  101.    @sprite.dispose
  102.    @backsp.dispose
  103.    for i in @sp_ch
  104.      i.dispose
  105.    end
  106. end
  107. end


  108. class Window_File2 < Window_Base
  109. attr_accessor :index
  110. def initialize(index = 0)
  111.    @backsp = Sprite.new
  112.   # @backsp.bitmap = Bitmap.new("Graphics/Pictures/菜单底图.jpg")
  113.    @backsp.z = 100
  114.    super(160,0,480,480)
  115.    #这行可以不用
  116.    self.contents = Bitmap.new(width - 32, height - 32)
  117.    #去框##
  118.    self.opacity=0
  119.    ##
  120.    @index = index
  121.    #这里我要说明一句,之所以用sprite是为了放缩图片
  122.    @sprite = Sprite.new
  123.    @sprite.visible = false
  124.    @sprite.z = 100
  125.    @sp_ch = []
  126.    @sp_ch[0] = Sprite.new
  127.    refresh
  128. end
  129. def refresh
  130.    self.contents.clear
  131.    for i in @sp_ch
  132.      i.visible = false
  133.    end
  134.    @sprite.visible = false
  135.    if FileTest.exist?(DIR+"Save#{@index}.rxdata")
  136.      @sprite.visible = true
  137.      if FileTest.exist?(DIR+"Save#{@index}.jpg")
  138.        @sprite.bitmap = Bitmap.new(DIR+"Save#{@index}.jpg")
  139.      else
  140.        self.contents.draw_text(32,64,400,32,"截图似乎有点问题……您搞什么了您?")
  141.      end
  142.      @sprite.x = 176
  143.      @sprite.y = 30
  144.      @sprite.zoom_x = 0.7
  145.      @sprite.zoom_y = 0.7
  146.      file = File.open(DIR+"Save#{@index}.rxdata", "r")
  147.      @time_stamp = file.mtime
  148.      @characters = Marshal.load(file)
  149.      @frame_count = Marshal.load(file)
  150.      @game_system = Marshal.load(file)
  151.      @game_switches = Marshal.load(file)
  152.      @game_variables = Marshal.load(file)
  153.      @total_sec = @frame_count / Graphics.frame_rate
  154.      file.close
  155.      for i in [email]0...@characters.size[/email]
  156.        bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
  157.        cw = bitmap.rect.width / 4
  158.        ch = bitmap.rect.height / 4
  159.        src_rect = Rect.new(0, 0, cw, ch)
  160.        x = i*100
  161.        self.contents.blt(x, 440 - ch, bitmap, src_rect)
  162.      end
  163.      # 描绘游戏时间
  164.      hour = @total_sec / 60 / 60
  165.      min = @total_sec / 60 % 60
  166.      sec = @total_sec % 60
  167.      time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
  168.      self.contents.font.color = normal_color
  169.      self.contents.draw_text(4, 390, 420, 32, time_string, 2)
  170.      # 描绘时间标记
  171.      self.contents.font.color = normal_color
  172.      time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
  173.      self.contents.draw_text(4, 420, 420, 32, time_string, 2)
  174.    else
  175.      self.contents.draw_text(32,32,420,32,"这个存档是空的")
  176.    end

  177. end
  178. def dispose
  179.    super
  180.    @sprite.dispose
  181.    @backsp.dispose
  182.    for i in @sp_ch
  183.      i.dispose
  184.    end
  185. end
  186. end



  187. $打开自动存档用的开关编号 = 595
  188. $自动存档位置 = 1
  189. $按下F5之后的自动存档的音效 = "Audio/SE/存档"
  190. $按下F5之后禁止存档时候的音效 = "Audio/Se/错误"
  191. DIR = "Save/"
  192. $打开自动存档开关之后调用的公共事件 = 0 #——默认未定义
  193. $按下F5之后可以存档调用的公共事件 = 0 #——默认未定义
  194. $按下F5之后禁止存档调用的公共事件 = 0 #——默认未定义
  195. class Scene_Map
  196. alias auto_update update
  197. def update
  198. auto_update
  199. #——按下F5的时候自动存档,可以修改为F5,F6,F7,F8,也可以修改成默认按键但是不推荐。
  200. #——注意在不可存档的时候是无效的
  201. if Input.trigger?(Input::F5)
  202.   unless $game_system.map_interpreter.running?
  203.   if $game_system.save_disabled
  204.     Audio.se_play($按下F5之后禁止存档时候的音效)
  205.     $game_temp.common_event_id = $按下F5之后禁止存档调用的公共事件
  206.   else
  207.     Audio.se_play($按下F5之后的自动存档的音效)
  208.     $game_temp.common_event_id = $按下F5之后可以存档调用的公共事件
  209.     auto_save
  210.   end
  211.   end
  212. end
  213. #——当BOSS战之前打开一下定义的开关,即可自动存档
  214. if $game_switches[$打开自动存档用的开关编号] == true
  215.   $game_switches[$打开自动存档用的开关编号] = false
  216.   $game_temp.common_event_id = $打开自动存档开关之后调用的公共事件
  217.   auto_save
  218. end
  219. end
  220. def auto_save
  221. #——这里定义了储存的文件,如果不希望用Save4可以自己修改编号
  222. # 写入存档数据
  223. Screen::shot
  224.     file = File.open( DIR+"Save#{$自动存档位置}.rxdata", "wb")
  225.     auto_save_data(file)
  226.     if FileTest.exist?( DIR+"shot.jpg")
  227.       File.rename( DIR+"shot.jpg", DIR+"Save#{$自动存档位置}.jpg")
  228.     end
  229.     file.close
  230. end
  231. def auto_save_data(file)
  232. #——以下定义内容和Scene_Save的write_save_data(file)完全一样
  233. #——如果你修改过该存档方法,不要忘记用你修改的覆盖这部分内容。
  234. # 生成描绘存档文件用的角色图形
  235. characters = []
  236. for i in 0...$game_party.actors.size
  237.   actor = $game_party.actors[i]
  238.   characters.push([actor.character_name, actor.character_hue, actor])
  239. end
  240. # 写入描绘存档文件用的角色数据
  241. Marshal.dump(characters, file)
  242. # 写入测量游戏时间用画面计数
  243. Marshal.dump(Graphics.frame_count, file)
  244. # 增加 1 次存档次数
  245. $game_system.save_count += 1
  246. # 保存魔法编号
  247. # (将编辑器保存的值以随机值替换)
  248. $game_system.magic_number = $data_system.magic_number
  249. # 写入各种游戏对像
  250. Marshal.dump($game_system, file)
  251. Marshal.dump($game_switches, file)
  252. Marshal.dump($game_variables, file)
  253. Marshal.dump($game_self_switches, file)
  254. Marshal.dump($game_screen, file)
  255. Marshal.dump($game_actors, file)
  256. Marshal.dump($game_party, file)
  257. Marshal.dump($game_troop, file)
  258. Marshal.dump($game_map, file)
  259. Marshal.dump($game_player, file)
  260. end
  261. end







  262. DIR = "Save/"  # 储存文件夹名,请制作游戏时自行建立此文件夹


  263. module Screen  
  264. @screen = Win32API.new 'screenshot', 'Screenshot', %w(l l l l p l l), ''
  265. @readini = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l

  266. p), 'l'
  267. @findwindow = Win32API.new 'user32', 'FindWindowA', %w(p p), 'l'
  268. module_function
  269. def shot(file = "shot", typ = 1)
  270.    # to add the right extension...
  271.    if typ == 0
  272.      typname = ".bmp"
  273.    elsif typ == 1
  274.      typname = ".jpg"
  275.    elsif typ == 2
  276.      typname = ".png"
  277.    end   
  278.    file_index = 0   
  279.    dir = "Save/"   
  280.    # make the filename....
  281.    file_name = dir + file.to_s + typname.to_s   
  282.    # make the screenshot.... Attention dont change anything from here on....
  283.    @screen.call(0,0,640,480,file_name,handel,typ)
  284. end
  285. # find the game window...
  286. def handel
  287.    game_name = "\0" * 256
  288.    @readini.call('Game','Title','',game_name,255,".\\Game.ini")
  289.    game_name.delete!("\0")
  290.    return @findwindow.call('RGSS Player',game_name)
  291. end
  292. end


  293. class Scene_Menu
  294. alias shotsave_main main
  295. def main
  296.    if @menu_index == 0
  297.      Screen::shot
  298.    end   
  299.    shotsave_main
  300. end
  301. end

  302. class Interpreter
  303. #--------------------------------------------------------------------------
  304. # ● 调用存档画面
  305. #--------------------------------------------------------------------------
  306. def command_352
  307.    # 设置战斗中断标志
  308.    $game_temp.battle_abort = true
  309.    # 设置调用存档标志
  310.    $game_temp.save_calling = true
  311.    # 推进索引
  312.    @index += 1
  313.    # 结束
  314.    Screen::shot
  315.    return false
  316. end
  317. end

  318. #==============================================================================
  319. # ■ Scene_Load
  320. #------------------------------------------------------------------------------
  321. #  处理读档画面的类。
  322. #==============================================================================

  323. class Scene_Load
  324. #--------------------------------------------------------------------------
  325. # ● 初始化对像
  326. #--------------------------------------------------------------------------
  327. def initialize
  328.    # 再生成临时对像
  329.    $game_temp = Game_Temp.new
  330.    # 选择存档时间最新的文件
  331.    $game_temp.last_file_index = 0
  332.    latest_time = Time.at(0)
  333.    for i in 0..51
  334.      filename = DIR+"Save#{i}.rxdata"
  335.      if FileTest.exist?(filename)
  336.        file = File.open(filename, "r")
  337.        if file.mtime > latest_time
  338.          latest_time = file.mtime
  339.          $game_temp.last_file_index = i
  340.        end
  341.        file.close
  342.      end
  343.    end
  344. end  
  345. def main
  346.    #生成背景#
  347.    ##生成菜单背景##
  348.     @dff_save= Sprite.new
  349.     @dff_save.bitmap = Bitmap.new("Graphics/Pictures/System/load")
  350.    ##
  351.    @command_window = Window_Command.new(160,["  自动存档","  快速存档","  进度二",
  352.    "  进度三","  进度四","  进度五","  进度六","  进度七","  进度八","  进度九","  进度十",
  353.    "  进度十一","  进度十二","  进度十三","  进度十四","  进度十五","  进度十六",
  354.    "  进度十七","  进度十八","  进度十九","  进度二十","  进度二一","  进度二二",
  355.    "  进度二三","  进度二四","  进度二五","  进度二六","  进度二七","  进度二八",
  356.    "  进度二九","  进度三十"])
  357.    @command_window.y = 1
  358.    @command_window.height = 480
  359.    @command_window.index = $game_temp.last_file_index
  360.    @content_window = Window_File2.new($game_temp.last_file_index)
  361.    #去框##
  362.    @command_window.opacity = 0
  363.    ##   
  364.    # 执行过渡
  365.    Graphics.transition
  366.    # 主循环
  367.    loop do
  368.      # 刷新游戏画面
  369.      Graphics.update
  370.      # 刷新输入信息
  371.      Input.update
  372.      # 刷新画面
  373.      update
  374.      # 如果画面被切换的话就中断循环
  375.      if $scene != self
  376.        break
  377.      end
  378.    end
  379.    # 准备过渡
  380.    Graphics.freeze
  381.    @command_window.dispose
  382.    @content_window.dispose
  383.    @dff_save.dispose
  384.    @dff_save.bitmap.dispose
  385. end
  386. def update
  387.    @command_window.update
  388.    if @command_window.index != @content_window.index
  389.      @content_window.index = @command_window.index
  390.      @content_window.refresh
  391.    end   
  392.    #——————下面这一部分是原装脚本——————#
  393.    if Input.trigger?(Input::B)  
  394.    # 演奏取消 SE
  395.    $game_system.se_play($data_system.cancel_se)
  396.    # 切换到标题画面
  397.    #####$scene = Scene_Title.new
  398.    $scene = Scene_Map.new
  399.    end   
  400.    #———————————————————————#   
  401.    if Input.trigger?(Input::C)
  402.      # 文件不存在的情况下
  403.      unless FileTest.exist?(DIR+"Save#{@command_window.index}.rxdata")
  404.        # 演奏冻结 SE
  405.        $game_system.se_play($data_system.buzzer_se)
  406.        return
  407.      end
  408.      # 演奏读档 SE
  409.      $game_system.se_play($data_system.load_se)
  410.      # 写入存档数据
  411.      file = File.open(DIR+"Save#{@command_window.index}.rxdata", "rb")
  412.      read_save_data(file)
  413.      file.close
  414.      # 还原 BGM、BGS
  415.      $game_system.bgm_play($game_system.playing_bgm)
  416.      $game_system.bgs_play($game_system.playing_bgs)
  417.      # 刷新地图 (执行并行事件)
  418.      $game_map.update
  419.      # 切换到地图画面
  420.      $scene = Scene_Map.new
  421.    end
  422.    #———————————————————————#
  423. end
  424. #--------------------------------------------------------------------------
  425. # ● 写入存档数据
  426. #     file : 写入用文件对像 (已经打开)
  427. #--------------------------------------------------------------------------
  428. def read_save_data(file)
  429.    # 读取描绘存档文件用的角色数据
  430.    characters = Marshal.load(file)
  431.    # 读取测量游戏时间用画面计数
  432.    Graphics.frame_count = Marshal.load(file)
  433.    # 读取各种游戏对像
  434.    $game_system        = Marshal.load(file)
  435.    $game_switches      = Marshal.load(file)
  436.    $game_variables     = Marshal.load(file)
  437.    $game_self_switches = Marshal.load(file)
  438.    $game_screen        = Marshal.load(file)
  439.    $game_actors        = Marshal.load(file)
  440.    $game_party         = Marshal.load(file)
  441.    $game_troop         = Marshal.load(file)
  442.    $game_map           = Marshal.load(file)
  443.    $game_player        = Marshal.load(file)
  444.    # 魔法编号与保存时有差异的情况下
  445.    # (加入编辑器的编辑过的数据)
  446.    if $game_system.magic_number != $data_system.magic_number
  447.      # 重新装载地图
  448.      $game_map.setup($game_map.map_id)
  449.      $game_player.center($game_player.x, $game_player.y)
  450.    end
  451.    # 刷新同伴成员
  452.    $game_party.refresh
  453. end
  454. end

  455. #==============================================================================
  456. #  Window_LoadCommand
  457. #------------------------------------------------------------------------------
  458. #  存取档画面选择按钮窗口
  459. #==============================================================================

  460. class Window_LoadCommand < Window_Selectable
  461. #--------------------------------------------------------------------------
  462. #  初始化对象
  463. #--------------------------------------------------------------------------
  464. def initialize
  465. super(320, 0, 320, 64)
  466. self.contents = Bitmap.new(width - 32, height - 32)
  467. self.contents.font.color = normal_color
  468. #去框#
  469. self.opacity=0
  470. ##
  471. @item_max = 2
  472. @column_max = 2
  473. @commands = ["存储", "读取"]
  474. refresh
  475. self.index = 0
  476. end
  477. #--------------------------------------------------------------------------
  478. #  刷新
  479. #--------------------------------------------------------------------------
  480. def refresh
  481. self.contents.clear
  482. for i in 0...@item_max
  483.    draw_item(i)
  484. end
  485. end
  486. #--------------------------------------------------------------------------
  487. #  描画按钮文字
  488. #--------------------------------------------------------------------------
  489. def draw_item(index)
  490. x = 4 + index * 160
  491. self.contents.draw_text(x, 0, 144, 32, @commands[index])
  492. end
  493. #--------------------------------------------------------------------------
  494. # ● 项目无效化
  495. #     index : 项目编号
  496. #--------------------------------------------------------------------------
  497. def disable_item(index)
  498.    draw_item(index, disabled_color)
  499. end

  500. end

  501. #==============================================================================
  502. #  Scene_Loadsave
  503. #------------------------------------------------------------------------------
  504. # 处理存取档画面的类。
  505. #==============================================================================

  506. class Scene_Loadsave
  507. #--------------------------------------------------------------------------
  508. # ● 初始化对像
  509. #     $last_savefile_index : 记录光标位置
  510. #--------------------------------------------------------------------------
  511. def initialize
  512.    $last_savefile_index = 0 if $last_savefile_index == nil
  513.    # 再生成临时对像
  514.    $game_temp = Game_Temp.new
  515.    # 选择存档时间最新的文件
  516.    $game_temp.last_file_index = 0
  517.    latest_time = Time.at(0)
  518.    for i in 0..51
  519.      filename =  DIR+"Save#{i}.rxdata"
  520.      if FileTest.exist?(filename)
  521.        file = File.open(filename, "r")
  522.        if file.mtime > latest_time
  523.          latest_time = file.mtime
  524.          $game_temp.last_file_index = i
  525.        end
  526.        file.close
  527.      end
  528.    end
  529. end
  530. #--------------------------------------------------------------------------
  531. #  主处理
  532. #--------------------------------------------------------------------------
  533. def main         
  534.    ##生成菜单背景##
  535.     @dff_save= Sprite.new
  536.     @dff_save.bitmap = Bitmap.new("Graphics/Pictures/System/saveload")
  537.    ##
  538.    @savestate = 0
  539.    # 生成窗口
  540.    @help_window = Window_LoadHelp.new
  541.    @help_window.set_text("请选择.")
  542.    @option_window = Window_LoadCommand.new
  543.    @option_window.index = $last_savefile_index
  544.    ########################################################
  545.    @command_window = Window_Command.new(160,["  自动存档","  快速存档","   进度二",
  546.    "   进度三","   进度四","   进度五","   进度六","   进度七","   进度八","   进度九","   进度十",
  547.    "  进度十一","  进度十二","  进度十三","  进度十四","  进度十五","  进度十六",
  548.    "  进度十七","  进度十八","  进度十九","  进度二十","  进度二一","  进度二二",
  549.    "  进度二三","  进度二四","  进度二五","  进度二六","  进度二七","  进度二八",
  550.    "  进度二九","  进度三十"])
  551.      @command_window.y = 64
  552.      @command_window.height = 378
  553.      @command_window.index = $game_temp.last_file_index
  554.      @content_window = Window_File.new($game_temp.last_file_index)
  555.      @command_window.active = false
  556.      #去框##
  557.      @command_window.opacity = 0
  558.      ##
  559.      ###############覆盖存档
  560.        @confirm_window = Window_Base.new(120, 188, 400, 64)
  561.        @confirm_window.contents = Bitmap.new(368, 32)

  562.        @confirm_window.contents.font.color = Color.new(255,255,255,255)

  563.        string = "确定要覆盖这个进度吗?"
  564.        @confirm_window.contents.font.name = "黑体"
  565.        @confirm_window.contents.font.size = 24
  566.        @confirm_window.contents.draw_text(4, 0, 368, 32, string)
  567.        @yes_no_window = Window_Command.new(100, ["覆盖", "取消"])
  568.        @confirm_window.z = 1500
  569.        @yes_no_window.index = 1
  570.        @yes_no_window.x = 270
  571.        @yes_no_window.y = 252
  572.        @yes_no_window.z = 1500
  573.        @confirm_window.visible = false
  574.        @yes_no_window.visible = false
  575.        @yes_no_window.active = false

  576.    # 执行过渡
  577.    Graphics.transition
  578.    # 主循环
  579.    loop do
  580.      # 刷新游戏画面
  581.      Graphics.update
  582.      # 刷新输入信息
  583.      Input.update
  584.      # 刷新画面
  585.      update
  586.      # 如果画面被切换的话就中断循环
  587.      if $scene != self
  588.        break
  589.      end
  590.    end
  591.    # 准备过渡
  592.    Graphics.freeze
  593.    # 释放窗口
  594.    @command_window.dispose
  595.    @content_window.dispose
  596.    @confirm_window.dispose
  597.    @yes_no_window.dispose
  598.    @help_window.dispose
  599.    @option_window.dispose
  600.    @dff_save.dispose
  601.    @dff_save.bitmap.dispose
  602. end

  603. #--------------------------------------------------------------------------
  604. #  ● 刷新画面
  605. #--------------------------------------------------------------------------
  606. def update
  607.    # 刷新窗口
  608.    @help_window.update
  609.    @option_window.update
  610. #   @content_window.update
  611.    @command_window.update
  612.    if @yes_no_window.active
  613.        confirm_update
  614.        return
  615.    end
  616.    @content_window.index = @command_window.index
  617.    @content_window.refresh
  618.    case @savestate
  619.    when 0
  620.        if Input.trigger?(Input::B)
  621.        $game_system.se_play($data_system.cancel_se)
  622.        # 返回地图
  623.        if $menu_call == false
  624.        # 切换到地图画面
  625.        $scene = Scene_Map.new
  626.          return
  627.        end
  628.        # 切换到菜单画面
  629.        $menu_call = false
  630.        $scene = Scene_Menu.new(5)
  631.     end
  632.      if Input.trigger?(Input::C)
  633.        case @option_window.index
  634.        when 1
  635.          @command_window.active = true
  636.          @option_window.active = false
  637.          $game_system.se_play($data_system.decision_se)
  638.          @help_window.set_text("请选择一个文件进行读取.")
  639.          @savestate  = 1
  640.          return
  641.        when 0

  642.          @command_window.active = true
  643.          @option_window.active = false
  644.          $game_system.se_play($data_system.decision_se)
  645.          @help_window.set_text("请选择一个文件进行存储.")
  646.          @savestate = 2
  647.          
  648.          return
  649.        return
  650.        end
  651.      end
  652.    when 1,2
  653.      if Input.trigger?(Input::C)
  654.        if @savestate == 1
  655.          $menu_call = false
  656.          load_file
  657.          return
  658.        else
  659.          # 禁止存档的情况下
  660.          if $game_system.save_disabled
  661.            @help_window.set_text("抱歉,这里禁止存储.")
  662.            # 演奏冻结 SE
  663.            $game_system.se_play($data_system.buzzer_se)
  664.            return
  665.          end
  666.         $game_system.se_play($data_system.decision_se)
  667.         $last_savefile_index = @option_window.index

  668.         save_file
  669.          return
  670.        end
  671.      end
  672.      # 取消
  673.      if Input.trigger?(Input::B)
  674.        $game_system.se_play($data_system.cancel_se)
  675.        @command_window.active = false
  676.        @help_window.set_text("请选择.")
  677.        @savestate = 0
  678.        @option_window.active = true
  679.        return
  680.      end
  681.      
  682.      if Input.trigger?(Input::B)
  683.        $game_system.se_play($data_system.cancel_se)
  684.        @savestate = 2
  685.        @command_window.active = true

  686.        return
  687.      end
  688.    end
  689. end
  690. #--------------------------------------------------------------------------
  691. # 建立记录文件索引
  692. #--------------------------------------------------------------------------

  693. #--------------------------------------------------------------------------
  694. #  读取记录文件
  695. #     filename  : 被读取文件
  696. #--------------------------------------------------------------------------
  697. def load_file
  698.      # 文件不存在的情况下
  699.      unless FileTest.exist?( DIR+"Save#{@command_window.index}.rxdata")
  700.        # 演奏冻结 SE
  701.        $game_system.se_play($data_system.buzzer_se)
  702.        return
  703.      end
  704.      # 演奏读档 SE
  705.      $game_system.se_play($data_system.load_se)
  706.      # 写入存档数据
  707.      file = File.open( DIR+"Save#{@command_window.index}.rxdata", "rb")
  708.      read_save_data(file)
  709.      file.close
  710.      # 还原 BGM、BGS
  711.      $game_system.bgm_play($game_system.playing_bgm)
  712.      $game_system.bgs_play($game_system.playing_bgs)
  713.      # 刷新地图 (执行并行事件)
  714.      $game_map.update
  715.      # 切换到地图画面
  716.      $scene = Scene_Map.new
  717. end
  718. #--------------------------------------------------------------------------
  719. # ● 读取存档数据
  720. #     file : 读取用文件对像 (已经打开)
  721. #--------------------------------------------------------------------------
  722. def read_save_data(file)
  723.    # 读取描绘存档文件用的角色数据
  724.    characters = Marshal.load(file)
  725.    # 读取测量游戏时间用画面计数
  726.    Graphics.frame_count = Marshal.load(file)
  727.    # 读取各种游戏对像
  728.    $game_system        = Marshal.load(file)
  729.    $game_switches      = Marshal.load(file)
  730.    $game_variables     = Marshal.load(file)
  731.    $game_self_switches = Marshal.load(file)
  732.    $game_screen        = Marshal.load(file)
  733.    $game_actors        = Marshal.load(file)
  734.    $game_party         = Marshal.load(file)
  735.    $game_troop         = Marshal.load(file)
  736.    $game_map           = Marshal.load(file)
  737.    $game_player        = Marshal.load(file)
  738.    # 魔法编号与保存时有差异的情况下
  739.    # (加入编辑器的编辑过的数据)
  740.    if $game_system.magic_number != $data_system.magic_number
  741.      # 重新装载地图
  742.      $game_map.setup($game_map.map_id)
  743.      $game_player.center($game_player.x, $game_player.y)
  744.    end
  745.    # 刷新同伴成员
  746.    $game_party.refresh
  747. end
  748. #--------------------------------------------------------------------------
  749. # ● 写入存档文件
  750. #--------------------------------------------------------------------------
  751. def save_file
  752.    if Input.trigger?(Input::C)
  753.      unless FileTest.exist?( DIR+"Save#{@command_window.index}.rxdata")
  754.        # 演奏冻结 SE
  755.        # 演奏存档 SE
  756.          $game_system.se_play($data_system.save_se)
  757.          # 写入存档数据
  758.          file = File.open( DIR+"Save#{@command_window.index}.rxdata", "wb")
  759.          write_save_data(file)
  760.          if FileTest.exist?( DIR+"shot.jpg")
  761.            File.rename( DIR+"shot.jpg",  DIR+"Save#{@command_window.index}.jpg")
  762.          end
  763.          file.close
  764.          $game_temp.last_file_index = @command_window.index
  765.          # 如果被事件调用
  766.          if $game_temp.save_calling
  767.            # 清除存档调用标志
  768.            $game_temp.save_calling = false
  769.            @confirm_window.dispose
  770.            # 切换到地图画面
  771.            $scene = Scene_Map.new   
  772.            return
  773.          end
  774.        # 切换到菜单画面
  775.          $scene = Scene_Menu.new(5)
  776.      end
  777.      @yes_no_window.active = true
  778.      @command_window.active = false            
  779.    end
  780.    #———————————————————————#     
  781. end
  782. #-------------------------------------------------------------------
  783. def confirm_update
  784.    @command_index = @command_window.index
  785.    @confirm_window.visible = true
  786.    @confirm_window.z = 1500
  787.    @yes_no_window.visible = true
  788.    @yes_no_window.active = true
  789.    @yes_no_window.z = 1500
  790.    @yes_no_window.update
  791.    if Input.trigger?(Input::C)
  792.      if @yes_no_window.index == 0
  793.          #######################################################
  794.          # 演奏存档 SE
  795.          $game_system.se_play($data_system.save_se)
  796.          # 写入存档数据
  797.          file = File.open( DIR+"Save#{@command_window.index}.rxdata", "wb")
  798.          write_save_data(file)
  799.          if FileTest.exist?( DIR+"shot.jpg")
  800.            File.rename( DIR+"shot.jpg",  DIR+"Save#{@command_window.index}.jpg")
  801.          end
  802.          file.close
  803.          $game_temp.last_file_index = @command_window.index
  804.          # 如果被事件调用
  805.          if $game_temp.save_calling
  806.            # 清除存档调用标志
  807.            $game_temp.save_calling = false
  808.            @confirm_window.dispose
  809.            @content_window.dispose
  810.            # 切换到地图画面
  811.            $scene = Scene_Map.new
  812.            return
  813.          end
  814.        # 切换到菜单画面
  815.          $scene = Scene_Menu.new(5)      
  816.        else
  817.        @yes_no_window.visible = false
  818.        @confirm_window.visible = false
  819.        $game_system.se_play($data_system.cancel_se)
  820.        @yes_no_window.active = false
  821.        @command_window.active = true
  822.        end
  823.    end
  824.    if Input.trigger?(Input::B)
  825.      @yes_no_window.visible = false
  826.      @confirm_window.visible = false
  827.      $game_system.se_play($data_system.cancel_se)
  828.      @yes_no_window.active = false
  829.      @command_window.active = true
  830.    end
  831. end
  832. #--------------------------------------------------------------------------
  833. # ● 写入存档数据
  834. #     file : 写入用文件对像 (已经打开)
  835. #--------------------------------------------------------------------------
  836. def write_save_data(file)
  837.    # 生成描绘存档文件用的角色图形
  838.    characters = []
  839.    for i in 0...$game_party.actors.size
  840.      actor = $game_party.actors[i]
  841.      characters.push([actor.character_name, actor.character_hue, actor])
  842.    end
  843.    # 写入描绘存档文件用的角色数据
  844.    Marshal.dump(characters, file)
  845.    # 写入测量游戏时间用画面计数
  846.    Marshal.dump(Graphics.frame_count, file)
  847.    # 增加 1 次存档次数
  848.    $game_system.save_count += 1
  849.    # 保存魔法编号
  850.    # (将编辑器保存的值以随机值替换)
  851.    $game_system.magic_number = $data_system.magic_number
  852.    # 写入各种游戏对像
  853.    Marshal.dump($game_system, file)
  854.    Marshal.dump($game_switches, file)
  855.    Marshal.dump($game_variables, file)
  856.    Marshal.dump($game_self_switches, file)
  857.    Marshal.dump($game_screen, file)
  858.    Marshal.dump($game_actors, file)
  859.    Marshal.dump($game_party, file)
  860.    Marshal.dump($game_troop, file)
  861.    Marshal.dump($game_map, file)
  862.    Marshal.dump($game_player, file)
  863. end
  864. end

  865. #==============================================================================
  866. # ■ Window_LoadHelp
  867. #------------------------------------------------------------------------------
  868. #  存取档画面帮助信息的显示窗口。
  869. #==============================================================================

  870. class Window_LoadHelp < Window_Base
  871. #--------------------------------------------------------------------------
  872. #  初始化对象
  873. #--------------------------------------------------------------------------
  874. def initialize
  875. super(0, 0, 320, 64)
  876. self.contents = Bitmap.new(width - 32, height - 32)
  877. #去框#
  878. self.opacity=0
  879. ##
  880. end
  881. #--------------------------------------------------------------------------
  882. #  刷新文本
  883. #--------------------------------------------------------------------------
  884. def set_text(text, align = 1)
  885. if text != @text or align != @align
  886.    self.contents.clear
  887.    self.contents.font.color = normal_color
  888.    self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
  889.    @text = text
  890.    @align = align
  891.    @actor = nil
  892. end
  893. self.visible = true
  894. end
  895. end
复制代码




显示地图名称脚本

  1. module Sword
  2. #=======================================
  3. #★ 魔劍工舖 - 地圖上顯示地圖名 1.01
  4. # [url]http://blog.yam.com/a870053jjkj/[/url]
  5. #=======================================
  6.   ON, OFF = true, false
  7. #=======================================
  8. #● 使用者自定設置
  9. Sword67_XorY = [-10, 0] # 顯示地圖名稱的窗口位置,分別為 [X座標, Y座標] # 640, 416
  10. Sword67_Align = 0 # 文字的靠邊位置,0為左、1為中、2為右
  11. Sword67_Opacity = 255 # 設定窗口背景的不透明度和淡出上限
  12. Sword67_Adjunct = 80 # 地圖名稱顯示的時間,0為永久顯示(每40約1秒)
  13. Sword67_Switche = 600 # 指定1個開關編號,該開關為ON表示關閉此腳本功能
  14. Sword67_Show = ON  # 是否在起始地圖顯示地圖名
  15. Sword67_Fade = [5, 5] # 設定每幀 [加, 減] 不透明度的淡出淡入效果,0為不使用
  16. #=======================================
  17.   $Sword ? $Sword[67] = true : $Sword = {67=>true} # 腳本使用標誌
  18.   ($Sword_VX = false ; RPG::Weather rescue $Sword_VX = true) if $Sword_VX == nil
  19.   Sword67s1_Fade = [Sword67_Fade[0] > 0 ? Sword67_Opacity / Sword67_Fade[0] : 0,
  20.   Sword67_Fade[1] > 0 ? Sword67_Opacity / Sword67_Fade[1] : 0]
  21.   #-------------------------------------------------------------
  22.   #● 紀錄是否在起始地圖顯示地圖名的標誌
  23.   def self.sword67=(s) ; @sword67 = s ; end
  24.   def self.sword67 ; @sword67 ; end
  25.   self.sword67 = Sword67_Show
  26. end
  27. #=======================================
  28. #■ 處理主角的類
  29. if $Sword_VX
  30. class Game_Player < Game_Character
  31.   attr_reader    :new_map_id # 新地圖的地圖編號
  32. end
  33. end
  34. #=======================================
  35. #■ 地圖名稱的窗口
  36. class WSword_MapName < Window_Base
  37.   include Sword # 連接自定設置
  38.   #-------------------------------------------------------------
  39.   #● 初始化物件
  40.   def initialize(a = 0)
  41.     b = $Sword_VX ? 'v' : 'x'
  42.     @map_name = a == 0 ? load_data("Data/MapInfos.r#{b}data")[$game_map.map_id].name :
  43.     load_data("Data/MapInfos.r#{b}data")[a].name # 獲取地圖名稱
  44.     super(Sword67_XorY[0], Sword67_XorY[1], 33, 33)
  45.     self.contents = Bitmap.new(width - 32, height - 32)
  46.     self.windowskin = RPG::Cache.windowskin("mapname")
  47. #    self.width = contents.text_size(@map_name).width + 40
  48. #    self.height = contents.text_size(@map_name).height + 43
  49.     self.width = 870
  50.     self.height = contents.text_size(@map_name).height + 60
  51.     self.contents = Bitmap.new(width - 32, height - 32)
  52.     refresh
  53.   end
  54.   #-------------------------------------------------------------
  55.   #● 描繪內容
  56.   def refresh
  57.     self.contents.clear ; self.contents.font.color = normal_color ; self.contents.font.size = 24
  58.     case Sword67_Align # 窗口靠邊設定
  59.     when 1 ; self.x -= self.width / 2
  60.     when 2 ; self.x -= self.width
  61.     end
  62.     self.contents.draw_text(4, 0, self.width, 48, @map_name) # 窗口內容
  63.   end
  64. end
  65. #=======================================
  66. #■ 處理地圖畫面的類
  67. class Scene_Map
  68.   include Sword # 連接自定設置
  69.   #-------------------------------------------------------------
  70.   #● 主處理
  71.   alias sword67_main main unless $Sword_VX
  72.   def main
  73.     sword67_map_name ; $Sword_VX ? super : sword67_main
  74.     unless @sword_map_name == nil
  75.       @sword_map_name.dispose
  76.       @sword_map_name = nil
  77.     end
  78.   end
  79.   #-------------------------------------------------------------
  80.   #● 更新
  81.   alias sword67_update update
  82.   def update
  83.     if Sword67_Fade[0] > 0 and @sword_map_name and (not @sword_map_wait == true)
  84.       @sword_map_name.opacity = [@sword_map_name.opacity +
  85.       Sword67_Fade[0], Sword67_Opacity].min
  86.       @sword_map_name.contents_opacity = [@sword_map_name.opacity +
  87.       Sword67_Fade[0], Sword67_Opacity].min
  88.     end
  89.     # 窗口顯示時間計算
  90.     @sword_map_wait = [Graphics.frame_count, Graphics.frame_count +
  91.     Sword67_Adjunct + Sword67s1_Fade[0]] unless @sword_map_wait
  92.     if @sword_map_wait.is_a?(Array) and Sword67_Adjunct != 0
  93.       @sword_map_wait[0] <= @sword_map_wait[1] ? @sword_map_wait[0] += 1 :
  94.       @sword_map_wait = true
  95.     end
  96.     if @sword_map_wait == true ; if @sword_map_name
  97.     if @sword_map_name.opacity == 0 or Sword67_Fade[1] == 0
  98.       @sword_map_name.dispose ; @sword_map_name = nil
  99.       @sword_map_wait = nil
  100.     else
  101.       @sword_map_name.opacity = [@sword_map_name.opacity -
  102.       Sword67_Fade[1], 0].max
  103.       @sword_map_name.contents_opacity = [@sword_map_name.opacity -
  104.       Sword67_Fade[1], 0].max
  105.     end ; end ; end
  106.     sword67_update
  107.   end
  108.   #-------------------------------------------------------------
  109.   #● 主角的場所移動
  110.   if $Sword_VX ; alias sword67_transfer_player update_transfer_player
  111.   else ; alias sword67_transfer_player transfer_player ; end
  112.   def transfer_player
  113.     return unless $game_player.transfer? if $Sword_VX
  114.     $game_switches[Sword67_Switche] ? 0 : @sword_map_wait = false
  115.     # 重新顯示窗口
  116.     unless @sword_map_name == nil
  117.       @sword_map_name.dispose
  118.       @sword_map_name = nil
  119.     end
  120.     Sword.sword67 = true
  121.     sword67_transfer_player
  122.     sword67_map_name
  123.   end
  124.   def update_transfer_player ; transfer_player ; end
  125.   #-------------------------------------------------------------
  126.   #● 顯示地圖名稱窗口的處理
  127.   def sword67_map_name
  128.     if $game_switches[Sword67_Switche] == false and Sword.sword67
  129.       @sword_map_name = WSword_MapName.new($Sword_VX ?
  130.       $game_player.new_map_id : $game_temp.player_new_map_id)
  131. #      @sword_map_name.opacity = Sword67_Fade[0] > 0 ? 0 : Sword67_Opacity
  132.       @sword_map_name.opacity = 0
  133.       #@sword_map_name.contents_opacity = 0 if Sword67_Fade[0] > 0
  134.       @sword_map_name.contents_opacity = 0
  135.       Sword.sword67 = false
  136.     end
  137.   end
  138. end
复制代码



电梯地图的脚本

  1. #==============================================================================
  2. # ■ Spriteset_Map
  3. #------------------------------------------------------------------------------
  4. #  處理地圖畫面活動區塊和元件的類別。
  5. #  本類別在 Scene_Map 類別的內部使用。
  6. #==============================================================================

  7. class Spriteset_Map
  8.   #--------------------------------------------------------------------------
  9.   # ● 初始化物件
  10.   #--------------------------------------------------------------------------
  11.   def initialize
  12.     # 產生顯示連接埠
  13.     @viewport1 = Viewport.new(0, 0, 640, 480)
  14.     @viewport2 = Viewport.new(0, 0, 640, 480)
  15.     @viewport3 = Viewport.new(0, 0, 640, 480)
  16.     @viewport2.z = 200
  17.     @viewport3.z = 5000
  18.     # 產生元件地圖
  19.     @tilemap = Tilemap.new(@viewport1)
  20.     @tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
  21.     for i in 0..6
  22.       autotile_name = $game_map.autotile_names[i]
  23.       @tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
  24.     end
  25.     @tilemap.map_data = $game_map.data
  26.     @tilemap.priorities = $game_map.priorities
  27.     # 產生全景平面
  28.     @panorama = Plane.new(@viewport1)
  29.     @panorama.z = -1000
  30.     # 產生霧平面
  31.     @fog = Plane.new(@viewport1)
  32.     @fog.z = 3000
  33.     # 產生角色活動區塊
  34.     @character_sprites = []
  35.     for i in $game_map.events.keys.sort
  36.       sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
  37.       @character_sprites.push(sprite)
  38.     end
  39.     @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
  40.     # 產生天氣
  41.     @weather = RPG::Weather.new(@viewport1)
  42.     # 產生圖片
  43.     @picture_sprites = []
  44.     for i in 1..50
  45.       @picture_sprites.push(Sprite_Picture.new(@viewport2,
  46.         $game_screen.pictures[i]))
  47.     end
  48.     # 產生計時器區塊
  49.     @timer_sprite = Sprite_Timer.new
  50.     # 更新畫面
  51.     update
  52.   end
  53.   #--------------------------------------------------------------------------
  54.   # ● 釋放
  55.   #--------------------------------------------------------------------------
  56.   def dispose
  57.     # 釋放元件地圖
  58.     @tilemap.tileset.dispose
  59.     for i in 0..6
  60.       @tilemap.autotiles[i].dispose
  61.     end
  62.     @tilemap.dispose
  63.     # 釋放全景平面
  64.     @panorama.dispose
  65.     # 釋放霧平面
  66.     @fog.dispose
  67.     # 釋放角色活動區塊
  68.     for sprite in @character_sprites
  69.       sprite.dispose
  70.     end
  71.     # 釋放天氣
  72.     @weather.dispose
  73.     # 釋放圖片
  74.     for sprite in @picture_sprites
  75.       sprite.dispose
  76.     end
  77.     # 釋放計時器區塊
  78.     @timer_sprite.dispose
  79.     # 釋放顯示連接埠
  80.     @viewport1.dispose
  81.     @viewport2.dispose
  82.     @viewport3.dispose
  83.   end
  84.   #--------------------------------------------------------------------------
  85.   # ● 更新畫面
  86.   #--------------------------------------------------------------------------
  87.   def update
  88.     # 全景與現在的情況有差異發情況下
  89.     if @panorama_name != $game_map.panorama_name or
  90.        @panorama_hue != $game_map.panorama_hue
  91.       @panorama_name = $game_map.panorama_name
  92.       @panorama_hue = $game_map.panorama_hue
  93.       if @panorama.bitmap != nil
  94.         @panorama.bitmap.dispose
  95.         @panorama.bitmap = nil
  96.       end
  97.       if @panorama_name != ""
  98.         @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
  99.       end
  100.       Graphics.frame_reset
  101.     end
  102.     # 霧與現在的情況有差異的情況下
  103.     if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
  104.       @fog_name = $game_map.fog_name
  105.       @fog_hue = $game_map.fog_hue
  106.       if @fog.bitmap != nil
  107.         @fog.bitmap.dispose
  108.         @fog.bitmap = nil
  109.       end
  110.       if @fog_name != ""
  111.         @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
  112.       end
  113.       Graphics.frame_reset
  114.     end
  115.     # 更新元件地圖
  116.     @tilemap.ox = $game_map.display_x / 4
  117.     @tilemap.oy = $game_map.display_y / 4
  118.     @tilemap.update
  119.     # 更新全景平面
  120.     @panorama.ox = $game_map.display_x / 8
  121.     @panorama.oy = $game_map.display_y / 8
  122.     # 更新霧平面
  123.     @fog.zoom_x = $game_map.fog_zoom / 100.0
  124.     @fog.zoom_y = $game_map.fog_zoom / 100.0
  125.     @fog.opacity = $game_map.fog_opacity
  126.     @fog.blend_type = $game_map.fog_blend_type
  127.     @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
  128.     @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
  129.     @fog.tone = $game_map.fog_tone
  130.     # 更新角色活動區塊
  131.     for sprite in @character_sprites
  132.       sprite.update
  133.     end
  134.     # 更新天候圖形
  135.     @weather.type = $game_screen.weather_type
  136.     @weather.max = $game_screen.weather_max
  137.     @weather.ox = $game_map.display_x / 4
  138.     @weather.oy = $game_map.display_y / 4
  139.     @weather.update
  140.     # 更新圖片
  141.     for sprite in @picture_sprites
  142.       sprite.update
  143.     end
  144.     # 更新計時器區塊
  145.     @timer_sprite.update
  146.     # 設定畫面的色調與震動位置
  147.     @viewport1.tone = $game_screen.tone
  148. #####################################################
  149.     if $game_switches[596] == true
  150.        @viewport1.oy = $game_screen.shake
  151.     else
  152.        @viewport1.ox = $game_screen.shake
  153.     end
  154. #####################################################
  155.     # 設定畫面的閃爍色彩
  156.     @viewport3.color = $game_screen.flash_color
  157.     # 更新顯示連接埠
  158.     @viewport1.update
  159.     @viewport3.update
  160.   end
  161. end
复制代码
甘泉幻想物语 试玩版4.0
https://rpg.blue/forum.php?mod=viewthread&tid=369490&page=1&extra=#pid2534710
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部