void Scene_Battle_Rpg2k::CreateUi() { Scene_Battle::CreateUi(); CreateBattleTargetWindow(); CreateBattleCommandWindow(); battle_message_window.reset(new Window_BattleMessage(0, (SCREEN_TARGET_HEIGHT - 80), SCREEN_TARGET_WIDTH, 80)); if (!Game_Battle::IsEscapeAllowed()) { options_window->DisableItem(2); } }
void Scene_Battle::CreateWindows() { CreateBattleOptionWindow(); CreateBattleTargetWindow(); CreateBattleCommandWindow(); CreateBattleMessageWindow(); help_window.reset(new Window_Help(0, 0, 320, 32)); help_window->SetVisible(false); item_window.reset(new Window_Item(0, 160, 320, 80)); item_window->SetHelpWindow(help_window.get()); item_window->Refresh(); item_window->SetIndex(0); skill_window.reset(new Window_Skill(0, 160, 320, 80)); skill_window->SetHelpWindow(help_window.get()); status_window.reset(new Window_BattleStatus(0, 160, 320 - 76, 80)); }
void Scene_Battle_Rpg2k3::CreateUi() { Scene_Battle::CreateUi(); CreateBattleTargetWindow(); CreateBattleCommandWindow(); // No escape. FIXME: Only enabled when party has initiative. options_window->DisableItem(2); enemy_status_window.reset(new Window_BattleStatus(0, 0, SCREEN_TARGET_WIDTH - 76, 80, true)); enemy_status_window->SetVisible(false); ally_cursor.reset(new Sprite()); enemy_cursor.reset(new Sprite()); if (Data::battlecommands.battle_type == RPG::BattleCommands::BattleType_gauge) { item_window->SetY(64); skill_window->SetY(64); // Default window too small for 4 actors status_window.reset(new Window_BattleStatus(0, SCREEN_TARGET_HEIGHT - 80, SCREEN_TARGET_WIDTH, 80)); } if (Data::battlecommands.battle_type != RPG::BattleCommands::BattleType_traditional) { int transp = Data::battlecommands.transparency == RPG::BattleCommands::Transparency_transparent ? 128 : 255; options_window->SetBackOpacity(transp); item_window->SetBackOpacity(transp); skill_window->SetBackOpacity(transp); help_window->SetBackOpacity(transp); status_window->SetBackOpacity(transp); enemy_status_window->SetBackOpacity(transp); } FileRequestAsync* request = AsyncHandler::RequestFile("System2", Data::system.system2_name); request->Bind(&Scene_Battle_Rpg2k3::OnSystem2Ready, this); request->Start(); }
void Scene_Battle_Rpg2k::OptionSelected() { switch (options_window->GetIndex()) { case 0: // Battle Game_System::SePlay(Game_System::GetSystemSE(Game_System::SFX_Decision)); CreateBattleTargetWindow(); auto_battle = false; SetState(State_SelectActor); break; case 1: // Auto Battle auto_battle = true; SetState(State_AutoBattle); Game_System::SePlay(Game_System::GetSystemSE(Game_System::SFX_Decision)); break; case 2: // Escape if (!Game_Battle::IsEscapeAllowed()) { Game_System::SePlay(Game_System::GetSystemSE(Game_System::SFX_Buzzer)); } else { Game_System::SePlay(Game_System::GetSystemSE(Game_System::SFX_Decision)); SetState(State_Escape); } break; } }
void Scene_Battle_Rpg2k3::SetState(Scene_Battle::State new_state) { previous_state = state; state = new_state; if (state == State_SelectActor && auto_battle) state = State_AutoBattle; options_window->SetActive(false); status_window->SetActive(false); command_window->SetActive(false); item_window->SetActive(false); skill_window->SetActive(false); target_window->SetActive(false); switch (state) { case State_Start: break; case State_SelectOption: options_window->SetActive(true); break; case State_SelectActor: // no-op break; case State_AutoBattle: // no-op break; case State_SelectCommand: RefreshCommandWindow(); command_window->SetActive(true); break; case State_SelectEnemyTarget: CreateBattleTargetWindow(); break; case State_Battle: // no-op break; case State_SelectAllyTarget: status_window->SetActive(true); break; case State_SelectItem: item_window->SetActive(true); //item_window->SetActor(Game_Battle::GetActiveActor()); item_window->Refresh(); break; case State_SelectSkill: skill_window->SetActive(true); skill_window->SetActor(active_actor->GetId()); skill_window->SetIndex(0); break; case State_Victory: case State_Defeat: case State_Escape: // no-op break; } options_window->SetVisible(false); status_window->SetVisible(false); command_window->SetVisible(false); item_window->SetVisible(false); skill_window->SetVisible(false); help_window->SetVisible(false); target_window->SetVisible(false); switch (state) { case State_Start: break; case State_SelectOption: options_window->SetVisible(true); status_window->SetVisible(true); status_window->SetX(76); status_window->SetIndex(-1); status_window->Refresh(); break; case State_AutoBattle: case State_SelectActor: command_window->SetIndex(-1); status_window->SetVisible(true); status_window->SetX(0); status_window->SetChoiceMode(Window_BattleStatus::ChoiceMode_None); if (Data::battlecommands.battle_type != RPG::BattleCommands::BattleType_gauge) { command_window->SetVisible(true); } break; case State_SelectCommand: status_window->SetVisible(true); command_window->SetVisible(true); status_window->SetX(0); break; case State_SelectEnemyTarget: status_window->SetVisible(true); target_window->SetActive(true); if (Data::battlecommands.battle_type != RPG::BattleCommands::BattleType_gauge) { command_window->SetVisible(true); } if (Data::battlecommands.battle_type == RPG::BattleCommands::BattleType_traditional) { target_window->SetVisible(true); } break; case State_SelectAllyTarget: status_window->SetVisible(true); status_window->SetX(0); command_window->SetVisible(true); break; case State_Battle: // no-op break; case State_SelectItem: item_window->SetVisible(true); item_window->SetHelpWindow(help_window.get()); help_window->SetVisible(true); break; case State_SelectSkill: skill_window->SetVisible(true); skill_window->SetHelpWindow(help_window.get()); help_window->SetVisible(true); break; case State_Victory: case State_Defeat: status_window->SetVisible(true); command_window->SetVisible(true); status_window->SetX(0); break; case State_Escape: status_window->SetVisible(true); command_window->SetVisible(true); status_window->SetX(0); break; } }
void Scene_Battle_Rpg2k3::AttackSelected() { CreateBattleTargetWindow(); Scene_Battle::AttackSelected(); }