2020-10-15 05:49:49 +02:00
|
|
|
#include "common.h"
|
2021-07-21 13:43:13 +02:00
|
|
|
#include "script_api/battle.h"
|
2021-03-27 18:48:33 +01:00
|
|
|
#include "ld_addrs.h"
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-03-19 19:17:02 +01:00
|
|
|
extern s16 D_802809F6;
|
|
|
|
extern s32 D_80280A30;
|
|
|
|
extern s32 D_8029F254;
|
|
|
|
|
2021-07-21 13:43:13 +02:00
|
|
|
// Almost good but some reorderings at the beginning
|
|
|
|
#ifdef NON_MATCHING
|
|
|
|
void btl_merlee_on_start_turn(void) {
|
|
|
|
PlayerData* playerData = &gPlayerData;
|
|
|
|
BattleStatus* battleStatus = &gBattleStatus;
|
|
|
|
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
|
|
|
|
|
|
|
if (!(battleStatus->flags2 & 0x40) && battleStatus->unk_8A != 3 && battleStatus->unk_8A != 4 && playerData->merleeCastsLeft > 0) {
|
|
|
|
if (playerData->merleeTurnCount <= 0) {
|
|
|
|
s32 d100 = rand_int(100);
|
|
|
|
|
|
|
|
if (currentEncounter->currentEnemy != NULL) {
|
|
|
|
if (currentEncounter->currentEnemy->flags & 0x40000) {
|
|
|
|
if (d100 <= 45) {
|
|
|
|
playerData->merleeSpellType = 1;
|
|
|
|
} else if (d100 <= 90) {
|
|
|
|
playerData->merleeSpellType = 2;
|
|
|
|
} else {
|
|
|
|
playerData->merleeSpellType = 3;
|
|
|
|
}
|
|
|
|
} else if (d100 <= 30) {
|
|
|
|
playerData->merleeSpellType = 1;
|
|
|
|
} else if (d100 <= 60) {
|
|
|
|
playerData->merleeSpellType = 2;
|
|
|
|
} else if (d100 <= 80) {
|
|
|
|
playerData->merleeSpellType = 3;
|
|
|
|
} else {
|
|
|
|
playerData->merleeSpellType = 4;
|
|
|
|
}
|
|
|
|
} else if (d100 <= 30) {
|
|
|
|
playerData->merleeSpellType = 1;
|
|
|
|
} else if (d100 <= 60) {
|
|
|
|
playerData->merleeSpellType = 2;
|
|
|
|
} else if (d100 <= 80) {
|
|
|
|
playerData->merleeSpellType = 3;
|
|
|
|
} else {
|
|
|
|
playerData->merleeSpellType = 4;
|
|
|
|
}
|
|
|
|
playerData->merleeTurnCount = rand_int(10) + 6;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (playerData->merleeTurnCount >= 2) {
|
|
|
|
playerData->merleeTurnCount--;
|
|
|
|
} else {
|
|
|
|
playerData->merleeTurnCount = 0;
|
|
|
|
battleStatus->unk_8A = playerData->merleeSpellType;
|
|
|
|
playerData->merleeCastsLeft--;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#else
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_merlee_on_start_turn);
|
2021-07-21 13:43:13 +02:00
|
|
|
#endif
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_merlee_on_first_strike);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_set_state(s32 battleState) {
|
2021-03-25 09:56:12 +01:00
|
|
|
s32 flags = gBattleStatus.flags2;
|
2021-03-19 19:17:02 +01:00
|
|
|
gBattleState = battleState;
|
2021-07-19 13:49:30 +02:00
|
|
|
D_800DC4E0 = 1;
|
|
|
|
gBattleState2 = 0;
|
2021-03-19 19:17:02 +01:00
|
|
|
|
2021-03-25 09:56:12 +01:00
|
|
|
flags &= 0x40;
|
|
|
|
if (flags) {
|
|
|
|
switch (battleState) {
|
2021-03-19 19:17:02 +01:00
|
|
|
case 14:
|
|
|
|
battleState = 16;
|
|
|
|
break;
|
|
|
|
case 13:
|
|
|
|
battleState = 15;
|
|
|
|
break;
|
|
|
|
case 7:
|
|
|
|
battleState = 8;
|
|
|
|
break;
|
|
|
|
case 8:
|
|
|
|
battleState = 7;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
gBattleState = battleState;
|
|
|
|
}
|
|
|
|
}
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_normal_start);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_normal_start(void) {
|
|
|
|
set_screen_overlay_color(0, 0, 0, 0);
|
2021-03-19 19:17:02 +01:00
|
|
|
|
|
|
|
if (D_80280A30 > 255) {
|
2021-06-30 04:27:12 +02:00
|
|
|
set_screen_overlay_params_front(0, 255.0f);
|
2021-03-19 19:17:02 +01:00
|
|
|
} else {
|
2021-06-30 04:27:12 +02:00
|
|
|
set_screen_overlay_params_front(0, D_80280A30);
|
2021-03-19 19:17:02 +01:00
|
|
|
}
|
|
|
|
}
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_begin_turn);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_begin_turn(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_begin_player_turn);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_begin_player_turn(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-07-21 13:43:13 +02:00
|
|
|
void btl_state_update_switch_to_player(void) {
|
|
|
|
Actor* player = gBattleStatus.playerActor;
|
|
|
|
Actor* partner = gBattleStatus.partnerActor;
|
|
|
|
s32 i;
|
|
|
|
|
|
|
|
if (gBattleState2 == 0) {
|
|
|
|
gBattleStatus.flags1 &= ~0x80000;
|
|
|
|
reset_actor_turn_info();
|
|
|
|
gBattleStatus.selectedMoveID = 0;
|
|
|
|
gBattleStatus.unk_86 = 0x7F;
|
|
|
|
gBattleStatus.blockResult = 0x7F;
|
|
|
|
gBattleStatus.flags1 |= 8;
|
|
|
|
player->flags |= 0x8000000;
|
|
|
|
if (partner != NULL) {
|
|
|
|
partner->flags |= 0xC000000;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 0; i < ARRAY_COUNT(gBattleStatus.enemyActors); i++) {
|
|
|
|
Actor* enemy = gBattleStatus.enemyActors[i];
|
|
|
|
if (enemy != NULL) {
|
|
|
|
enemy->flags |= 0x80000;
|
|
|
|
enemy->flags |= 0x8000000;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
btl_set_state(0xC);
|
|
|
|
}
|
|
|
|
}
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_switch_to_player(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_begin_partner_turn);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_begin_partner_turn(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-07-21 13:43:13 +02:00
|
|
|
void btl_state_update_switch_to_partner(s32 arg0) {
|
|
|
|
Actor* player = gBattleStatus.playerActor;
|
|
|
|
Actor* partner = gBattleStatus.partnerActor;
|
|
|
|
s32 i;
|
|
|
|
|
|
|
|
if (gBattleState2 == 0) {
|
|
|
|
reset_actor_turn_info();
|
|
|
|
gBattleStatus.flags1 |= 0x80000;
|
|
|
|
gBattleStatus.selectedMoveID = 0;
|
|
|
|
gBattleStatus.unk_86 = 0x7F;
|
|
|
|
gBattleStatus.blockResult = 0x7F;
|
|
|
|
gBattleStatus.flags1 |= 8;
|
|
|
|
player->flags |= 0xC000000;
|
|
|
|
partner->flags |= 0x8000000;
|
|
|
|
|
|
|
|
for (i = 0; i < ARRAY_COUNT(gBattleStatus.enemyActors); i++) {
|
|
|
|
Actor* enemy = gBattleStatus.enemyActors[i];
|
|
|
|
if (enemy != NULL) {
|
|
|
|
enemy->flags |= 0x80000;
|
|
|
|
enemy->flags |= 0x8000000;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
btl_set_state(0xC);
|
|
|
|
}
|
|
|
|
}
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_switch_to_partner(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-04-13 09:47:52 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", func_80242FE0);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
|
|
|
void func_80243910(void) {
|
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_update_prepare_menu(void) {
|
2021-03-24 09:39:43 +01:00
|
|
|
BattleStatus* battleStatus = &gBattleStatus;
|
2021-03-19 19:17:02 +01:00
|
|
|
|
|
|
|
battleStatus->unk_4D = -1;
|
|
|
|
battleStatus->unk_4E = -1;
|
|
|
|
battleStatus->unk_4F = -1;
|
|
|
|
battleStatus->unk_50 = -1;
|
|
|
|
battleStatus->unk_51 = -1;
|
|
|
|
battleStatus->unk_52 = -1;
|
|
|
|
battleStatus->stratsLastCursorPos = -1;
|
|
|
|
battleStatus->unk_5D = -1;
|
|
|
|
battleStatus->unk_62 = -1;
|
|
|
|
battleStatus->unk_63 = -1;
|
|
|
|
|
2021-04-13 09:47:52 +02:00
|
|
|
dma_copy(_415D90_ROM_START, _415D90_ROM_END, _415D90_VRAM);
|
2021-03-19 19:17:02 +01:00
|
|
|
|
|
|
|
if (battleStatus->flags1 & 0x80000) {
|
2021-06-30 04:27:12 +02:00
|
|
|
btl_set_state(14);
|
2021-07-19 13:49:30 +02:00
|
|
|
} else if (gBattleState2 == 70) {
|
2021-06-30 04:27:12 +02:00
|
|
|
btl_set_state(13);
|
2021-07-19 13:49:30 +02:00
|
|
|
gBattleState2 = 70;
|
2021-03-19 19:17:02 +01:00
|
|
|
} else {
|
2021-06-30 04:27:12 +02:00
|
|
|
btl_set_state(13);
|
2021-03-19 19:17:02 +01:00
|
|
|
}
|
|
|
|
}
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_prepare_menu(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_end_turn);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_end_turn(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_update_1C(void) {
|
2020-11-18 06:20:28 +01:00
|
|
|
func_8024E40C(2);
|
2021-06-30 04:27:12 +02:00
|
|
|
btl_set_state(12);
|
2020-11-18 06:20:28 +01:00
|
|
|
}
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_1C(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_victory);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_victory(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_end_training_battle);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_end_training_battle(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_end_battle);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_draw_end_battle);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-07-21 13:43:13 +02:00
|
|
|
void btl_state_update_defend(void) {
|
|
|
|
Actor* player = gBattleStatus.playerActor;
|
|
|
|
ScriptInstance* script;
|
|
|
|
|
|
|
|
switch (gBattleState2) {
|
|
|
|
case 0:
|
|
|
|
gBattleStatus.unk_8C = 0;
|
|
|
|
gBattleStatus.battlePhase = 6;
|
|
|
|
player->takeTurnScript = script = start_script(PlayerScriptDispatcher, 10, 0);
|
|
|
|
player->takeTurnID = script->id;
|
|
|
|
gBattleState2 = 1;
|
|
|
|
script->owner1.enemyID = 0;
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
if (!does_script_exist(player->takeTurnID) && gBattleStatus.unk_8C == 0) {
|
|
|
|
btl_set_state(0x16);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_defend(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_run_away);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_run_away(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_defeat);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_defeat(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2020-11-18 06:20:28 +01:00
|
|
|
ApiStatus EnablePartnerBlur(ScriptInstance* script, s32 isInitialCall) {
|
|
|
|
enable_partner_blur();
|
|
|
|
return ApiStatus_DONE2;
|
|
|
|
}
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2020-11-18 06:20:28 +01:00
|
|
|
ApiStatus DisablePartnerBlur(ScriptInstance* script, s32 isInitialCall) {
|
|
|
|
disable_partner_blur();
|
|
|
|
return ApiStatus_DONE2;
|
|
|
|
}
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_change_partner);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_change_partner(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_player_move);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_player_move(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_end_player_turn);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void filemenu_main_update_code(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_partner_move);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_partner_move(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_update_end_partner_turn(void) {
|
2021-07-19 13:49:30 +02:00
|
|
|
BattleStatus* battleStatus = &gBattleStatus;
|
2021-03-19 19:17:02 +01:00
|
|
|
|
2021-07-19 13:49:30 +02:00
|
|
|
if (gBattleState2 == 0) {
|
2021-03-19 19:17:02 +01:00
|
|
|
battleStatus->flags2 |= 0x4;
|
2021-06-30 04:27:12 +02:00
|
|
|
if (!btl_check_enemies_defeated()) {
|
2021-03-19 19:17:02 +01:00
|
|
|
battleStatus->flags1 &= ~0x80000;
|
|
|
|
battleStatus->flags2 &= ~0x10;
|
|
|
|
|
|
|
|
if (battleStatus->unk_94 < 0) {
|
|
|
|
battleStatus->unk_94 = 0;
|
2021-06-30 04:27:12 +02:00
|
|
|
btl_set_state(6);
|
2021-03-19 19:17:02 +01:00
|
|
|
} else {
|
2021-06-30 04:27:12 +02:00
|
|
|
btl_set_state(9);
|
2021-03-19 19:17:02 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_end_partner_turn(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_next_enemy);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_next_enemy(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_enemy_move);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_enemy_move(void) {
|
2020-10-15 05:49:49 +02:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_first_strike);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-07-21 13:43:13 +02:00
|
|
|
void btl_state_draw_first_stike(void) {
|
|
|
|
if (D_802809F6 == -1 && D_8029F254 != 0) {
|
|
|
|
if (D_80280A30 == 0) {
|
|
|
|
set_screen_overlay_params_front(255, -1.0f);
|
|
|
|
} else {
|
|
|
|
if (!(gGameStatusPtr->demoFlags & 1)) {
|
|
|
|
D_80280A30 -= 20;
|
|
|
|
} else {
|
|
|
|
D_80280A30 -= 50;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (D_80280A30 < 0) {
|
|
|
|
D_80280A30 = 0;
|
|
|
|
}
|
|
|
|
set_screen_overlay_params_front(0, D_80280A30);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_partner_striking_first);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_partner_striking_first(void) {
|
2021-03-19 19:17:02 +01:00
|
|
|
if (D_8029F254 != 0) {
|
2021-04-23 13:55:30 +02:00
|
|
|
if (D_80280A30 == 0) {
|
2021-06-30 04:27:12 +02:00
|
|
|
set_screen_overlay_params_front(255, -1.0f);
|
2021-03-19 19:17:02 +01:00
|
|
|
} else {
|
2021-04-23 13:55:30 +02:00
|
|
|
D_80280A30 -= 20;
|
|
|
|
if (D_80280A30 < 0) {
|
|
|
|
D_80280A30 = 0;
|
2021-03-19 19:17:02 +01:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
set_screen_overlay_params_front(0, D_80280A30);
|
2021-03-19 19:17:02 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_enemy_striking_first);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_enemy_striking_first(void) {
|
2021-03-19 19:17:02 +01:00
|
|
|
if (D_8029F254 != 0) {
|
2021-04-23 13:55:30 +02:00
|
|
|
if (D_80280A30 == 0) {
|
2021-06-30 04:27:12 +02:00
|
|
|
set_screen_overlay_params_front(255, -1.0f);
|
2021-03-19 19:17:02 +01:00
|
|
|
} else {
|
2021-04-23 13:55:30 +02:00
|
|
|
D_80280A30 -= 20;
|
|
|
|
if (D_80280A30 < 0) {
|
|
|
|
D_80280A30 = 0;
|
2021-03-19 19:17:02 +01:00
|
|
|
}
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
set_screen_overlay_params_front(0, D_80280A30);
|
2021-03-19 19:17:02 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
INCLUDE_ASM(s32, "16F740", btl_state_update_end_demo_battle);
|
2020-10-15 05:49:49 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_draw_end_demo_battle(void) {
|
2021-03-19 19:17:02 +01:00
|
|
|
if (D_802809F6 == -1) {
|
2021-06-30 04:27:12 +02:00
|
|
|
set_screen_overlay_color(0, 0, 0, 0);
|
|
|
|
set_screen_overlay_params_front(0, D_80280A30);
|
2021-03-19 19:17:02 +01:00
|
|
|
}
|
|
|
|
}
|