mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
btl_state_update_celebration (Thanks Unnunu!) (#668)
* btl_state_update_celebration (Thanks Unnunu\!) * fixes * warnings
This commit is contained in:
parent
086ab5bf24
commit
bcffe508ba
@ -45,4 +45,6 @@ WINDOW_UPDATE_FUNC(filemenu_update_show_name_confirm);
|
||||
|
||||
WINDOW_UPDATE_FUNC(main_menu_window_update);
|
||||
|
||||
void filemenu_draw_file_name(u8*, s32, s32, s32, s32, s32, s32, s32);
|
||||
|
||||
#endif
|
||||
|
@ -172,6 +172,7 @@ s32 dispatch_damage_event_actor_0(Actor* actor, s32 damageAmount, s32 event);
|
||||
|
||||
// Text
|
||||
MessagePrintState* msg_get_printer_for_msg(s32 msgID, s32* a1);
|
||||
void msg_printer_set_origin_pos(MessagePrintState* msgPrintState, s32 x, s32 y);
|
||||
|
||||
void get_screen_coords(s32 camID, f32 x, f32 y, f32 z, s32* screenX, s32* screenY, s32* screenZ);
|
||||
|
||||
@ -354,6 +355,7 @@ void btl_draw_upgrade_windows(s32);
|
||||
void btl_state_draw_celebration(void);
|
||||
|
||||
void func_8024F7C8(void);
|
||||
void func_80263E08(Actor*, ActorPart*, s32);
|
||||
void func_80266978(void);
|
||||
void func_80266B14(void);
|
||||
s32 func_8024E584(void);
|
||||
@ -507,6 +509,7 @@ Evt* get_script_by_index(s32 index);
|
||||
|
||||
s32 get_lava_reset_pos(f32* x, f32* y, f32* z);
|
||||
void start_rumble(s32, s32);
|
||||
void start_rumble_type(u32);
|
||||
void start_falling(void);
|
||||
|
||||
void set_action_state(s32 actionState);
|
||||
@ -715,7 +718,7 @@ void func_800EF300(void);
|
||||
void enable_player_shadow(void);
|
||||
s32 get_msg_lines(s32 messageID);
|
||||
void set_window_properties(s32 panelID, s32 posX, s32 posY, s32 width, s32 height, u8, void* drawContents, void* drawContentsArg, s8 parent);
|
||||
void set_window_update(s32 panelID, WindowUpdateFunc);
|
||||
void set_window_update(s32 panelID, s32);
|
||||
void set_windows_visible(s32 groupIdx);
|
||||
void snd_stop_sound(s32 soundID);
|
||||
void snd_start_sound_with_shift(s32 soundID, u8 volume, u8 pan, s16 pitchShift);
|
||||
@ -738,6 +741,7 @@ void draw_entity_model_E(s32, Mtx*);
|
||||
void draw_entity_model_A(s32, Mtx*);
|
||||
void free_entity_model_by_index(s32 idx);
|
||||
void func_8024E40C(s32);
|
||||
void func_8024E484(s16, s16, s16, s16, s32, s32, s32, s32);
|
||||
void btl_cam_set_zoffset(s16);
|
||||
void btl_cam_target_actor(s32);
|
||||
void btl_cam_set_zoom(s16);
|
||||
@ -780,6 +784,7 @@ void func_800E96C8(void);
|
||||
void hide_popup_menu(void);
|
||||
void destroy_popup_menu(void);
|
||||
void func_800E98C4(void);
|
||||
void func_800F0D5C(void);
|
||||
s32 get_item_count(void);
|
||||
s32 get_stored_empty_count(void);
|
||||
s32 get_stored_count(void);
|
||||
|
23
src/168590.c
23
src/168590.c
@ -7,13 +7,6 @@ extern MenuWindowBP D_8024A134[1];
|
||||
extern s8 D_8024C090;
|
||||
extern s32 D_8024C100_C09980[3];
|
||||
|
||||
void filemenu_update_show_options_left(s32 windowIndex, s32* flags, s32* posX, s32* posY, s32* posZ, f32* scaleX,
|
||||
f32* scaleY, f32* rotX, f32* rotY, f32* rotZ, s32* darkening, s32* opacity);
|
||||
void filemenu_update_show_options_right(s32 windowIndex, s32* flags, s32* posX, s32* posY, s32* posZ, f32* scaleX,
|
||||
f32* scaleY, f32* rotX, f32* rotY, f32* rotZ, s32* darkening, s32* opacity);
|
||||
void filemenu_update_show_options_bottom(s32 windowIndex, s32* flags, s32* posX, s32* posY, s32* posZ, f32* scaleX,
|
||||
f32* scaleY, f32* rotX, f32* rotY, f32* rotZ, s32* darkening, s32* opacity);
|
||||
|
||||
void filemenu_info_draw_message_contents(MenuPanel* menu, s32 baseX, s32 baseY) {
|
||||
s8 page = menu->page;
|
||||
|
||||
@ -66,18 +59,18 @@ void filemenu_info_handle_input(void) {
|
||||
switch(page) {
|
||||
case 1:
|
||||
menu->page = 0;
|
||||
set_window_update(0x33, filemenu_update_show_options_left);
|
||||
set_window_update(0x34, filemenu_update_show_options_right);
|
||||
set_window_update(0x35, filemenu_update_show_options_bottom);
|
||||
set_window_update(0x37, filemenu_update_show_options_bottom);
|
||||
set_window_update(0x33, (s32)filemenu_update_show_options_left);
|
||||
set_window_update(0x34, (s32)filemenu_update_show_options_right);
|
||||
set_window_update(0x35, (s32)filemenu_update_show_options_bottom);
|
||||
set_window_update(0x37, (s32)filemenu_update_show_options_bottom);
|
||||
filemenu_set_selected(menu, 0, 2);
|
||||
break;
|
||||
case 4:
|
||||
menu->page = 0;
|
||||
set_window_update(0x33, filemenu_update_show_options_left);
|
||||
set_window_update(0x34, filemenu_update_show_options_right);
|
||||
set_window_update(0x35, filemenu_update_show_options_bottom);
|
||||
set_window_update(0x37, filemenu_update_show_options_bottom);
|
||||
set_window_update(0x33, (s32)filemenu_update_show_options_left);
|
||||
set_window_update(0x34, (s32)filemenu_update_show_options_right);
|
||||
set_window_update(0x35, (s32)filemenu_update_show_options_bottom);
|
||||
set_window_update(0x37, (s32)filemenu_update_show_options_bottom);
|
||||
filemenu_set_selected(menu, 1, 2);
|
||||
break;
|
||||
case 2:
|
||||
|
@ -9,8 +9,6 @@ extern s32 gSpeakingActorIdleAnim;
|
||||
extern Actor* gSpeakingActor;
|
||||
extern ActorPart* gSpeakingActorPart;
|
||||
|
||||
void msg_printer_set_origin_pos(MessagePrintState* printer, s32 x, s32 y);
|
||||
|
||||
ApiStatus ActorSpeak(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor;
|
||||
@ -264,7 +262,7 @@ ApiStatus func_802537C0(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 a0 = *args++;
|
||||
s32 a1 = *args++;
|
||||
f32 t1;
|
||||
u8 t1;
|
||||
f32 t2;
|
||||
s32 t3;
|
||||
|
||||
|
159
src/18C790.c
159
src/18C790.c
@ -2,6 +2,7 @@
|
||||
#include "effects.h"
|
||||
#include "hud_element.h"
|
||||
#include "ld_addrs.h"
|
||||
#include "pause/pause_common.h"
|
||||
|
||||
extern s32 D_80284150;
|
||||
extern s32 D_80284154[];
|
||||
@ -10,12 +11,8 @@ extern s32 D_802841B0;
|
||||
extern HudScript* D_802841B4;
|
||||
extern HudScript* D_802841B8;
|
||||
extern HudScript* D_802841BC;
|
||||
extern HudScript* D_802841C0[];
|
||||
extern HudScript* D_802841E8[];
|
||||
extern HudScript* D_80284210[];
|
||||
extern HudScript* D_80284238[];
|
||||
extern HudScript* D_80284260[];
|
||||
extern HudScript* D_80284288[];
|
||||
extern HudScript* D_802841C0[3][10];
|
||||
extern HudScript* D_80284238[3][10];
|
||||
extern EvtScript D_802842B0;
|
||||
extern EvtScript D_80284880;
|
||||
|
||||
@ -125,8 +122,6 @@ ApiStatus func_8025E14C(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
// Some issues with symbols
|
||||
#ifdef NON_MATCHING
|
||||
void btl_state_update_celebration(void) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
@ -137,6 +132,7 @@ void btl_state_update_celebration(void) {
|
||||
s32 id;
|
||||
s32 x;
|
||||
s32 y;
|
||||
s32 z;
|
||||
s32 width;
|
||||
|
||||
Evt* takeTurnScript;
|
||||
@ -159,7 +155,7 @@ void btl_state_update_celebration(void) {
|
||||
switch (gBattleState2) {
|
||||
case BATTLE_STATE2_UNK_0:
|
||||
if (battleStatus->pendingStarPoints <= 0) {
|
||||
player->flags &= ~0x8000000;
|
||||
player->flags &= ~ACTOR_FLAG_8000000;
|
||||
D_8029FB6C = battleStatus->totalStarPoints * 100;
|
||||
D_8029FB74 = 0;
|
||||
D_8029FB50 = 0;
|
||||
@ -168,8 +164,8 @@ void btl_state_update_celebration(void) {
|
||||
D_8029FB8C = 0;
|
||||
sfx_play_sound(SOUND_D4);
|
||||
|
||||
oldSP = playerData->starPoints;
|
||||
if (oldSP + battleStatus->totalStarPoints >= 100) {
|
||||
oldSP = playerData->starPoints + battleStatus->totalStarPoints;
|
||||
if (oldSP >= 100) {
|
||||
bgm_set_song(0, SONG_LEVEL_UP, 0, 250, 8);
|
||||
} else {
|
||||
bgm_set_song(0, SONG_BATTLE_END, 0, 250, 8);
|
||||
@ -188,7 +184,7 @@ void btl_state_update_celebration(void) {
|
||||
D_8029FB4C--;
|
||||
} else if (func_8024E584() != 0) {
|
||||
dma_copy(_7A89A0_ROM_START, _7A89A0_ROM_END, _7A89A0_VRAM);
|
||||
script = start_script(D_802842B0, 0xA, 0);
|
||||
script = start_script(&D_802842B0, 0xA, 0);
|
||||
D_8029FB78 = 0;
|
||||
D_8029FB54 = 20;
|
||||
D_8029FB70 = D_8029FB6C / D_8029FB54;
|
||||
@ -234,15 +230,15 @@ void btl_state_update_celebration(void) {
|
||||
partner->flags &= ~(ACTOR_FLAG_4000000 | ACTOR_FLAG_8000000);
|
||||
}
|
||||
battleStatus->battlePhase = 5;
|
||||
takeTurnScript = start_script(PlayerScriptDispatcher, 0xA, 0);
|
||||
player->takeTurnScript = takeTurnScript;
|
||||
player->takeTurnID = takeTurnScript->id;
|
||||
takeTurnScript->owner1.actorID = ACTOR_PLAYER;
|
||||
script = start_script(&PlayerScriptDispatcher, 0xA, 0);
|
||||
player->takeTurnScript = script;
|
||||
player->takeTurnID = script->id;
|
||||
script->owner1.actorID = ACTOR_PLAYER;
|
||||
if (partner != NULL) {
|
||||
takeTurnScript = start_script(partner->takeTurnScriptSource, 0xA, 0);
|
||||
partner->takeTurnScript = takeTurnScript;
|
||||
partner->takeTurnID = takeTurnScript->id;
|
||||
takeTurnScript->owner1.actorID = ACTOR_PARTNER;
|
||||
script = start_script(partner->takeTurnScriptSource, 0xA, 0);
|
||||
partner->takeTurnScript = script;
|
||||
partner->takeTurnID = script->id;
|
||||
script->owner1.actorID = ACTOR_PARTNER;
|
||||
}
|
||||
D_8029FB4C = 40;
|
||||
gBattleState2 = BATTLE_STATE2_UNK_3;
|
||||
@ -277,7 +273,7 @@ void btl_state_update_celebration(void) {
|
||||
}
|
||||
break;
|
||||
case BATTLE_STATE2_UNK_5:
|
||||
D_8029FB7C = start_script(D_80284880, 0xA, 0);
|
||||
D_8029FB7C = start_script(&D_80284880, 0xA, 0);
|
||||
D_8029FB4C = 25;
|
||||
gBattleState2 = BATTLE_STATE2_UNK_6;
|
||||
D_8029FB80 = D_8029FB7C->id;
|
||||
@ -291,10 +287,12 @@ void btl_state_update_celebration(void) {
|
||||
playerData->curFP = playerData->curMaxFP;
|
||||
x = player->currentPos.x + 0.0f;
|
||||
y = player->currentPos.y + 35.0f;
|
||||
fx_recover(0, x, y, (s32) player->currentPos.z, playerData->curHP);
|
||||
z = player->currentPos.z;
|
||||
fx_recover(0, x, y, z, playerData->curHP);
|
||||
x = player->currentPos.x + 20.0f;
|
||||
y = player->currentPos.y + 25.0f;
|
||||
fx_recover(1, x, y, (s32) player->currentPos.z, playerData->curFP);
|
||||
z = player->currentPos.z;
|
||||
fx_recover(1, x, y, z, playerData->curFP);
|
||||
playerData->specialBarsFilled = playerData->maxStarPower * 256;
|
||||
}
|
||||
|
||||
@ -304,22 +302,22 @@ void btl_state_update_celebration(void) {
|
||||
set_background_color_blend(0, 0, 0, ((10 - D_8029FB4C) * 0x10) & 0xF0);
|
||||
}
|
||||
} else {
|
||||
id = create_hud_element(D_802A9F0C);
|
||||
id = create_hud_element(&D_802A9F0C);
|
||||
D_8029FA80[0] = id;
|
||||
set_hud_element_render_pos(id, 310, 140);
|
||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||
|
||||
id = create_hud_element(D_802A9F5C);
|
||||
id = create_hud_element(&D_802A9F5C);
|
||||
D_8029FA80[1] = id;
|
||||
set_hud_element_render_pos(id, 158, 340);
|
||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||
|
||||
id = create_hud_element(D_802A9F84);
|
||||
id = create_hud_element(&D_802A9F84);
|
||||
D_8029FA80[3] = id;
|
||||
set_hud_element_render_pos(id, 158, 340);
|
||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||
|
||||
id = create_hud_element(D_802A9FAC);
|
||||
id = create_hud_element(&D_802A9FAC);
|
||||
D_8029FA80[2] = id;
|
||||
set_hud_element_render_pos(id, 6, 140);
|
||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||
@ -330,7 +328,7 @@ void btl_state_update_celebration(void) {
|
||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||
|
||||
for (i = 1; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
||||
id = create_hud_element(D_802841C0[0]);
|
||||
id = create_hud_element(D_802841C0[0][0]);
|
||||
D_8029FA90[0][i] = id;
|
||||
set_hud_element_render_pos(id, 160, 317);
|
||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||
@ -342,7 +340,7 @@ void btl_state_update_celebration(void) {
|
||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||
|
||||
for (i = 1; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
||||
id = create_hud_element(D_802841C0[10]);
|
||||
id = create_hud_element(D_802841C0[1][0]);
|
||||
D_8029FA90[1][i] = id;
|
||||
set_hud_element_render_pos(id, 312, 117);
|
||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||
@ -354,7 +352,7 @@ void btl_state_update_celebration(void) {
|
||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||
|
||||
for (i = 1; i < ARRAY_COUNT(D_8029FA90[20]); i++) {
|
||||
id = create_hud_element(D_802841C0[20]);
|
||||
id = create_hud_element(D_802841C0[2][0]);
|
||||
D_8029FA90[2][i] = id;
|
||||
set_hud_element_render_pos(id, 8, 117);
|
||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||
@ -365,10 +363,10 @@ void btl_state_update_celebration(void) {
|
||||
D_8029FB60[2] = 0;
|
||||
|
||||
if (playerData->hardMaxFP != 50) {
|
||||
id = D_8029FA90[0][1];
|
||||
fpTens = playerData->curMaxFP / 10;
|
||||
fpOnes = playerData->curMaxFP % 10;
|
||||
set_hud_element_anim(id, D_80284238[fpTens]);
|
||||
id = D_8029FA90[0][1];
|
||||
set_hud_element_anim(id, D_80284238[0][fpTens]);
|
||||
if (fpTens != 0) {
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
}
|
||||
@ -376,22 +374,22 @@ void btl_state_update_celebration(void) {
|
||||
set_hud_element_render_pos(id, x - 14, y + 46);
|
||||
|
||||
id = D_8029FA90[0][2];
|
||||
set_hud_element_anim(id, D_80284238[fpOnes]);
|
||||
set_hud_element_anim(id, D_80284238[0][fpOnes]);
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
get_hud_element_render_pos(id, &x, &y);
|
||||
set_hud_element_render_pos(id, x - 8, y + 46);
|
||||
|
||||
id = D_8029FA90[0][3];
|
||||
set_hud_element_anim(id, D_802AA320);
|
||||
set_hud_element_anim(id, &D_802AA320);
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
get_hud_element_render_pos(id, &x, &y);
|
||||
set_hud_element_render_pos(id, x - 3, y + 46);
|
||||
|
||||
temp_v1_4 = playerData->curMaxFP + 5;
|
||||
|
||||
fpTens = (playerData->curMaxFP + 5) / 10;
|
||||
fpOnes = (playerData->curMaxFP + 5) % 10;
|
||||
id = D_8029FA90[0][4];
|
||||
fpTens = temp_v1_4 / 10;
|
||||
fpOnes = temp_v1_4 % 10;
|
||||
set_hud_element_anim(id, D_802841C0[fpTens]);
|
||||
set_hud_element_anim(id, D_802841C0[0][fpTens]);
|
||||
if (fpTens != 0) {
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
}
|
||||
@ -399,7 +397,7 @@ void btl_state_update_celebration(void) {
|
||||
set_hud_element_render_pos(id, x + 3, y + 46);
|
||||
|
||||
id = D_8029FA90[0][5];
|
||||
set_hud_element_anim(id, D_802841C0[fpOnes]);
|
||||
set_hud_element_anim(id, D_802841C0[0][fpOnes]);
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
get_hud_element_render_pos(id, &x, &y);
|
||||
set_hud_element_render_pos(id, x + 10, y + 46);
|
||||
@ -407,7 +405,7 @@ void btl_state_update_celebration(void) {
|
||||
id = D_8029FA90[0][4];
|
||||
fpTens = playerData->curMaxFP / 10;
|
||||
fpOnes = playerData->curMaxFP % 10;
|
||||
set_hud_element_anim(id, D_802841C0[fpTens]);
|
||||
set_hud_element_anim(id, D_802841C0[0][fpTens]);
|
||||
if (fpTens != 0) {
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
}
|
||||
@ -415,8 +413,8 @@ void btl_state_update_celebration(void) {
|
||||
set_hud_element_render_pos(id, x - 6, y + 46);
|
||||
|
||||
id = D_8029FA90[0][5];
|
||||
set_hud_element_anim(id, D_802841C0[fpOnes]);
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
set_hud_element_anim(id, D_802841C0[0][fpOnes]);
|
||||
clear_hud_element_flags(id, 2);
|
||||
get_hud_element_render_pos(id, &x, &y);
|
||||
set_hud_element_render_pos(id, x + 2, y + 46);
|
||||
D_8029FB60[1] = 1;
|
||||
@ -424,7 +422,7 @@ void btl_state_update_celebration(void) {
|
||||
|
||||
if (is_ability_active(0xC)) {
|
||||
id = D_8029FAA8;
|
||||
set_hud_element_anim(id, gItemHudScripts[gItemTable[248].iconID][0]);
|
||||
set_hud_element_anim(id, gItemHudScripts[gItemTable[248].iconID].enabled);
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
set_hud_element_scale(id, 0.5f);
|
||||
get_hud_element_render_pos(id, &x, &y);
|
||||
@ -432,13 +430,11 @@ void btl_state_update_celebration(void) {
|
||||
}
|
||||
|
||||
if (playerData->hardMaxHP != 50) {
|
||||
HudScript** scriptsTemp;
|
||||
|
||||
scriptsTemp = D_80284238;
|
||||
id = D_8029FA90[1][1];
|
||||
fpTens = playerData->curMaxHP / 10;
|
||||
fpOnes = playerData->curMaxHP % 10;
|
||||
set_hud_element_anim(id, D_80284260[fpTens]);
|
||||
|
||||
id = D_8029FA90[1][1];
|
||||
set_hud_element_anim(id, D_80284238[1][fpTens]);
|
||||
if (fpTens != 0) {
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
}
|
||||
@ -446,25 +442,22 @@ void btl_state_update_celebration(void) {
|
||||
set_hud_element_render_pos(id, x - 14, y + 46);
|
||||
|
||||
id = D_8029FA90[1][2];
|
||||
set_hud_element_anim(id, scriptsTemp[fpOnes + 10]);
|
||||
set_hud_element_anim(id, D_80284238[1][fpOnes]);
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
get_hud_element_render_pos(id, &x, &y);
|
||||
set_hud_element_render_pos(id, x - 8, y + 46);
|
||||
|
||||
id = D_8029FA90[1][3];
|
||||
set_hud_element_anim(id, D_802AA694);
|
||||
set_hud_element_anim(id, &D_802AA694);
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
get_hud_element_render_pos(id, &x, &y);
|
||||
set_hud_element_render_pos(id, x - 3, y + 46);
|
||||
|
||||
temp_v1_5 = playerData->curMaxHP + 5;
|
||||
id = D_8029FA90[1][4];
|
||||
fpTens = (playerData->curMaxHP + 5) / 10;
|
||||
fpOnes = (playerData->curMaxHP + 5) % 10;
|
||||
|
||||
fpTens = temp_v1_5 / 10;
|
||||
fpOnes = temp_v1_5 % 10;
|
||||
scriptsTemp = D_802841C0;
|
||||
new_var = scriptsTemp[fpOnes + 10];
|
||||
set_hud_element_anim(id, D_802841E8[fpTens]);
|
||||
id = D_8029FA90[1][4];
|
||||
set_hud_element_anim(id, D_802841C0[1][fpTens]);
|
||||
if (fpTens != 0) {
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
}
|
||||
@ -472,18 +465,16 @@ void btl_state_update_celebration(void) {
|
||||
set_hud_element_render_pos(id, x + 3, y + 46);
|
||||
|
||||
id = D_8029FA90[1][5];
|
||||
set_hud_element_anim(id, new_var);
|
||||
set_hud_element_anim(id, D_802841C0[1][fpOnes]);
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
get_hud_element_render_pos(id, &x, &y);
|
||||
set_hud_element_render_pos(id, x + 10, y + 46);
|
||||
} else {
|
||||
HudScript** scriptsTemp;
|
||||
scriptsTemp = D_802841C0;
|
||||
|
||||
id = D_8029FA90[1][4];
|
||||
fpTens = playerData->curMaxHP / 10;
|
||||
fpOnes = playerData->curMaxHP % 10;
|
||||
set_hud_element_anim(id, scriptsTemp[fpTens]);
|
||||
|
||||
id = D_8029FA90[1][4];
|
||||
set_hud_element_anim(id, D_802841C0[1][fpTens]);
|
||||
if (fpTens != 0) {
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
}
|
||||
@ -491,7 +482,7 @@ void btl_state_update_celebration(void) {
|
||||
set_hud_element_render_pos(id, x - 6, y + 46);
|
||||
|
||||
id = D_8029FA90[1][5];
|
||||
set_hud_element_anim(id, scriptsTemp[fpOnes + 10]);
|
||||
set_hud_element_anim(id, D_802841C0[1][fpOnes]);
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
get_hud_element_render_pos(id, &x, &y);
|
||||
set_hud_element_render_pos(id, x + 2, y + 46);
|
||||
@ -500,7 +491,7 @@ void btl_state_update_celebration(void) {
|
||||
|
||||
if (is_ability_active(4)) {
|
||||
id = D_8029FAC4;
|
||||
set_hud_element_anim(id, gItemHudScripts[gItemTable[231].iconID][0]);
|
||||
set_hud_element_anim(id, gItemHudScripts[gItemTable[231].iconID].enabled);
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
set_hud_element_scale(id, 0.5f);
|
||||
get_hud_element_render_pos(id, &x, &y);
|
||||
@ -508,15 +499,11 @@ void btl_state_update_celebration(void) {
|
||||
}
|
||||
|
||||
if (playerData->maxBP != 30) {
|
||||
HudScript** scriptsTemp;
|
||||
HudScript* new_var2;
|
||||
|
||||
new_var2 = D_802AAA08;
|
||||
scriptsTemp = D_80284238;
|
||||
id = D_8029FA90[2][1];
|
||||
fpTens = playerData->maxBP / 10;
|
||||
fpOnes = playerData->maxBP % 10;
|
||||
set_hud_element_anim(id, D_80284288[fpTens]);
|
||||
|
||||
id = D_8029FA90[2][1];
|
||||
set_hud_element_anim(id, D_80284238[2][fpTens]);
|
||||
if (fpTens != 0) {
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
}
|
||||
@ -524,23 +511,22 @@ void btl_state_update_celebration(void) {
|
||||
set_hud_element_render_pos(id, x - 14, y + 46);
|
||||
|
||||
id = D_8029FA90[2][2];
|
||||
set_hud_element_anim(id, scriptsTemp[fpOnes + 20]);
|
||||
set_hud_element_anim(id, D_80284238[2][fpOnes]);
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
get_hud_element_render_pos(id, &x, &y);
|
||||
set_hud_element_render_pos(id, x - 8, y + 46);
|
||||
|
||||
id = D_8029FA90[2][3];
|
||||
set_hud_element_anim(id, new_var2);
|
||||
set_hud_element_anim(id, &D_802AAA08);
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
get_hud_element_render_pos(id, &x, &y);
|
||||
set_hud_element_render_pos(id, x - 3, y + 46);
|
||||
temp_v1_5 = playerData->maxBP + 3;
|
||||
|
||||
scriptsTemp = D_802841C0;
|
||||
fpTens = (playerData->maxBP + 3) / 10;
|
||||
fpOnes = (playerData->maxBP + 3) % 10;
|
||||
|
||||
id = D_8029FA90[2][4];
|
||||
fpTens = temp_v1_5 / 10;
|
||||
fpOnes = temp_v1_5 % 10;
|
||||
set_hud_element_anim(id, D_80284210[fpTens]);
|
||||
set_hud_element_anim(id, D_802841C0[2][fpTens]);
|
||||
if (fpTens != 0) {
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
}
|
||||
@ -548,26 +534,26 @@ void btl_state_update_celebration(void) {
|
||||
set_hud_element_render_pos(id, x + 3, y + 46);
|
||||
|
||||
id = D_8029FA90[2][5];
|
||||
set_hud_element_anim(id, scriptsTemp[fpOnes + 20]);
|
||||
set_hud_element_anim(id, D_802841C0[2][fpOnes]);
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
get_hud_element_render_pos(id, &x, &y);
|
||||
set_hud_element_render_pos(id, x + 10, y + 46);
|
||||
} else {
|
||||
id = D_8029FA90[2][4];
|
||||
set_hud_element_anim(id, D_802841C0[23]);
|
||||
set_hud_element_anim(id, D_802841C0[2][3]);
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
get_hud_element_render_pos(id, &x, &y);
|
||||
set_hud_element_render_pos(id, x - 6, y + 46);
|
||||
|
||||
id = D_8029FA90[2][5];
|
||||
set_hud_element_anim(id, D_802841C0[20]);
|
||||
set_hud_element_anim(id, D_802841C0[2][0]);
|
||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||
get_hud_element_render_pos(id, &x, &y);
|
||||
set_hud_element_render_pos(id, x + 2, y + 46);
|
||||
D_8029FB60[2] = 1;
|
||||
}
|
||||
|
||||
D_8029FAE8 = id = create_hud_element(HudScript_ProjectorBeam);
|
||||
D_8029FAE8 = id = create_hud_element(&HudScript_ProjectorBeam);
|
||||
create_hud_element_transform_B(id);
|
||||
set_hud_element_render_pos(id, 156, 13);
|
||||
set_hud_element_tint(id, 255, 255, 255);
|
||||
@ -577,7 +563,7 @@ void btl_state_update_celebration(void) {
|
||||
set_hud_element_alpha(id, 200);
|
||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_8000 | HUD_ELEMENT_FLAGS_80);
|
||||
|
||||
D_8029FB48 = id = create_hud_element(D_802AAA30);
|
||||
D_8029FB48 = id = create_hud_element(&D_802AAA30);
|
||||
set_hud_element_render_pos(id, 0, 0);
|
||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||
battleStatus->currentSubmenu = 1;
|
||||
@ -638,7 +624,7 @@ void btl_state_update_celebration(void) {
|
||||
}
|
||||
break;
|
||||
case BATTLE_STATE2_UNK_8:
|
||||
if (battleStatus->currentButtonsPressed & 0x8000) {
|
||||
if (battleStatus->currentButtonsPressed & BUTTON_A) {
|
||||
if (D_8029FB60[battleStatus->currentSubmenu] == 0) {
|
||||
sfx_play_sound(SOUND_MENU_NEXT);
|
||||
sfx_play_sound(SOUND_749);
|
||||
@ -857,9 +843,6 @@ void btl_state_update_celebration(void) {
|
||||
}
|
||||
D_8029FB84 += 1;
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(s32, "18C790", btl_state_update_celebration);
|
||||
#endif
|
||||
|
||||
// d1, d2, d3 hell
|
||||
#ifdef NON_MATCHING
|
||||
|
@ -492,7 +492,7 @@ void update_coin_counter(void) {
|
||||
if ((uiStatus->displayCoins == playerData->coins) || (uiStatus->unk_6C[0] <= 30)) {
|
||||
uiStatus->unk_6C[0] -= 1;
|
||||
if (uiStatus->unk_6C[0] == 0) {
|
||||
set_window_update(20, basic_hidden_window_update);
|
||||
set_window_update(20, (s32)basic_hidden_window_update);
|
||||
uiStatus->unk_6C[1] = 15;
|
||||
D_8010CD10 = 0;
|
||||
D_8010CD12 = 1;
|
||||
@ -513,7 +513,7 @@ void show_coin_counter(void) {
|
||||
s32 index;
|
||||
|
||||
if ((D_8010CD10 != 0) || (D_8010CD12 != 0)) {
|
||||
set_window_update(0x14, WINDOW_UPDATE_HIDE);
|
||||
set_window_update(20, WINDOW_UPDATE_HIDE);
|
||||
if (uiStatus->iconIndex12 > -1) {
|
||||
free_hud_element(uiStatus->iconIndex10);
|
||||
free_hud_element(uiStatus->iconIndex11);
|
||||
@ -526,16 +526,16 @@ void show_coin_counter(void) {
|
||||
}
|
||||
|
||||
if (uiStatus->unk_6C[0] == 0) {
|
||||
set_window_properties(0x14, 0x20, 0xa4, 0x40, 0x14, 0x15, coin_counter_draw_content, 0, -1);
|
||||
set_window_update(0x14, basic_window_update);
|
||||
set_window_properties(0x14, 32, 164, 64, 20, 0x15, coin_counter_draw_content, 0, -1);
|
||||
set_window_update(20, (s32)basic_window_update);
|
||||
index = create_hud_element(HudScript_MenuTimes);
|
||||
uiStatus->iconIndex10 = index;
|
||||
set_hud_element_flags(index, HUD_ELEMENT_FLAGS_80);
|
||||
set_hud_element_tint(index, 0xff, 0xff, 0xff);
|
||||
set_hud_element_tint(index, 255, 255, 255);
|
||||
index = create_hud_element(HudScript_StatusCoin);
|
||||
uiStatus->iconIndex11 = index;
|
||||
set_hud_element_flags(index, HUD_ELEMENT_FLAGS_80);
|
||||
set_hud_element_tint(index, 0xff, 0xff, 0xff);
|
||||
set_hud_element_tint(index, 255, 255, 255);
|
||||
uiStatus->unk_6C[0] = 0;
|
||||
|
||||
if (uiStatus->unk_6C[2] < 0) {
|
||||
|
@ -399,20 +399,20 @@ s32 popup_menu_update(void) {
|
||||
case 8:
|
||||
case 9:
|
||||
case 12:
|
||||
set_window_update(0xE, basic_window_update);
|
||||
set_window_update(0xE, (s32)basic_window_update);
|
||||
sfx_play_sound(1);
|
||||
set_window_update(0x13, basic_window_update);
|
||||
set_window_update(0x13, (s32)basic_window_update);
|
||||
break;
|
||||
case 1:
|
||||
case 4:
|
||||
set_window_update(0xE, basic_window_update);
|
||||
set_window_update(0xE, (s32)basic_window_update);
|
||||
sfx_play_sound(2);
|
||||
set_window_update(0x13, basic_window_update);
|
||||
set_window_update(0x13, (s32)basic_window_update);
|
||||
break;
|
||||
case 10:
|
||||
case 11:
|
||||
case 13:
|
||||
set_window_update(0xE, basic_window_update);
|
||||
set_window_update(0xE, (s32)basic_window_update);
|
||||
sfx_play_sound(1);
|
||||
break;
|
||||
}
|
||||
@ -420,14 +420,14 @@ s32 popup_menu_update(void) {
|
||||
}
|
||||
|
||||
if (gPopupMenu->popupType == 3) {
|
||||
set_window_update(0x10, basic_window_update);
|
||||
set_window_update(0x14, basic_window_update);
|
||||
set_window_update(0x10, (s32)basic_window_update);
|
||||
set_window_update(0x14, (s32)basic_window_update);
|
||||
}
|
||||
if (gPopupMenu->popupType == 4) {
|
||||
set_window_update(0x12, basic_window_update);
|
||||
set_window_update(0x12, (s32)basic_window_update);
|
||||
}
|
||||
if (gPopupMenu->popupType == 5) {
|
||||
set_window_update(0x10, basic_window_update);
|
||||
set_window_update(0x10, (s32)basic_window_update);
|
||||
}
|
||||
D_8010D640 = 1;
|
||||
break;
|
||||
|
@ -474,7 +474,7 @@ s32 msg_printer_load_msg(s32 msgID, MessagePrintState* printer) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
void msg_printer_set_origin_pos(MessagePrintState* msgPrintState, s16 x, s16 y) {
|
||||
void msg_printer_set_origin_pos(MessagePrintState* msgPrintState, s32 x, s32 y) {
|
||||
msgPrintState->initOpenPos.x = x;
|
||||
msgPrintState->initOpenPos.y = y;
|
||||
|
||||
|
@ -375,7 +375,7 @@ void pause_tabs_update(MenuPanel* tab) {
|
||||
fpUpdate.func == pause_update_page_active_2 ||
|
||||
fpUpdate.func == basic_window_update ||
|
||||
fpUpdate.i == 1)) {
|
||||
set_window_update(gPauseTabsPageWindowIDs[i], fpUpdateInactive);
|
||||
set_window_update(gPauseTabsPageWindowIDs[i], (s32)fpUpdateInactive);
|
||||
flag = TRUE;
|
||||
}
|
||||
}
|
||||
@ -390,7 +390,7 @@ void pause_tabs_update(MenuPanel* tab) {
|
||||
D_8024F310 = 0;
|
||||
}
|
||||
|
||||
set_window_update(gPauseTabsPageWindowIDs[tab->col], fpUpdateActive);
|
||||
set_window_update(gPauseTabsPageWindowIDs[tab->col], (s32)fpUpdateActive);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -427,13 +427,13 @@ void replace_window_update(s32 windowID, s8 priority, WindowUpdateFunc pendingFu
|
||||
}
|
||||
}
|
||||
|
||||
void set_window_update(s32 windowID, WindowUpdateFunc func) {
|
||||
void set_window_update(s32 windowID, s32 func) {
|
||||
if (gWindows[windowID].flags & WINDOW_FLAGS_INITIALIZED) {
|
||||
if (func.func == gWindows[windowID].fpUpdate.func) {
|
||||
if (func == gWindows[windowID].fpUpdate.i) {
|
||||
gWindows[windowID].flags &= ~WINDOW_FLAGS_FPUPDATE_CHANGED;
|
||||
} else {
|
||||
gWindows[windowID].flags |= WINDOW_FLAGS_FPUPDATE_CHANGED | WINDOW_FLAGS_INITIAL_ANIMATION;
|
||||
gWindows[windowID].fpPending = func;
|
||||
gWindows[windowID].fpPending.i = func;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -464,7 +464,7 @@ void setup_pause_menu_tab(MenuWindowBP* bp, s32 count) {
|
||||
if (bp->style.defaultStyleID != -1) {
|
||||
gWindowStyles[bp->windowID] = bp->style;
|
||||
}
|
||||
set_window_update(bp->windowID, bp->fpUpdate);
|
||||
set_window_update(bp->windowID, bp->fpUpdate.i);
|
||||
gWindows[bp->windowID].flags |= bp->extraFlags;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user