Beispiel #1
0
void Scene_Battle::Update() {
	options_window->Update();
	status_window->Update();
	command_window->Update();
	help_window->Update();
	item_window->Update();
	skill_window->Update();
	target_window->Update();
	message_window->Update();

	if (!message_window->GetVisible()) {
		ProcessActions();
	}

	if (!Game_Message::message_waiting) {
		ProcessInput();
	}

	//DoAuto();

	UpdateBackground();
	//UpdateCursors();
	//UpdateSprites();
	//UpdateFloaters();
	//UpdateAnimations();

	Game_Battle::Update();

	Main_Data::game_screen->Update();
}
Beispiel #2
0
void Scene_Battle::Update() {
	options_window->Update();
	status_window->Update();
	command_window->Update();
	help_window->Update();
	item_window->Update();
	skill_window->Update();
	target_window->Update();
	message_window->Update();

	// Query Timer before and after update.
	// If it reached zero during update was a running battle timer.
	int timer1 = Main_Data::game_party->GetTimer(Game_Party::Timer1);
	int timer2 = Main_Data::game_party->GetTimer(Game_Party::Timer2);
	Main_Data::game_party->UpdateTimers();
	if ((Main_Data::game_party->GetTimer(Game_Party::Timer1) == 0 && timer1 > 0) ||
		(Main_Data::game_party->GetTimer(Game_Party::Timer2) == 0 && timer2 > 0)) {
		Scene::Pop();
	}

	bool events_finished = Game_Battle::UpdateEvents();

	if (Game_Message::visible && events_finished && !message_window->IsNextMessagePossible()) {
		// Handle message box closing when not caused by event e.g. victory message
		Game_Message::closing = true;
	}

	if (!Game_Message::visible && events_finished) {
		ProcessActions();
		ProcessInput();
	}

	UpdateBackground();

	Game_Battle::Update();

	Main_Data::game_screen->Update();

	if (Game_Battle::IsTerminating()) {
		Scene::Pop();
	}
}
void Scene_Battle::Update() {
	options_window->Update();
	status_window->Update();
	command_window->Update();
	help_window->Update();
	item_window->Update();
	skill_window->Update();
	target_window->Update();
	message_window->Update();

	// Query Timer before and after update.
	// If it reached zero during update was a running battle timer.
	int timer1 = Main_Data::game_party->GetTimer(Game_Party::Timer1);
	int timer2 = Main_Data::game_party->GetTimer(Game_Party::Timer2);
	Main_Data::game_party->UpdateTimers();
	if ((Main_Data::game_party->GetTimer(Game_Party::Timer1) == 0 && timer1 > 0) ||
		(Main_Data::game_party->GetTimer(Game_Party::Timer2) == 0 && timer2 > 0)) {
		Scene::Pop();
	}

	if (Game_Battle::UpdateEvents()) {
		ProcessActions();
		ProcessInput();
	}

	//DoAuto();

	UpdateBackground();
	//UpdateCursors();
	//UpdateSprites();
	//UpdateFloaters();
	//UpdateAnimations();

	Game_Battle::Update();

	Main_Data::game_screen->Update();

	if (Game_Battle::IsTerminating()) {
		Scene::Pop();
	}
}
Beispiel #4
0
void Scene_Battle::Update() {
	options_window->Update();
	status_window->Update();
	command_window->Update();
	help_window->Update();
	item_window->Update();
	skill_window->Update();
	target_window->Update();
	message_window->Update();

	// Query Timer before and after update.
	// If it reached zero during update was a running battle timer.
	int timer1 = Main_Data::game_party->GetTimer(Game_Party::Timer1);
	int timer2 = Main_Data::game_party->GetTimer(Game_Party::Timer2);
	Main_Data::game_party->UpdateTimers();
	if ((Main_Data::game_party->GetTimer(Game_Party::Timer1) == 0 && timer1 > 0) ||
		(Main_Data::game_party->GetTimer(Game_Party::Timer2) == 0 && timer2 > 0)) {
		Scene::Pop();
	}

	bool events_finished = Game_Battle::UpdateEvents();

	if (Game_Temp::gameover) {
		Game_Temp::gameover = false;
		Scene::Push(std::make_shared<Scene_Gameover>());
	}

	if (!Game_Message::visible && events_finished) {
		ProcessActions();
		ProcessInput();
	}

	Game_Battle::Update();

	Main_Data::game_screen->Update();

	if (Game_Battle::IsTerminating()) {
		Scene::Pop();
	}
}