# ▽△▽ XRXSv32. MeLT_Title. マップinタイトル ▽△▽ # # publish 2010/ 4/ 2 # update - /27 # #============================================================================== # カスタマイズポイント #============================================================================== module XRXSV32 # # オープニングマップinタイトル として使用するマップID, X座標, Y座標 # OPMAP_ID = 4 X = 0 Y = 0 # # タイトルコマンド配列 # 0 : ニューゲーム # 1 : コンティニュー # 2 : シャットダウン # Commands = [0, 1, 2] end #============================================================================== # 操作不能マップ #============================================================================== class Scene_TitleMap < Scene_Map def start! start perform_transition post_start end def end! pre_terminate terminate end def update_call_menu end def update_call_debug end def update_scene_change end end #============================================================================== # タイトル画面では操作不能に #============================================================================== class Game_Player < Game_Character alias xrxsv32_movable? movable? def movable? return false if $scene.is_a?(Scene_Title) return xrxsv32_movable? end end #============================================================================== # 起動済み確認 #============================================================================== module Cache XRXS = [] TitleI = 0 end #============================================================================== # タイトルコマンド #============================================================================== class Window_SlideCommand < Window_Command end class Window_TitleCommand < Window_SlideCommand def initialize s1 = Vocab::new_game s2 = Vocab::continue s3 = Vocab::shutdown names = [s1,s2,s3] commands = [] for i in XRXSV32::Commands commands.push(names[i]) end super(172, commands) self.y = 288 @clear_style = (defined? slide_sprites and self.slide_sprites.size >= 1) if @clear_style self.opacity = 0 self.x = Graphics.width - self.width + 12 else self.x = (Graphics.width - self.width) / 2 end end def command_id return XRXSV32::Commands[self.index] end def slidein! super(-8, 4, 4) end end #============================================================================== # タイトル画面 #============================================================================== class Scene_Title < Scene_Base #-------------------------------------------------------------------------- # ● コマンドウィンドウの作成 * #-------------------------------------------------------------------------- def create_command_window @command_window = Window_TitleCommand.new if @continue_enabled # コンティニューが有効な場合 n = XRXSV32::Commands.index(1).to_i @command_window.index = n # カーソルを合わせる else # 無効な場合 @command_window.draw_item(1, false) # コマンドを半透明表示にする end if Cache::XRXS[Cache::TitleI] @command_window.openness = 255 @command_window.active = true @command_window.update_slide_done! rescue nil else @command_window.openness = 0 @command_window.active = false @command_window.visible = false end Cache::XRXS[Cache::TitleI] = true end #-------------------------------------------------------------------------- # ● コマンドウィンドウを開く #-------------------------------------------------------------------------- def open_command_window end #-------------------------------------------------------------------------- # ● フレーム更新 [再定義] #-------------------------------------------------------------------------- def update super @map_in_scene.update @command_window.update if @command_window.openness == 0 if Input.trigger?(Input::C) Sound.play_decision @command_window.open @command_window.active = true @command_window.slidein! rescue nil @command_window.visible = true end elsif @command_window.openness == 255 if Input.trigger?(Input::B) Sound.play_cancel @command_window.close @command_window.active = false @command_window.slideout! rescue nil elsif Input.trigger?(Input::C) case @command_window.command_id when 0 # ニューゲーム create_game_objects #*再作成 command_new_game when 1 # コンティニュー command_continue when 2 # シャットダウン command_shutdown end end end end #-------------------------------------------------------------------------- # マップinタイトルの作成と解放 #-------------------------------------------------------------------------- alias xrxsv32_create_title_graphic create_title_graphic def create_title_graphic xrxsv32_create_title_graphic @sprite.opacity = 0 #$game_party.setup_starting_members $game_map.setup(XRXSV32::OPMAP_ID) $game_player.moveto(XRXSV32::X, XRXSV32::Y) $game_player.refresh @map_in_scene = Scene_TitleMap.new @map_in_scene.start! end alias xrxsv32_dispose_title_graphic dispose_title_graphic def dispose_title_graphic xrxsv32_dispose_title_graphic @map_in_scene.end! end end