# # テストプレー時のゲームスピードを変更 #  (C)2005 TYPE74RX-T # # ★ 最大フレームレートを設定 RX_T_MAX_FRAME_RATE = 120 class Window_Message < Window_Selectable #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update super # フェードインの場合 if @fade_in self.contents_opacity += 24 if @input_number_window != nil @input_number_window.contents_opacity += 24 end if self.contents_opacity == 255 @fade_in = false end return end # 数値入力中の場合 if @input_number_window != nil @input_number_window.update # 決定 if Input.trigger?(Input::C) $game_system.se_play($data_system.decision_se) $game_variables[$game_temp.num_input_variable_id] = @input_number_window.number $game_map.need_refresh = true # 数値入力ウィンドウを解放 @input_number_window.dispose @input_number_window = nil terminate_message end return end # メッセージ表示中の場合 if @contents_showing # 選択肢の表示中でなければポーズサインを表示 if $game_temp.choice_max == 0 self.pause = true end # キャンセル if Input.trigger?(Input::B) if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0 $game_system.se_play($data_system.cancel_se) $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1) terminate_message end end # 決定 # ★ デバッグの時はCボタン押しっぱなしで会話が進行 if $DEBUG if Input.press?(Input::C) if $game_temp.choice_max > 0 $game_system.se_play($data_system.decision_se) $game_temp.choice_proc.call(self.index) end terminate_message end else if Input.trigger?(Input::C) if $game_temp.choice_max > 0 $game_system.se_play($data_system.decision_se) $game_temp.choice_proc.call(self.index) end terminate_message end end return end # フェードアウト中以外で表示待ちのメッセージか選択肢がある場合 if @fade_out == false and $game_temp.message_text != nil @contents_showing = true $game_temp.message_window_showing = true reset_window refresh Graphics.frame_reset self.visible = true self.contents_opacity = 0 if @input_number_window != nil @input_number_window.contents_opacity = 0 end @fade_in = true return end # 表示すべきメッセージがないが、ウィンドウが可視状態の場合 if self.visible @fade_out = true self.opacity -= 48 if self.opacity == 0 self.visible = false @fade_out = false $game_temp.message_window_showing = false end return end end end class Scene_Map #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update # ループ loop do # マップ、インタプリタ、プレイヤーの順に更新 # (この更新順序は、イベントを実行する条件が満たされているときに # プレイヤーに一瞬移動する機会を与えないなどの理由で重要) $game_map.update $game_system.map_interpreter.update $game_player.update # システム (タイマー)、画面を更新 $game_system.update $game_screen.update # プレイヤーの場所移動中でなければループを中断 unless $game_temp.player_transferring break end # 場所移動を実行 transfer_player # トランジション処理中の場合、ループを中断 if $game_temp.transition_processing break end end # スプライトセットを更新 @spriteset.update # メッセージウィンドウを更新 @message_window.update # ゲームオーバーの場合 if $game_temp.gameover # ゲームオーバー画面に切り替え $scene = Scene_Gameover.new return end # タイトル画面に戻す場合 if $game_temp.to_title # タイトル画面に切り替え $scene = Scene_Title.new return end # トランジション処理中の場合 if $game_temp.transition_processing # トランジション処理中フラグをクリア $game_temp.transition_processing = false # トランジション実行 if $game_temp.transition_name == "" Graphics.transition(20) else Graphics.transition(40, "Graphics/Transitions/" + $game_temp.transition_name) end end # メッセージウィンドウ表示中の場合 if $game_temp.message_window_showing return end # エンカウント カウントが 0 で、エンカウントリストが空ではない場合 if $game_player.encounter_count == 0 and $game_map.encounter_list != [] # イベント実行中かエンカウント禁止中でなければ unless $game_system.map_interpreter.running? or $game_system.encounter_disabled # トループを決定 n = rand($game_map.encounter_list.size) troop_id = $game_map.encounter_list[n] # トループが有効なら if $data_troops[troop_id] != nil # バトル呼び出しフラグをセット $game_temp.battle_calling = true $game_temp.battle_troop_id = troop_id $game_temp.battle_can_escape = true $game_temp.battle_can_lose = false $game_temp.battle_proc = nil end end end # B ボタンが押された場合 if Input.trigger?(Input::B) # イベント実行中かメニュー禁止中でなければ unless $game_system.map_interpreter.running? or $game_system.menu_disabled # メニュー呼び出しフラグと SE 演奏フラグをセット $game_temp.menu_calling = true $game_temp.menu_beep = true end end # デバッグモードが ON かつ F9 キーが押されている場合 if $DEBUG and Input.press?(Input::F9) # デバッグ呼び出しフラグをセット $game_temp.debug_calling = true end # ★ デバッグモードが ON かつ F7 キーが押されている場合 if $DEBUG and Input.press?(Input::F7) # ★ フレームレートを上げる Graphics.frame_rate = RX_T_MAX_FRAME_RATE end # ★ デバッグモードが ON かつ F8 キーが押されている場合 if $DEBUG and Input.press?(Input::F8) # ★ フレームレートを戻す Graphics.frame_rate = 40 end # プレイヤーの移動中ではない場合 unless $game_player.moving? # 各種画面の呼び出しを実行 if $game_temp.battle_calling call_battle elsif $game_temp.shop_calling call_shop elsif $game_temp.name_calling call_name elsif $game_temp.menu_calling call_menu elsif $game_temp.save_calling call_save elsif $game_temp.debug_calling call_debug end end end end