Fix many warnings. (#557)

* Fix many warnings.

* Fix more warnings.

* More warnings

* Some more warnings

* Last fixes and address comments

* ehtan
This commit is contained in:
JoshDuMan 2021-12-20 10:59:25 -05:00 committed by GitHub
parent bc7899aaef
commit a5340e8dce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
65 changed files with 355 additions and 319 deletions

View File

@ -15,4 +15,12 @@ enum {
CAM_FLAG_1000 = 0x1000, CAM_FLAG_1000 = 0x1000,
}; };
void update_camera_mode_0(Camera*);
void update_camera_mode_1(Camera*);
void update_camera_mode_2(Camera*);
void update_camera_mode_4(Camera*);
void update_camera_mode_5(Camera*);
void update_camera_mode_6(Camera*);
void create_camera_leadplayer_matrix(Camera*);
#endif #endif

View File

@ -215,7 +215,7 @@ f32 clamp_angle(f32 theta);
s32 sign(s32 value); s32 sign(s32 value);
s32 func_80055448(s32); s32 func_80055448(s32);
s32 func_80055464(s32, s32); s32 func_80055464(s32, s32);
void func_800561A4(s32); s32 func_800E0208(void);
s32 battle_heap_create(void); s32 battle_heap_create(void);
void filemenu_init(s32); void filemenu_init(s32);
@ -577,6 +577,7 @@ void set_window_update(s32 panelID, s32);
void snd_stop_sound(s32 soundID); void snd_stop_sound(s32 soundID);
void partner_disable_input(void); void partner_disable_input(void);
void func_80268798(s32, s32, s32, s32); void func_80268798(s32, s32, s32, s32);
void func_8026880C(s32, s32, s32);
void func_802687E4(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4); void func_802687E4(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4);
void sfx_stop_sound(s32 soundID); void sfx_stop_sound(s32 soundID);
void close_message(MessagePrintState* msgPrintState); void close_message(MessagePrintState* msgPrintState);
@ -634,4 +635,56 @@ void open_status_menu_short(void);
void func_8024EFE0(f32 x, f32 y, f32 z, s32 a, s32 b, s32 c); void func_8024EFE0(f32 x, f32 y, f32 z, s32 a, s32 b, s32 c);
void func_802664DC(f32 x, f32 y, f32 z, s32 attack, s32 a); void func_802664DC(f32 x, f32 y, f32 z, s32 attack, s32 a);
void init_encounters_ui(void);
void initialize_collision(void);
void render_entities(void);
void render_player(void);
void render_generic_entities_world(void);
void render_effects_world(void);
s32 get_asset_offset(char*, s32*);
void initialize_status_menu(void);
void set_background_size(s16, s16, s16, s16);
void read_background_size(BackgroundHeader*);
void set_max_SP(s8);
void sync_status_menu(void);
void create_cameras_a(void);
void func_80045AC0(void);
void create_encounters(void);
void update_encounters_neutral(void);
void update_encounters_pre_battle(void);
void update_encounters_conversation(void);
void update_encounters_post_battle(void);
void update_merlee_messages(void);
void reset_background_settings(void);
void func_80138188(void);
void func_80268770(s32, s32, s32);
void func_80268C9C(void);
void func_802B6CF0_E2B3A0(void);
void func_80269160(void);
void load_tattle_flags(s32);
void remove_consumable(void);
void delete_shadow(s32);
void repartner_set_tether_distance(void);
void save_tattle_flags(s32);
void draw_merlee_messages(void);
void draw_encounters_conversation(void);
void draw_encounters_post_battle(void);
void draw_encounters_pre_battle(void);
void draw_encounters_neutral(void);
void show_first_strike_message(void);
void entity_upgrade_block_hide_content(s32);
void clear_player_status(void);
void clear_entity_models(void);
void clear_animator_list(void);
void clear_model_data(void);
void clear_sprite_shading_data(void);
void clear_character_set(void);
void clear_game_modes(void);
void clear_trigger_data(void);
void clear_script_list(void);
void clear_entity_data(s32);
void clear_effect_data(void);
void clear_area_flags(void);
#endif #endif

View File

@ -153,7 +153,9 @@ typedef enum ShapeTypes {
typedef ModelTreeInfo ModelTreeInfoList[0x200]; typedef ModelTreeInfo ModelTreeInfoList[0x200];
extern ModelTreeInfoList* mdl_currentModelTreeNodeInfo; extern ModelTreeInfoList* mdl_currentModelTreeNodeInfo;
void update_model_animator(s32);
void update_model_animator_with_transform(s32 animatorID, Mtx* mtx); void update_model_animator_with_transform(s32 animatorID, Mtx* mtx);
void set_mdl_custom_gfx_set(Model*, s32, u32);
s32 step_model_animator(ModelAnimator* animator); s32 step_model_animator(ModelAnimator* animator);
void animator_update_model_transforms(ModelAnimator* animator, Mtx* rootTransform); void animator_update_model_transforms(ModelAnimator* animator, Mtx* rootTransform);
void render_animated_model(s32 animatorID, Mtx* rootTransform); void render_animated_model(s32 animatorID, Mtx* rootTransform);

View File

@ -282,7 +282,7 @@ typedef struct Enemy {
s32 func_800490B4(EnemyTerritoryThing* arg0, Enemy* arg1, f32 arg2, f32 arg3, s32 arg4); s32 func_800490B4(EnemyTerritoryThing* arg0, Enemy* arg1, f32 arg2, f32 arg3, s32 arg4);
/// The default Npc::onUpdate and Npc::onRender callback. /// The default Npc::onUpdate and Npc::onRender callback.
void STUB_npc_callback(void); void STUB_npc_callback(Npc*);
void mtx_ident_mirror_y(Matrix4f mtx); void mtx_ident_mirror_y(Matrix4f mtx);

View File

@ -266,18 +266,6 @@ extern s16 gCurrentDoorSoundsSet;
extern s32 D_800D9620; extern s32 D_800D9620;
extern UNK_TYPE D_800E92D8; extern UNK_TYPE D_800E92D8;
extern UNK_TYPE D_80147574; extern UNK_TYPE D_80147574;
extern UNK_TYPE D_80109270;
extern UNK_TYPE D_80108558;
extern s32 D_80108248;
extern s32 D_80108518;
extern s32 D_80108270;
extern s32 D_80108538;
extern s32 D_80080FC4;
extern s32 D_801086AC;
extern s32 D_801083D8;
extern s32 D_80108068;
extern s32 D_80104BEC;
extern UNK_FUN_PTR(D_8010C920); extern UNK_FUN_PTR(D_8010C920);
extern s32 D_8010C940; extern s32 D_8010C940;
@ -400,7 +388,6 @@ extern s32 D_8038F800;
extern s32 D_803B5000; extern s32 D_803B5000;
extern HeapNode heap_battleHead; extern HeapNode heap_battleHead;
extern s32 D_80108A64;
extern s32 bMarioIdleAnims[]; extern s32 bMarioIdleAnims[];
extern s32 bMarioDefendAnims[]; extern s32 bMarioDefendAnims[];
extern s32 bPeachIdleAnims[]; extern s32 bPeachIdleAnims[];

View File

@ -2,14 +2,14 @@
#include "effects.h" #include "effects.h"
#include "hud_element.h" #include "hud_element.h"
extern s32 D_80108AAC; extern HudElementAnim D_80108AAC[];
extern s32 D_80108AD4; extern HudElementAnim D_80108AD4[];
extern s32 D_8029FB90; extern s32 D_8029FB90;
extern f32 D_8029FB94; extern f32 D_8029FB94;
extern EffectInstance* D_8029FB98; extern EffectInstance* D_8029FB98;
extern EffectInstance* D_8029FB9C; extern EffectInstance* D_8029FB9C;
extern HudElement* D_8029FBA0; extern s32 D_8029FBA0;
extern s16 D_8029FBA4; extern s16 D_8029FBA4;
extern s32 D_8029FBA8; extern s32 D_8029FBA8;
extern s32 D_8029FBAC; extern s32 D_8029FBAC;
@ -20,10 +20,10 @@ void func_80260A60(void) {
ActorPart* actorPart = &battleStatus->playerActor->partsTable[0]; ActorPart* actorPart = &battleStatus->playerActor->partsTable[0];
if (battleStatus->flags2 & 0x40) { if (battleStatus->flags2 & 0x40) {
actorPart->idleAnimations = &bPeachIdleAnims; actorPart->idleAnimations = bPeachIdleAnims;
set_animation(0, 0, 0xA0002); set_animation(0, 0, 0xA0002);
} else if (!battleStatus->outtaSightActive) { } else if (!battleStatus->outtaSightActive) {
actorPart->idleAnimations = &bMarioIdleAnims; actorPart->idleAnimations = bMarioIdleAnims;
} }
} }
@ -50,7 +50,7 @@ ApiStatus activate_defend_command(Evt* script, s32 isInitialCall) {
deduct_current_move_fp(); deduct_current_move_fp();
gBattleStatus.flags1 |= 0x400000; gBattleStatus.flags1 |= 0x400000;
actorPart->idleAnimations = &bMarioDefendAnims; actorPart->idleAnimations = bMarioDefendAnims;
set_animation(0, 0, 0x10014); set_animation(0, 0, 0x10014);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -135,7 +135,7 @@ ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) {
posY = player->currentPos.y; posY = player->currentPos.y;
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ);
D_8029FBA0 = create_hud_element(&D_80108A64); D_8029FBA0 = create_hud_element(D_80108A64);
set_hud_element_render_pos(D_8029FBA0, iconPosX + 36, iconPosY - 63); set_hud_element_render_pos(D_8029FBA0, iconPosX + 36, iconPosY - 63);
} }
@ -410,13 +410,13 @@ ApiStatus func_802619E8(Evt* script, s32 isInitialCall) {
screenY -= 19; screenY -= 19;
if (script->varTable[10] > 0) { if (script->varTable[10] > 0) {
D_8029FBAC = create_hud_element(&D_80108AD4); D_8029FBAC = create_hud_element(D_80108AD4);
set_hud_element_render_pos(D_8029FBAC, screenX, screenY); set_hud_element_render_pos(D_8029FBAC, screenX, screenY);
screenY += 9; screenY += 9;
} }
if (script->varTable[11] > 0 || script->varTable[12] > 0) { if (script->varTable[11] > 0 || script->varTable[12] > 0) {
D_8029FBA8 = create_hud_element(&D_80108AAC); D_8029FBA8 = create_hud_element(D_80108AAC);
set_hud_element_render_pos(D_8029FBA8, screenX, screenY); set_hud_element_render_pos(D_8029FBA8, screenX, screenY);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;

View File

@ -66,8 +66,8 @@ extern HudElementAnim D_8010760C[];
extern HudElementAnim D_801075E0[]; extern HudElementAnim D_801075E0[];
extern HudElementAnim D_80107314[]; extern HudElementAnim D_80107314[];
extern HudElementAnim D_8010701C[]; extern HudElementAnim D_8010701C[];
extern HudElementAnim* D_8010717C[]; extern HudElementAnim D_8010717C[];
extern HudElementAnim* D_80107474[]; extern HudElementAnim D_80107474[];
extern s32 D_800A0F40; extern s32 D_800A0F40;
extern PopupMessage D_800A0BC0[32]; extern PopupMessage D_800A0BC0[32];

View File

@ -1,7 +1,6 @@
#include "common.h" #include "common.h"
#include "hud_element.h" #include "hud_element.h"
extern s32 D_80104A28;
extern s32 D_80107D48; extern s32 D_80107D48;
extern s32 D_80107D98; extern s32 D_80107D98;
extern s32 D_80107CA8; extern s32 D_80107CA8;
@ -28,8 +27,8 @@ extern u8 D_802AD000;
extern u8 D_802AD001; extern u8 D_802AD001;
extern s16 D_802AD006; extern s16 D_802AD006;
extern s16 D_802AD008; extern s16 D_802AD008;
extern s32* D_802AD010; extern s32 D_802AD010[];
extern s32* D_802AD028; extern s32 D_802AD028[];
extern s32 D_802AD040; extern s32 D_802AD040;
extern s32 D_802AD044; extern s32 D_802AD044;
extern s32 D_802AD048; extern s32 D_802AD048;
@ -87,7 +86,7 @@ extern s32 D_802AD66C;
extern s8 D_802AD673; extern s8 D_802AD673;
extern s32 D_802AD678[]; extern s32 D_802AD678[];
extern s32 D_802AD690[]; extern s32 D_802AD690[];
extern s32* D_802AD6C0[]; extern s32 D_802AD6C0[];
extern s32 D_802AD6D4; extern s32 D_802AD6D4;
s16 D_802AB340[] = { 0x001C, 0x0028 }; s16 D_802AB340[] = { 0x001C, 0x0028 };
@ -104,9 +103,9 @@ s32 D_802AB390[] = { &D_80108974, 0x8010899C };
s32 D_802AB398[] = { &D_80108974, 0x8010899C, 0x80107990, 0x801079BC, 0x801079E8, 0x80107A14, 0x80107A40, 0x80107A6C, 0x80107A98, 0x80107AC4, 0x80107AF0, 0x80107B1C, 0x80107B48, 0x80107B74, 0x80107BA0, 0x80107BCC, 0x80107BF8, 0x80107C24, 0x80107C50, 0x80107C7C, &D_80108974, 0x8010899C, &D_80108974, 0x8010899C }; s32 D_802AB398[] = { &D_80108974, 0x8010899C, 0x80107990, 0x801079BC, 0x801079E8, 0x80107A14, 0x80107A40, 0x80107A6C, 0x80107A98, 0x80107AC4, 0x80107AF0, 0x80107B1C, 0x80107B48, 0x80107B74, 0x80107BA0, 0x80107BCC, 0x80107BF8, 0x80107C24, 0x80107C50, 0x80107C7C, &D_80108974, 0x8010899C, &D_80108974, 0x8010899C };
s32 D_802AB3F8[] = { &D_80107CA8, &D_80107CF8, &D_80107D48, &D_80107D98, &D_80107DE8, &D_80107CA8, &D_80107E88, &D_80107ED8, &D_80107F28, &D_80107E38, &D_80107FC8, &D_80107FC8, &D_80107FC8, &D_80107FC8, &D_80107FC8, &D_80107FC8 }; s32* D_802AB3F8[] = { &D_80107CA8, &D_80107CF8, &D_80107D48, &D_80107D98, &D_80107DE8, &D_80107CA8, &D_80107E88, &D_80107ED8, &D_80107F28, &D_80107E38, &D_80107FC8, &D_80107FC8, &D_80107FC8, &D_80107FC8, &D_80107FC8, &D_80107FC8 };
s32 D_802AB438[] = { &D_80107CD0, &D_80107D20, &D_80107D70, &D_80107DC0, &D_80107E10, &D_80107CD0, &D_80107EB0, &D_80107F00, &D_80107F50, &D_80107E60, &D_80107FF0, &D_80107FF0, &D_80107FF0, &D_80107FF0, &D_80107FF0, &D_80107FF0 }; s32* D_802AB438[] = { &D_80107CD0, &D_80107D20, &D_80107D70, &D_80107DC0, &D_80107E10, &D_80107CD0, &D_80107EB0, &D_80107F00, &D_80107F50, &D_80107E60, &D_80107FF0, &D_80107FF0, &D_80107FF0, &D_80107FF0, &D_80107FF0, &D_80107FF0 };
s32 D_802AB478[] = { 0x80292200 }; s32 D_802AB478[] = { 0x80292200 };
@ -182,8 +181,8 @@ void func_802A10B8(void) {
s32 i; s32 i;
for (i = 0; i < main_menu_numOptions; i++) { for (i = 0; i < main_menu_numOptions; i++) {
s32* icons1 = &D_802AD010; s32* icons1 = D_802AD010;
s32* icons2 = &D_802AD028; s32* icons2 = D_802AD028;
free_hud_element(icons1[i]); free_hud_element(icons1[i]);
free_hud_element(icons2[i]); free_hud_element(icons2[i]);
@ -201,6 +200,7 @@ void func_802A10B8(void) {
INCLUDE_ASM(s32, "415D90", func_802A11B0); INCLUDE_ASM(s32, "415D90", func_802A11B0);
void btl_draw_menu_wheel(void);
INCLUDE_ASM(s32, "415D90", btl_draw_menu_wheel); INCLUDE_ASM(s32, "415D90", btl_draw_menu_wheel);
// Very similar to func_802A45D8 - maybe can be used to reduce fake matches there // Very similar to func_802A45D8 - maybe can be used to reduce fake matches there
@ -282,7 +282,7 @@ void func_802A2910(void) {
s32* moveOptionCostUnitIconIDs; s32* moveOptionCostUnitIconIDs;
s32 i; s32 i;
moveOptionIconIDs = &battle_menu_moveOptionIconIDs; moveOptionIconIDs = battle_menu_moveOptionIconIDs;
for (i = 0; i < battle_menu_moveOptionCount; i++) { for (i = 0; i < battle_menu_moveOptionCount; i++) {
set_hud_element_tint(moveOptionIconIDs[i], 255, 255, 255); set_hud_element_tint(moveOptionIconIDs[i], 255, 255, 255);
@ -293,13 +293,13 @@ void func_802A2910(void) {
set_hud_element_tint(battle_menu_moveDownArrowIcon, 255, 255, 255); set_hud_element_tint(battle_menu_moveDownArrowIcon, 255, 255, 255);
set_hud_element_tint(battle_menu_moveTitleIcon, 255, 255, 255); set_hud_element_tint(battle_menu_moveTitleIcon, 255, 255, 255);
moveOptionCostUnitIconIDs = &battle_menu_moveOptionCostUnitIconIDs; moveOptionCostUnitIconIDs = battle_menu_moveOptionCostUnitIconIDs;
for (i = 0; i < battle_menu_moveOptionCount; i++) { for (i = 0; i < battle_menu_moveOptionCount; i++) {
set_hud_element_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255); set_hud_element_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255);
} }
set_hud_element_anim(battle_menu_moveCursorIcon, &D_80104A28); set_hud_element_anim(battle_menu_moveCursorIcon, D_80104A28);
set_window_update(1, 5); set_window_update(1, 5);
if (!battle_menu_hasSpiritsMenu) { if (!battle_menu_hasSpiritsMenu) {
@ -333,7 +333,7 @@ void func_802A2AB8(void) {
} }
set_window_update(8, 1); set_window_update(8, 1);
moveOptionIconIDs = &battle_menu_moveOptionIconIDs; moveOptionIconIDs = battle_menu_moveOptionIconIDs;
for (i = 0; i < battle_menu_moveOptionCount; i++) { for (i = 0; i < battle_menu_moveOptionCount; i++) {
set_hud_element_tint(moveOptionIconIDs[i], 255, 255, 255); set_hud_element_tint(moveOptionIconIDs[i], 255, 255, 255);
@ -344,13 +344,13 @@ void func_802A2AB8(void) {
set_hud_element_tint(battle_menu_moveDownArrowIcon, 255, 255, 255); set_hud_element_tint(battle_menu_moveDownArrowIcon, 255, 255, 255);
set_hud_element_tint(battle_menu_moveTitleIcon, 255, 255, 255); set_hud_element_tint(battle_menu_moveTitleIcon, 255, 255, 255);
moveOptionCostUnitIconIDs = &battle_menu_moveOptionCostUnitIconIDs; moveOptionCostUnitIconIDs = battle_menu_moveOptionCostUnitIconIDs;
for (i = 0; i < battle_menu_moveOptionCount; i++) { for (i = 0; i < battle_menu_moveOptionCount; i++) {
set_hud_element_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255); set_hud_element_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255);
} }
set_hud_element_anim(battle_menu_moveCursorIcon, &D_80104A28); set_hud_element_anim(battle_menu_moveCursorIcon, D_80104A28);
battle_menu_moveTextColor = 10; battle_menu_moveTextColor = 10;
D_802AD10F = 1; D_802AD10F = 1;
battle_menu_moveState = 20; battle_menu_moveState = 20;
@ -501,7 +501,7 @@ void func_802A47E0(void) {
set_hud_element_tint(D_802AD618, 0xFF, 0xFF, 0xFF); set_hud_element_tint(D_802AD618, 0xFF, 0xFF, 0xFF);
set_hud_element_tint(D_802AD61C, 0xFF, 0xFF, 0xFF); set_hud_element_tint(D_802AD61C, 0xFF, 0xFF, 0xFF);
set_hud_element_tint(D_802AD620, 0xFF, 0xFF, 0xFF); set_hud_element_tint(D_802AD620, 0xFF, 0xFF, 0xFF);
set_hud_element_anim(D_802AD618, &D_80104A28); set_hud_element_anim(D_802AD618, D_80104A28);
set_window_update(6, 5); set_window_update(6, 5);
set_window_update(7, 5); set_window_update(7, 5);
set_window_update(8, 1); set_window_update(8, 1);
@ -525,7 +525,7 @@ void func_802A48FC(void) {
set_hud_element_tint(D_802AD618, 0xFF, 0xFF, 0xFF); set_hud_element_tint(D_802AD618, 0xFF, 0xFF, 0xFF);
set_hud_element_tint(D_802AD61C, 0xFF, 0xFF, 0xFF); set_hud_element_tint(D_802AD61C, 0xFF, 0xFF, 0xFF);
set_hud_element_tint(D_802AD620, 0xFF, 0xFF, 0xFF); set_hud_element_tint(D_802AD620, 0xFF, 0xFF, 0xFF);
set_hud_element_anim(D_802AD618, &D_80104A28); set_hud_element_anim(D_802AD618, D_80104A28);
D_802AD614 = 10; D_802AD614 = 10;
D_802AD60B = 1; D_802AD60B = 1;
D_802AD604 = 20; D_802AD604 = 20;

View File

@ -7,7 +7,6 @@
extern UNK_FUN_PTR(D_8010C920); extern UNK_FUN_PTR(D_8010C920);
extern UNK_FUN_PTR(D_8010C93C); extern UNK_FUN_PTR(D_8010C93C);
extern s32 D_8010C940;
extern s32 D_8010C950; extern s32 D_8010C950;
extern s32 D_802BDF60; extern s32 D_802BDF60;
@ -17,7 +16,6 @@ s32 func_802B7140(void);
void func_802B72C0_E22870(void); void func_802B72C0_E22870(void);
void func_802B70B4_E201C4(void); void func_802B70B4_E201C4(void);
s32 func_800E0208(void);
void func_800E0330(void); void func_800E0330(void);
void func_800E0374(void); void func_800E0374(void);
void func_800E04D0(void); void func_800E04D0(void);
@ -713,7 +711,7 @@ void check_for_interactables(void) {
// TODO: Remove after func_800E24F8 is matching. // TODO: Remove after func_800E24F8 is matching.
static const pad[3] = { 0.0f, 0.0f, 0.0f }; static const s32 pad[3] = { 0.0f, 0.0f, 0.0f };
void func_800E0AD0(void) { void func_800E0AD0(void) {
if ((gPlayerStatusPtr->animFlags & 0x10) && (D_8010C958 != 0)) { if ((gPlayerStatusPtr->animFlags & 0x10) && (D_8010C958 != 0)) {

View File

@ -7,7 +7,6 @@
extern s32 D_8010C924; extern s32 D_8010C924;
extern s32 D_8010C964; extern s32 D_8010C964;
extern s32 D_8010C96C; // npc list index
extern s32 gSpinHistoryBufferPos; extern s32 gSpinHistoryBufferPos;
extern s16 D_8010C9B0; extern s16 D_8010C9B0;
extern s32 gSpinHistoryPosY[5]; extern s32 gSpinHistoryPosY[5];
@ -149,7 +148,7 @@ void set_action_state(s32 actionState) {
} }
if (playerStatus->unk_D8) { if (playerStatus->unk_D8) {
playerStatus->unk_D8[3][9] = 0xA; playerStatus->unk_D8[3][9] = 0xA; // TODO: Substruct? Currently UB.
playerStatus->unk_D8 = NULL; playerStatus->unk_D8 = NULL;
} }
} }

View File

@ -4,6 +4,18 @@
extern s32 D_800F7FA8; extern s32 D_800F7FA8;
extern s32 D_800F7F80[10]; extern s32 D_800F7F80[10];
extern HudElementAnim D_80108248[];
extern HudElementAnim D_80108518[];
extern HudElementAnim D_80108270[];
extern HudElementAnim D_80108538[];
extern HudElementAnim D_80080FC4[];
extern HudElementAnim D_801086AC[];
extern HudElementAnim D_801083D8[];
extern HudElementAnim D_80108068[];
extern HudElementAnim D_80104BEC[];
extern HudElementAnim D_80108558[];
extern HudElementAnim D_80109270[];
void clear_player_data(void) { void clear_player_data(void) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
s32 i; s32 i;
@ -320,68 +332,68 @@ void initialize_status_menu(void) {
close_status_menu(); close_status_menu();
iconIndex = create_hud_element(&D_80108248); iconIndex = create_hud_element(D_80108248);
uiStatus->hpIconIndexes[0] = iconIndex; uiStatus->hpIconIndexes[0] = iconIndex;
set_hud_element_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_hud_element_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_hud_element(&D_80108518); iconIndex = create_hud_element(D_80108518);
uiStatus->hpIconIndexes[1] = iconIndex; uiStatus->hpIconIndexes[1] = iconIndex;
set_hud_element_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_hud_element_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_hud_element(&D_80108270); iconIndex = create_hud_element(D_80108270);
uiStatus->fpIconIndexes[0] = iconIndex; uiStatus->fpIconIndexes[0] = iconIndex;
set_hud_element_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_hud_element_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_hud_element(&D_80108538); iconIndex = create_hud_element(D_80108538);
uiStatus->fpIconIndexes[1] = iconIndex; uiStatus->fpIconIndexes[1] = iconIndex;
set_hud_element_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_hud_element_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_hud_element(&D_80108558); iconIndex = create_hud_element(D_80108558);
uiStatus->coinIconIndex = iconIndex; uiStatus->coinIconIndex = iconIndex;
set_hud_element_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_hud_element_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_hud_element(&D_80080FC4); iconIndex = create_hud_element(D_80080FC4);
uiStatus->coinIconIndex2 = iconIndex; uiStatus->coinIconIndex2 = iconIndex;
set_hud_element_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_hud_element_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_hud_element(&D_801086AC); iconIndex = create_hud_element(D_801086AC);
uiStatus->starpointsIconIndex = iconIndex; uiStatus->starpointsIconIndex = iconIndex;
set_hud_element_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_hud_element_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_hud_element(&D_80104BEC); iconIndex = create_hud_element(D_80104BEC);
uiStatus->starpointsIconIndex2 = iconIndex; uiStatus->starpointsIconIndex2 = iconIndex;
set_hud_element_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_hud_element_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
newVar = create_hud_element(&D_80108068); newVar = create_hud_element(D_80108068);
iconIndex = newVar; iconIndex = newVar;
uiStatus->iconIndex8 = iconIndex; uiStatus->iconIndex8 = iconIndex;
set_hud_element_flags(iconIndex, 0x82); set_hud_element_flags(iconIndex, 0x82);
clear_hud_element_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_hud_element(&D_80108068); iconIndex = create_hud_element(D_80108068);
uiStatus->iconIndex9 = iconIndex; uiStatus->iconIndex9 = iconIndex;
set_hud_element_flags(iconIndex, 0x82); set_hud_element_flags(iconIndex, 0x82);
clear_hud_element_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_hud_element(&D_80108068); iconIndex = create_hud_element(D_80108068);
uiStatus->iconIndexA = iconIndex; uiStatus->iconIndexA = iconIndex;
set_hud_element_flags(iconIndex, 0x82); set_hud_element_flags(iconIndex, 0x82);
clear_hud_element_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_hud_element(&D_80108068); iconIndex = create_hud_element(D_80108068);
uiStatus->iconIndexB = iconIndex; uiStatus->iconIndexB = iconIndex;
set_hud_element_flags(iconIndex, 0x82); set_hud_element_flags(iconIndex, 0x82);
clear_hud_element_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_hud_element(&D_801083D8); iconIndex = create_hud_element(D_801083D8);
uiStatus->iconIndexC = iconIndex; uiStatus->iconIndexC = iconIndex;
set_hud_element_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_hud_element_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
@ -518,11 +530,11 @@ void show_coin_counter(void) {
if (uiStatus->unk_6C[0] == 0) { if (uiStatus->unk_6C[0] == 0) {
set_window_properties(0x14, 0x20, 0xa4, 0x40, 0x14, 0x15, coin_counter_draw_content, 0, -1); set_window_properties(0x14, 0x20, 0xa4, 0x40, 0x14, 0x15, coin_counter_draw_content, 0, -1);
set_window_update(0x14, basic_window_update); set_window_update(0x14, basic_window_update);
index = create_hud_element(&D_80109270); index = create_hud_element(D_80109270);
uiStatus->iconIndex10 = index; uiStatus->iconIndex10 = index;
set_hud_element_flags(index, 0x80); set_hud_element_flags(index, 0x80);
set_hud_element_tint(index, 0xff, 0xff, 0xff); set_hud_element_tint(index, 0xff, 0xff, 0xff);
index = create_hud_element(&D_80108558); index = create_hud_element(D_80108558);
uiStatus->iconIndex11 = index; uiStatus->iconIndex11 = index;
set_hud_element_flags(index, 0x80); set_hud_element_flags(index, 0x80);
set_hud_element_tint(index, 0xff, 0xff, 0xff); set_hud_element_tint(index, 0xff, 0xff, 0xff);

View File

@ -1,11 +1,6 @@
#include "common.h" #include "common.h"
#include "camera.h" #include "camera.h"
void update_camera_mode_0(Camera*);
void update_camera_mode_1(Camera*);
void update_camera_mode_2(Camera*);
void update_camera_mode_4(Camera*);
INCLUDE_ASM(void, "9d10_len_1080", update_camera_mode_4, Camera* camera); INCLUDE_ASM(void, "9d10_len_1080", update_camera_mode_4, Camera* camera);
INCLUDE_ASM(void, "9d10_len_1080", update_camera_mode_2, Camera* camera); INCLUDE_ASM(void, "9d10_len_1080", update_camera_mode_2, Camera* camera);

View File

@ -14,7 +14,6 @@ extern s16 D_80155D8C;
extern s16 D_80155D8E; extern s16 D_80155D8E;
extern s16 D_80155D90; extern s16 D_80155D90;
void delete_shadow(s16);
void draw_item_entities(void); void draw_item_entities(void);
void func_80132D94(void); void func_80132D94(void);

View File

@ -115,7 +115,7 @@ INCLUDE_ASM(s32, "EA0C10", func_80242A14_EA3314);
ApiStatus func_80242A4C_EA334C(Evt* script, s32 isInitialCall) { ApiStatus func_80242A4C_EA334C(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32* ptr = evt_get_variable(script, *args); s32* ptr = (s32*) evt_get_variable(script, *args);
s32 i; s32 i;
if (ptr != NULL) { if (ptr != NULL) {

View File

@ -1,7 +1,5 @@
#include "common.h" #include "common.h"
void update_camera_mode_6(Camera*);
// types, floats, and other shtuff // types, floats, and other shtuff
#ifdef NON_EQUIVALENT #ifdef NON_EQUIVALENT
void update_camera_mode_6(Camera* camera) { void update_camera_mode_6(Camera* camera) {

View File

@ -661,10 +661,8 @@ s32 func_80055FF0(s32, s32);
s32 func_8005600C(s32, s32); s32 func_8005600C(s32, s32);
s32 func_80056028(s32, u8); s32 func_80056028(s32, u8);
s32 func_80056044(s32, u8); s32 func_80056044(s32, u8);
s32 func_80056068(s32, u8);
void func_8005608C(s32*, s32*); void func_8005608C(s32*, s32*);
void func_800560A8(void); void func_800560A8(void);
void func_8005610C(void);
void func_80056144(UnkFuncAl, s32); void func_80056144(UnkFuncAl, s32);
void func_8005615C(void); void func_8005615C(void);
void func_80056180(void); void func_80056180(void);

View File

@ -17,7 +17,7 @@ ApiStatus func_802A9000_428A70(Evt* script, s32 isInitialCall) {
s32 *args = script->ptrReadPos; s32 *args = script->ptrReadPos;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
HudElement* hudElement; s32 hudElement;
battleStatus->unk_434 = &D_80294340; battleStatus->unk_434 = &D_80294340;
battleStatus->unk_82 = 0; battleStatus->unk_82 = 0;

View File

@ -3,16 +3,16 @@
#define NAMESPACE action_command_body_slam #define NAMESPACE action_command_body_slam
extern s32 D_80108AFC; extern HudElementAnim D_80108AFC[];
extern s32 D_80108B28; extern HudElementAnim D_80108B28[];
extern s32 D_8029275C; extern HudElementAnim D_8029275C[];
extern s32 D_80292BAC; extern HudElementAnim D_80292BAC[];
extern s32 D_80294320; extern s32 D_80294320;
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
HudElement* hudElement; s32 hudElement;
battleStatus->unk_82 = 100; battleStatus->unk_82 = 100;
battleStatus->unk_434 = &D_80294320; battleStatus->unk_434 = &D_80294320;
@ -34,25 +34,25 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElementX = -48; actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = create_hud_element(&D_80108B28); hudElement = create_hud_element(D_80108B28);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
hudElement = create_hud_element(&D_80108AFC); hudElement = create_hud_element(D_80108AFC);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
hudElement = create_hud_element(&D_80292BAC); hudElement = create_hud_element(D_80292BAC);
actionCommandStatus->hudElements[3] = hudElement; actionCommandStatus->hudElements[3] = hudElement;
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
hudElement = create_hud_element(&D_8029275C); hudElement = create_hud_element(D_8029275C);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 41, actionCommandStatus->hudElementY + 22); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 41, actionCommandStatus->hudElementY + 22);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
@ -66,7 +66,7 @@ INCLUDE_ASM(s32, "battle/action_cmd/body_slam", func_802A92D4_4285B4);
void N(draw_hud_elements)(void) { void N(draw_hud_elements)(void) {
s32 x, y; s32 x, y;
HudElement* hudElement; s32 hudElement;
draw_hud_element_clipped(gActionCommandStatus.hudElements[0]); draw_hud_element_clipped(gActionCommandStatus.hudElements[0]);
hudElement = gActionCommandStatus.hudElements[1]; hudElement = gActionCommandStatus.hudElements[1];

View File

@ -4,8 +4,6 @@
#define NAMESPACE action_command_bomb #define NAMESPACE action_command_bomb
void btl_set_popup_duration(s32); void btl_set_popup_duration(s32);
void func_80268C9C(void);
void func_80269160(void);
void sfx_adjust_env_sound_params(s32, s32, s32, s32); void sfx_adjust_env_sound_params(s32, s32, s32, s32);
extern HudElementAnim D_80108AFC; extern HudElementAnim D_80108AFC;

View File

@ -9,8 +9,6 @@ extern HudElementAnim D_80108AFC;
extern HudElementAnim D_802928F8; extern HudElementAnim D_802928F8;
extern HudElementAnim D_80109244; extern HudElementAnim D_80109244;
s32 func_80268770(s32, s32, s16);
ApiStatus func_802A9000_4233F0(Evt* script, s32 isInitialCall) { ApiStatus func_802A9000_4233F0(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
@ -132,7 +130,6 @@ void func_802A96B8_423AA8(void) {
draw_hud_element_clipped(hudElements[3]); draw_hud_element_clipped(hudElements[3]);
} }
void func_802A97FC_423BEC(void) { void func_802A97FC_423BEC(void) {
free_hud_element(gActionCommandStatus.hudElements[0]); free_hud_element(gActionCommandStatus.hudElements[0]);
free_hud_element(gActionCommandStatus.hudElements[1]); free_hud_element(gActionCommandStatus.hudElements[1]);

View File

@ -1,8 +1,5 @@
#include "common.h" #include "common.h"
void func_80268770(s32, s32, s32);
void func_8026880C(s32, s32, s32);
void N(UnkActionCommandFunc1)(void) { void N(UnkActionCommandFunc1)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;

View File

@ -3,23 +3,21 @@
#define NAMESPACE action_command_flee #define NAMESPACE action_command_flee
extern s32 D_80108AFC; extern HudElementAnim D_80108AFC[];
extern s32 D_80108B28; extern HudElementAnim D_80108B28[];
extern s32 D_80109244; extern HudElementAnim D_80109244[];
extern s32 D_802928F8; extern HudElementAnim D_802928F8[];
extern s32 D_80292974; extern HudElementAnim D_80292974[];
extern s32 D_80294200; extern s32 D_80294200;
extern s32 D_802A9920; extern s32 D_802A9920;
extern s32 D_80108B80; extern HudElementAnim D_80108B80[];
extern s32 D_802A9920;
extern s32 D_802A9920;
ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall) { ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 xOffset; s32 xOffset;
HudElement* hudElement; s32 hudElement;
battleStatus->unk_82 = 0; battleStatus->unk_82 = 0;
battleStatus->unk_434 = &D_80294200; battleStatus->unk_434 = &D_80294200;
@ -40,25 +38,25 @@ ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall) {
D_802A9920 = 0; D_802A9920 = 0;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = create_hud_element(&D_80108B28); hudElement = create_hud_element(D_80108B28);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
hudElement = create_hud_element(&D_80108AFC); hudElement = create_hud_element(D_80108AFC);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
hudElement = create_hud_element(&D_802928F8); hudElement = create_hud_element(D_802928F8);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
hudElement = create_hud_element(&D_80109244); hudElement = create_hud_element(D_80109244);
actionCommandStatus->hudElements[3] = hudElement; actionCommandStatus->hudElements[3] = hudElement;
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
@ -68,7 +66,7 @@ ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall) {
set_hud_element_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - xOffset, actionCommandStatus->hudElementY + 17); set_hud_element_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - xOffset, actionCommandStatus->hudElementY + 17);
set_hud_element_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX - xOffset, actionCommandStatus->hudElementY - 1); set_hud_element_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX - xOffset, actionCommandStatus->hudElementY - 1);
hudElement = create_hud_element(&D_80292974); hudElement = create_hud_element(D_80292974);
actionCommandStatus->hudElements[4] = hudElement; actionCommandStatus->hudElements[4] = hudElement;
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
@ -98,7 +96,7 @@ ApiStatus func_802A92A0_422D70(Evt* script) {
void func_802A9378_422E48(void) { void func_802A9378_422E48(void) {
s32 temp; s32 temp;
HudElement* hudElement; s32 hudElement;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
@ -144,7 +142,7 @@ void func_802A9378_422E48(void) {
break; break;
} }
set_hud_element_anim(actionCommandStatus->hudElements[0], &D_80108B80); set_hud_element_anim(actionCommandStatus->hudElements[0], D_80108B80);
D_802A9920 = 1; D_802A9920 = 1;
actionCommandStatus->state = 11; actionCommandStatus->state = 11;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52; actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
@ -209,7 +207,7 @@ void func_802A96F4_4231C4(void) {
s32 y; s32 y;
s32 x; s32 x;
s32 temp_a1; s32 temp_a1;
HudElement* hudElement; s32 hudElement;
s32 temp_v1; s32 temp_v1;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
@ -236,7 +234,7 @@ void func_802A96F4_4231C4(void) {
if (actionCommandStatus->unk_68 == 0) { if (actionCommandStatus->unk_68 == 0) {
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 4); func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 4);
} else { } else {
func_8026880C(x, y, actionCommandStatus->barFillLevel / 100, 4); func_8026880C(x, y, actionCommandStatus->barFillLevel / 100);
} }
} }

View File

@ -3,21 +3,21 @@
#define NAMESPACE action_command_hammer #define NAMESPACE action_command_hammer
extern s32 D_80108E48;
// icon indexes for hud elements // icon indexes for hud elements
extern s32 D_802922F0; extern HudElementAnim D_802922F0[];
extern s32 D_8029275C; extern HudElementAnim D_8029275C[];
extern s32 D_802927F0; extern HudElementAnim D_802927F0[];
extern s32 D_80292848; extern HudElementAnim D_80292848[];
extern s32 D_802928A0; extern HudElementAnim D_802928A0[];
extern s32 D_80292A2C; extern HudElementAnim D_80108E48[];
extern HudElementAnim D_80292A2C[];
extern s32 D_802941E0; extern s32 D_802941E0;
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
HudElement* hudElement; s32 hudElement;
battleStatus->unk_82 = 1; battleStatus->unk_82 = 1;
battleStatus->unk_434 = &D_802941E0; battleStatus->unk_434 = &D_802941E0;
@ -36,43 +36,43 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
actionCommandStatus->unk_60 = 0; actionCommandStatus->unk_60 = 0;
actionCommandStatus->hudElementY = 96; actionCommandStatus->hudElementY = 96;
hudElement = create_hud_element(&D_802922F0); hudElement = create_hud_element(D_802922F0);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
set_hud_element_render_depth(hudElement, 10); set_hud_element_render_depth(hudElement, 10);
hudElement = create_hud_element(&D_8029275C); hudElement = create_hud_element(D_8029275C);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
hudElement = create_hud_element(&D_802927F0); hudElement = create_hud_element(D_802927F0);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
hudElement = create_hud_element(&D_80292848); hudElement = create_hud_element(D_80292848);
actionCommandStatus->hudElements[3] = hudElement; actionCommandStatus->hudElements[3] = hudElement;
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
hudElement = create_hud_element(&D_802928A0); hudElement = create_hud_element(D_802928A0);
actionCommandStatus->hudElements[4] = hudElement; actionCommandStatus->hudElements[4] = hudElement;
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
hudElement = create_hud_element(&D_80108E48); hudElement = create_hud_element(D_80108E48);
actionCommandStatus->hudElements[5] = hudElement; actionCommandStatus->hudElements[5] = hudElement;
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
hudElement = create_hud_element(&D_80292A2C); hudElement = create_hud_element(D_80292A2C);
actionCommandStatus->hudElements[6] = hudElement; actionCommandStatus->hudElements[6] = hudElement;
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);

View File

@ -3,9 +3,6 @@
#define NAMESPACE action_command_hurricane #define NAMESPACE action_command_hurricane
void func_80268770(s32, s32, s16);
void func_8026880C(s32, s32, s16);
extern s32 D_80294420; extern s32 D_80294420;
extern HudElementAnim D_80108AFC; extern HudElementAnim D_80108AFC;
extern HudElementAnim D_80108B28; extern HudElementAnim D_80108B28;

View File

@ -6,12 +6,12 @@
extern s32 D_802941C0; extern s32 D_802941C0;
// icon id's for hud elements // icon id's for hud elements
extern s32 D_80108B28; extern HudElementAnim D_80108B28[];
extern s32 D_80292A2C; extern HudElementAnim D_80292A2C[];
extern s32 D_80108B54; extern HudElementAnim D_80108B54[];
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
HudElement* hudElement; s32 hudElement;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
gBattleStatus.unk_82 = 1; gBattleStatus.unk_82 = 1;
@ -30,14 +30,14 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
actionCommandStatus->unk_60 = 0; actionCommandStatus->unk_60 = 0;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = create_hud_element(&D_80108B28); hudElement = create_hud_element(D_80108B28);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
set_hud_element_alpha(hudElement, 0xFF); set_hud_element_alpha(hudElement, 0xFF);
hudElement = create_hud_element(&D_80292A2C); hudElement = create_hud_element(D_80292A2C);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
@ -48,7 +48,7 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
} }
ApiStatus func_802A9120_421B10(Evt* script, s32 isInitialCall) { ApiStatus func_802A9120_421B10(Evt* script, s32 isInitialCall) {
HudElement* hudElement; s32 hudElement;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
@ -84,7 +84,7 @@ ApiStatus func_802A9120_421B10(Evt* script, s32 isInitialCall) {
void N(update)(void) { void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
HudElement* hudElement; s32 hudElement;
s32 temp_s0_3; s32 temp_s0_3;
switch (actionCommandStatus->state) { switch (actionCommandStatus->state) {
@ -126,7 +126,7 @@ void N(update)(void) {
temp_s0_3 = battleStatus->unk_434[actionCommandStatus->unk_50]; temp_s0_3 = battleStatus->unk_434[actionCommandStatus->unk_50];
if (((actionCommandStatus->unk_4E - temp_s0_3) - 2) <= 0) { if (((actionCommandStatus->unk_4E - temp_s0_3) - 2) <= 0) {
set_hud_element_anim(actionCommandStatus->hudElements[0], &D_80108B54); set_hud_element_anim(actionCommandStatus->hudElements[0], D_80108B54);
} }
if (((battleStatus->currentButtonsPressed & 0x8000) != 0) && (actionCommandStatus->autoSucceed == 0)) { if (((battleStatus->currentButtonsPressed & 0x8000) != 0) && (actionCommandStatus->autoSucceed == 0)) {
actionCommandStatus->unk_60 = 1; actionCommandStatus->unk_60 = 1;

View File

@ -13,8 +13,6 @@ extern HudElementAnim D_80108B80;
extern HudElementAnim D_80292374; extern HudElementAnim D_80292374;
void btl_set_popup_duration(s32); void btl_set_popup_duration(s32);
void func_80268C9C(void);
void func_80269160(void);
void sfx_adjust_env_sound_params(s32, s32, s32, s32); void sfx_adjust_env_sound_params(s32, s32, s32, s32);
typedef struct structD_802A9930_42E340 { typedef struct structD_802A9930_42E340 {

View File

@ -3,23 +3,16 @@
#define NAMESPACE action_command_power_shock #define NAMESPACE action_command_power_shock
extern const HudElementAnim D_80108AFC; extern const HudElementAnim D_80108AFC[];
extern const HudElementAnim D_80108B28; extern const HudElementAnim D_80108B28[];
extern const HudElementAnim D_80108B80; extern const HudElementAnim D_80108B80[];
extern const HudElementAnim D_80109244; extern const HudElementAnim D_80109244[];
extern const HudElementAnim D_80292974; extern const HudElementAnim D_80292974[];
extern s32 D_802943A0[]; extern s32 D_802943A0[];
extern s16 D_802A9AA2_42D9B2[]; extern s16 D_802A9AA2_42D9B2[];
extern s32 D_802A9B00; extern s32 D_802A9B00;
// Function declarations; should ideally be moved to functions.h / 196AA0.c header?
s32 func_80268224(s32);
void func_80268798(s32, s32, s32, s32);
void func_80268834(s32, s32, s32, s32); void func_80268834(s32, s32, s32, s32);
void func_80268858(void);
void func_80268C9C(void);
void func_80269118(void);
void func_80269160(void);
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;

View File

@ -4,11 +4,6 @@
#define NAMESPACE action_command_smack #define NAMESPACE action_command_smack
void func_80268C9C(void);
void func_80269160(void);
void func_80268770(s32, s32, s32);
void func_8026880C(s32, s32, s32);
void btl_set_popup_duration(s32 duration);
void sfx_adjust_env_sound_params(s32 soundID, u8 volume, u8 pan, s16 pitchShift); void sfx_adjust_env_sound_params(s32 soundID, u8 volume, u8 pan, s16 pitchShift);
extern HudElementAnim D_80108AFC; extern HudElementAnim D_80108AFC;

View File

@ -3,15 +3,15 @@
#define NAMESPACE action_command_spook #define NAMESPACE action_command_spook
extern s32 D_80108AFC; extern HudElementAnim D_80108AFC[];
extern s32 D_80108E1C; extern HudElementAnim D_80108E1C[];
extern s32 D_80292974; extern HudElementAnim D_80292974[];
extern s32 D_80294440; extern s32 D_80294440;
ApiStatus func_802A9000_430020(void) { ApiStatus func_802A9000_430020(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
HudElement* hudElement; s32 hudElement;
battleStatus->unk_82 = 100; battleStatus->unk_82 = 100;
battleStatus->unk_434 = &D_80294440; battleStatus->unk_434 = &D_80294440;
@ -34,19 +34,19 @@ ApiStatus func_802A9000_430020(void) {
actionCommandStatus->hudElementX = -48; actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = create_hud_element(&D_80108E1C); hudElement = create_hud_element(D_80108E1C);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
hudElement = create_hud_element(&D_80108AFC); hudElement = create_hud_element(D_80108AFC);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
hudElement = create_hud_element(&D_80292974); hudElement = create_hud_element(D_80292974);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);

View File

@ -3,14 +3,14 @@
#define NAMESPACE action_command_squirt #define NAMESPACE action_command_squirt
extern s32 D_80108AFC[]; extern HudElementAnim D_80108AFC[];
extern s32 D_80108B28[]; extern HudElementAnim D_80108B28[];
extern s32 D_80294380; extern s32 D_80294380;
ApiStatus func_802A9000_429D20(void) { ApiStatus func_802A9000_429D20(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
HudElement* hudElement; s32 hudElement;
battleStatus->unk_82 = 5; battleStatus->unk_82 = 5;
battleStatus->unk_434 = &D_80294380; battleStatus->unk_434 = &D_80294380;

View File

@ -3,14 +3,15 @@
#define NAMESPACE action_command_stop_leech #define NAMESPACE action_command_stop_leech
extern s32 D_80108AFC; extern HudElementAnim D_80108B80[];
extern s32 D_80108B28; extern HudElementAnim D_80108AFC[];
extern HudElementAnim D_80108B28[];
extern s32 D_80294260; extern s32 D_80294260;
ApiStatus func_802A9000_425590(void) { ApiStatus func_802A9000_425590(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
HudElement* hudElement; s32 hudElement;
battleStatus->unk_82 = 5; battleStatus->unk_82 = 5;
battleStatus->unk_434 = &D_80294260; battleStatus->unk_434 = &D_80294260;
@ -28,13 +29,13 @@ ApiStatus func_802A9000_425590(void) {
actionCommandStatus->unk_48 = 0; actionCommandStatus->unk_48 = 0;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = create_hud_element(&D_80108B28); hudElement = create_hud_element(D_80108B28);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
hudElement = create_hud_element(&D_80108AFC); hudElement = create_hud_element(D_80108AFC);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
@ -68,12 +69,10 @@ ApiStatus func_802A9110_4256A0(Evt* script) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
extern s32 D_80108B80;
void func_802A91F8_425788(void) { void func_802A91F8_425788(void) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
HudElement* hudElement; s32 hudElement;
s16 hudElementX; s16 hudElementX;
switch (actionCommandStatus->state) { switch (actionCommandStatus->state) {
@ -107,7 +106,7 @@ void func_802A91F8_425788(void) {
actionCommandStatus->unk_4E -= 1; actionCommandStatus->unk_4E -= 1;
break; break;
} }
set_hud_element_anim(actionCommandStatus->hudElements[0], &D_80108B80); set_hud_element_anim(actionCommandStatus->hudElements[0], D_80108B80);
actionCommandStatus->barFillLevel = 0; actionCommandStatus->barFillLevel = 0;
actionCommandStatus->state = 11; actionCommandStatus->state = 11;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52; actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
@ -150,7 +149,7 @@ void func_802A91F8_425788(void) {
void func_802A94A4_425A34(void) { void func_802A94A4_425A34(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
s32 x, y; s32 x, y;
HudElement* hudElement; s32 hudElement;
if (actionCommandStatus->unk_6A == 0) { if (actionCommandStatus->unk_6A == 0) {
draw_hud_element_clipped(actionCommandStatus->hudElements[0]); draw_hud_element_clipped(actionCommandStatus->hudElements[0]);

View File

@ -3,12 +3,12 @@
#define NAMESPACE action_command_tidal_wave #define NAMESPACE action_command_tidal_wave
extern s32 D_80108AFC; extern HudElementAnim D_80108AFC[];
extern s32 D_80108B28; extern HudElementAnim D_80108B28[];
extern s32 D_802944A0; extern s32 D_802944A0;
extern s32* D_802A97C0_42CEB0[]; extern HudElementAnim* D_802A97C0_42CEB0[];
extern s32* D_802A97CC_42CEBC[]; extern HudElementAnim* D_802A97CC_42CEBC[];
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
@ -33,14 +33,14 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElementX = -48; actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = create_hud_element(&D_80108AFC); hudElement = create_hud_element(D_80108AFC);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
set_hud_element_flags(hudElement, 0x82); set_hud_element_flags(hudElement, 0x82);
for (i = 1; i < ARRAY_COUNT(actionCommandStatus->hudElements); i++) { for (i = 1; i < ARRAY_COUNT(actionCommandStatus->hudElements); i++) {
hudElement = create_hud_element(&D_80108B28); hudElement = create_hud_element(D_80108B28);
actionCommandStatus->hudElements[i] = hudElement; actionCommandStatus->hudElements[i] = hudElement;
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
set_hud_element_render_depth(hudElement, 0); set_hud_element_render_depth(hudElement, 0);
@ -81,7 +81,7 @@ ApiStatus func_802A9138_42C828(Evt* script, s32 isInitialCall) {
void N(update)(void) { void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
HudElement* hudElement; s32 hudElement;
s8 oldButton; s8 oldButton;
s8 newButton; s8 newButton;
s32 numLookbackFrames; s32 numLookbackFrames;

View File

@ -35,10 +35,10 @@ ApiStatus func_802A9398_42A888(Evt* script, s32 isInitialCall) {
INCLUDE_ASM(s32, "battle/action_cmd/water_block", func_802A948C_42A97C); INCLUDE_ASM(s32, "battle/action_cmd/water_block", func_802A948C_42A97C);
extern s32 D_802AB180_42C670[]; extern HudElementAnim* D_802AB180_42C670[];
void func_802AA014_42B504(void) { void func_802AA014_42B504(void) {
HudElement* hudElement; s32 hudElement;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;

View File

@ -70,14 +70,14 @@ INCLUDE_ASM(s32, "battle/action_cmd/whirlwind", func_802A91E0_423E50);
INCLUDE_ASM(s32, "battle/action_cmd/whirlwind", func_802A92F0_423F60); INCLUDE_ASM(s32, "battle/action_cmd/whirlwind", func_802A92F0_423F60);
// hud element scripts // hud element scripts
extern s32* D_802AA888_4254F8[]; extern HudElementAnim* D_802AA888_4254F8[];
extern s32* D_802AA8A0_425510[]; extern HudElementAnim* D_802AA8A0_425510[];
void func_802A9744_4243B4(void) { void func_802A9744_4243B4(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
s32 x, y; s32 x, y;
HudElement* hudElement; s32 hudElement;
if (actionCommandStatus->unk_6A == 0) { if (actionCommandStatus->unk_6A == 0) {
draw_hud_element_clipped(actionCommandStatus->hudElements[0]); draw_hud_element_clipped(actionCommandStatus->hudElements[0]);
@ -86,7 +86,7 @@ void func_802A9744_4243B4(void) {
draw_hud_element_clipped(hudElement); draw_hud_element_clipped(hudElement);
get_hud_element_render_pos(hudElement, &x, &y); get_hud_element_render_pos(hudElement, &x, &y);
func_80268798(x, y, (s16)actionCommandStatus->barFillLevel / 100, 1); func_80268798(x, y, (s16) actionCommandStatus->barFillLevel / 100, 1);
draw_hud_element_clipped(actionCommandStatus->hudElements[3]); draw_hud_element_clipped(actionCommandStatus->hudElements[3]);
hudElement = actionCommandStatus->hudElements[2]; hudElement = actionCommandStatus->hudElements[2];
if (actionCommandStatus->unk_64 == 0) { if (actionCommandStatus->unk_64 == 0) {

View File

@ -1,8 +1,6 @@
#include "common.h" #include "common.h"
#include "hud_element.h" #include "hud_element.h"
extern s32 D_80104A28;
#define NAMESPACE b_area_kmr_part_3 #define NAMESPACE b_area_kmr_part_3
#define NAMESPACE dup_b_area_kmr_part_3 #define NAMESPACE dup_b_area_kmr_part_3
@ -13,7 +11,7 @@ ApiStatus func_802189DC_447E1C(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32 posX = evt_get_float_variable(script, *args++); f32 posX = evt_get_float_variable(script, *args++);
f32 posY = evt_get_float_variable(script, *args++); f32 posY = evt_get_float_variable(script, *args++);
HudElement* icon = create_hud_element(&D_80104A28); s32 icon = create_hud_element(D_80104A28);
set_hud_element_render_pos(icon, posX, posY); set_hud_element_render_pos(icon, posX, posY);
set_hud_element_scale(icon, 1.5f); set_hud_element_scale(icon, 1.5f);

View File

@ -14,8 +14,8 @@ BattleArea gBattleAreas[0x30] = {
{ {
AREA(area_kmr_part_1), AREA(area_kmr_part_1),
.name = "エリア その1", .name = "エリア その1",
.battles = b_area_kmr_part_1_formationTable, .battles = &b_area_kmr_part_1_formationTable,
.stages = b_area_kmr_part_1_stageTable, .stages = &b_area_kmr_part_1_stageTable,
}, },
{ {
AREA(area_kmr_part_2), AREA(area_kmr_part_2),

View File

@ -309,8 +309,8 @@ typedef struct StageListRow {
typedef struct BattleArea { typedef struct BattleArea {
/* 0x00 */ char* name; ///< JP debug name. /* 0x00 */ char* name; ///< JP debug name.
/* 0x04 */ s32 dmaStart; /* 0x04 */ void* dmaStart;
/* 0x08 */ s32 dmaEnd; /* 0x08 */ void* dmaEnd;
/* 0x0C */ void* dmaDest; /* 0x0C */ void* dmaDest;
/* 0x10 */ BattleList* battles; /* 0x10 */ BattleList* battles;
/* 0x14 */ StageList* stages; /* 0x14 */ StageList* stages;

View File

@ -1,7 +1,7 @@
#include "common.h" #include "common.h"
#include "hud_element.h" #include "hud_element.h"
static HudElement* itemIcon; static s32 itemIcon;
// Returns time to sleep for on $x. // Returns time to sleep for on $x.
ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) { ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) {
@ -40,7 +40,7 @@ ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) {
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconX, &iconY, &iconZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconX, &iconY, &iconZ);
itemIcon = create_hud_element(&D_80108A64); itemIcon = create_hud_element(D_80108A64);
set_hud_element_render_pos(itemIcon, iconX + 36, iconY - 63); set_hud_element_render_pos(itemIcon, iconX + 36, iconY - 63);
} }

View File

@ -11,8 +11,8 @@ ApiStatus func_802D7520(Evt* script, s32 isInitialCall);
ApiStatus N(func_802A12C4_726224)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A12C4_726224)(Evt* script, s32 isInitialCall);
ApiStatus N(func_802A123C_72619C)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A123C_72619C)(Evt* script, s32 isInitialCall);
EvtSource N(UseItemWithEffect); extern EvtSource N(UseItemWithEffect);
EvtSource N(PlayerGoHome); extern EvtSource N(PlayerGoHome);
EvtSource N(DrinkItem); extern EvtSource N(DrinkItem);
#endif #endif

View File

@ -292,7 +292,7 @@ ActorPartDesc N(partsTable_802392A4)[] = {
}, },
}; };
EvtSource N(init_802392F0); extern EvtSource N(init_802392F0);
ActorDesc N(goombario) = { ActorDesc N(goombario) = {
.flags = 0, .flags = 0,
@ -318,10 +318,10 @@ ActorDesc N(goombario) = {
}; };
EvtSource N(init_802392F0) = { EvtSource N(init_802392F0) = {
EVT_CALL(BindTakeTurn, 256, battle_partner_goombario_takeTurn_802396D8) EVT_CALL(BindTakeTurn, 256, EVT_PTR(battle_partner_goombario_takeTurn_802396D8))
EVT_CALL(BindIdle, 256, battle_partner_goombario_idle_80239350) EVT_CALL(BindIdle, 256, EVT_PTR(battle_partner_goombario_idle_80239350))
EVT_CALL(BindHandleEvent, 256, battle_partner_goombario_handleEvent_80239360) EVT_CALL(BindHandleEvent, 256, EVT_PTR(battle_partner_goombario_handleEvent_80239360))
EVT_CALL(BindNextTurn, 256, battle_partner_goombario_nextTurn_80239A3C) EVT_CALL(BindNextTurn, 256, EVT_PTR(battle_partner_goombario_nextTurn_80239A3C))
EVT_RETURN EVT_RETURN
EVT_END EVT_END
}; };
@ -1097,7 +1097,7 @@ EvtSource N(8023BB9C) = {
EVT_CALL(UseBattleCamPreset, 53) EVT_CALL(UseBattleCamPreset, 53)
EVT_END_THREAD EVT_END_THREAD
EVT_CALL(CloseActionCommandInfo) EVT_CALL(CloseActionCommandInfo)
EVT_CALL(func_8026919C, battle_partner_goombario_D_8023BB78_6ECC58) EVT_CALL(func_8026919C, EVT_PTR(battle_partner_goombario_D_8023BB78_6ECC58))
EVT_CALL(LoadActionCommand, 1) EVT_CALL(LoadActionCommand, 1)
EVT_CALL(func_802A9000_430020) EVT_CALL(func_802A9000_430020)
EVT_SET(EVT_VAR(10), 24) EVT_SET(EVT_VAR(10), 24)

View File

@ -375,7 +375,7 @@ void update_effects(void) {
} }
} }
s32 render_effects_world(void) { void render_effects_world(void) {
s32 i; s32 i;
for (i = 0; i < ARRAY_COUNT(gEffectInstances); i++) { for (i = 0; i < ARRAY_COUNT(gEffectInstances); i++) {

View File

@ -110,6 +110,8 @@ typedef struct HudElement {
/* 0x40 */ Vec2b customDrawSize; /* 0x40 */ Vec2b customDrawSize;
} HudElement; // size = 0x54 } HudElement; // size = 0x54
extern HudElementAnim D_80104A28[];
extern HudElementAnim D_80108A64[];
extern HudElementAnim* D_8024FA30[1]; extern HudElementAnim* D_8024FA30[1];
extern HudElementAnim *gBadgeMenuElements[22]; extern HudElementAnim *gBadgeMenuElements[22];
extern HudElement* gItemIcons[20]; extern HudElement* gItemIcons[20];

View File

@ -4,7 +4,6 @@
#include "sprite.h" #include "sprite.h"
extern s16 D_8010C97A; extern s16 D_8010C97A;
extern s32 D_8010C978;
extern f32 D_80077C10; extern f32 D_80077C10;
extern s16 D_80077C14; extern s16 D_80077C14;
@ -19,7 +18,7 @@ extern s32 D_80077C34;
extern s16 D_80077C38; extern s16 D_80077C38;
extern s16 D_80077C3A; extern s16 D_80077C3A;
void STUB_npc_callback(void) { void STUB_npc_callback(Npc* npc) {
} }
void mtx_ident_mirror_y(Matrix4f mtx) { void mtx_ident_mirror_y(Matrix4f mtx) {

View File

@ -1,10 +1,6 @@
#include "common.h" #include "common.h"
#include "../actions.h" #include "../actions.h"
void player_input_to_move_vector(f32* angle, f32* magnitude);
s32 check_input_jump(void);
s32 check_input_hammer(void);
void func_802B61E4_E23444(void); void func_802B61E4_E23444(void);
s32 world_action_idle_peachAnims[] = { s32 world_action_idle_peachAnims[] = {

View File

@ -3,6 +3,9 @@
extern f32 D_8010C960; extern f32 D_8010C960;
extern f32 D_8010C97C; extern f32 D_8010C97C;
void func_802B6508_E24548(void);
void func_802B647C_E244BC(void);
void func_802B6000_E24040(void) { void func_802B6000_E24040(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
CollisionStatus* collisionStatus = &gCollisionStatus; CollisionStatus* collisionStatus = &gCollisionStatus;

View File

@ -5,6 +5,8 @@
s32 D_802B6910_E23FF0[] = {0x000A0002, 0x000A002B, 0x000A002D, 0x000A002F, 0x000A0031, 0x000A0033, 0x000A0035, 0x000A0037, 0x000A0039, 0x000A003B, 0x000A003D, 0x000A003F, s32 D_802B6910_E23FF0[] = {0x000A0002, 0x000A002B, 0x000A002D, 0x000A002F, 0x000A0031, 0x000A0033, 0x000A0035, 0x000A0037, 0x000A0039, 0x000A003B, 0x000A003D, 0x000A003F,
0x000A0041, 0x000A0043, 0x000A0045, 0x000A0047, 0x000A0049, 0x000A004B, 0x000A004D, 0x00000000 }; 0x000A0041, 0x000A0043, 0x000A0045, 0x000A0047, 0x000A0049, 0x000A004B, 0x000A004D, 0x00000000 };
void func_802B6738_E23E18(void);
// walk // walk
INCLUDE_ASM(void, "world/action/walk", func_802B6000_E236E0, void); INCLUDE_ASM(void, "world/action/walk", func_802B6000_E236E0, void);

View File

@ -4,7 +4,6 @@
extern s32 D_800F7F00[]; extern s32 D_800F7F00[];
extern s32 D_800F7F40[]; extern s32 D_800F7F40[];
extern s32 D_8008EF20[11][4];
enum { enum {
NPC_SENTINEL, NPC_SENTINEL,
@ -129,7 +128,7 @@ NpcAISettings N(npcAISettings_802435B4) = {
.unk_2C = 1, .unk_2C = 1,
}; };
const char N(dgb_00_name_hack)[]; extern const char N(dgb_00_name_hack)[];
EvtSource N(npcAI_802435E4) = SCRIPT({ EvtSource N(npcAI_802435E4) = SCRIPT({
SetSelfVar(0, 0); SetSelfVar(0, 0);
@ -572,7 +571,7 @@ ApiStatus N(func_8024130C_C3783C)(Evt* script, s32 isInitialCall) {
Npc* npc = get_npc_unsafe(enemy->npcID); Npc* npc = get_npc_unsafe(enemy->npcID);
EnemyTerritoryThing territory; EnemyTerritoryThing territory;
EnemyTerritoryThing* territoryPtr = &territory; EnemyTerritoryThing* territoryPtr = &territory;
NpcAISettings* aiSettings = evt_get_variable(script, *args); NpcAISettings* aiSettings = (NpcAISettings*) evt_get_variable(script, *args);
territory.unk_00 = 0; territory.unk_00 = 0;
territory.shape = enemy->territory->wander.detectShape; territory.shape = enemy->territory->wander.detectShape;

View File

@ -25,6 +25,6 @@ ApiStatus N(func_802429D0_C38F00)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80242F08_C39438)(Evt* script, s32 isInitialCall); ApiStatus N(func_80242F08_C39438)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc24)(Evt* script, s32 isInitialCall); ApiStatus N(UnkFunc24)(Evt* script, s32 isInitialCall);
NpcGroupList N(npcGroupList_80243D18); extern NpcGroupList N(npcGroupList_80243D18);
EvtSource N(main); extern EvtSource N(main);
EvtSource N(makeEntities); extern EvtSource N(makeEntities);

View File

@ -87,7 +87,7 @@ EvtSource N(exitSingleDoor_80241B30) = SCRIPT({
sleep 100; sleep 100;
}); });
const N(pad_XXXX)[] = { 0, 0 }; const s32 N(pad_XXXX)[] = { 0, 0 };
EvtSource N(80241BE4) = SCRIPT({ EvtSource N(80241BE4) = SCRIPT({
bind N(exitDoubleDoor_802419C8) TRIGGER_WALL_PRESS_A 19; bind N(exitDoubleDoor_802419C8) TRIGGER_WALL_PRESS_A 19;
@ -328,7 +328,7 @@ EvtSource N(npcAI_8024274C) = SCRIPT({
N(func_80241464_C50974)(N(npcAISettings_8024271C)); N(func_80241464_C50974)(N(npcAISettings_8024271C));
}); });
const char N(dgb_14_name_hack)[]; extern const char N(dgb_14_name_hack)[];
EvtSource N(defeat_802427B0) = SCRIPT({ EvtSource N(defeat_802427B0) = SCRIPT({
N(UnkFunc1)(); N(UnkFunc1)();

View File

@ -405,7 +405,7 @@ NpcSettings N(npcSettings_8024296C) = {
.level = 99, .level = 99,
}; };
const char N(flo_07_name_hack)[]; extern const char N(flo_07_name_hack)[];
EvtSource N(80242998) = SCRIPT({ EvtSource N(80242998) = SCRIPT({
DisablePlayerInput(TRUE); DisablePlayerInput(TRUE);
@ -1311,7 +1311,7 @@ f32 N(D_80245E88_CA3DA8)[] = {
300.0f, 400.0f, 200.0f, 287.0f, 300.0f, 400.0f, 200.0f, 287.0f,
}; };
const char N(sam_11_name_hack)[]; extern const char N(sam_11_name_hack)[];
EvtSource N(80245EB8) = SCRIPT({ EvtSource N(80245EB8) = SCRIPT({
SetPlayerPos(-400, 0, 200); SetPlayerPos(-400, 0, 200);
@ -1634,7 +1634,7 @@ EvtSource N(80247770) = SCRIPT({
UpdateColliderTransform(46); UpdateColliderTransform(46);
}); });
const char N(flo_19_name_hack)[]; extern const char N(flo_19_name_hack)[];
EvtSource N(802477EC) = SCRIPT({ EvtSource N(802477EC) = SCRIPT({
if (EVT_AREA_FLAG(44) == 0) { if (EVT_AREA_FLAG(44) == 0) {

View File

@ -208,8 +208,8 @@ EvtSource N(main) = SCRIPT({
NpcSettings N(npcSettings_80244100) = { NpcSettings N(npcSettings_80244100) = {
.height = 32, .height = 32,
.radius = 24, .radius = 24,
.onHit = EnemyNpcHit, .onHit = &EnemyNpcHit,
.onDefeat = EnemyNpcDefeat, .onDefeat = &EnemyNpcDefeat,
.level = 20, .level = 20,
}; };
@ -245,8 +245,8 @@ NpcSettings N(npcSettings_802441E4) = {
.height = 28, .height = 28,
.radius = 24, .radius = 24,
.ai = &N(npcAI_80244174), .ai = &N(npcAI_80244174),
.onHit = EnemyNpcHit, .onHit = &EnemyNpcHit,
.onDefeat = EnemyNpcDefeat, .onDefeat = &EnemyNpcDefeat,
.level = 20, .level = 20,
}; };
@ -293,7 +293,7 @@ NpcSettings N(npcSettings_8024437C) = {
.height = 21, .height = 21,
.radius = 22, .radius = 22,
.ai = &N(npcAI_80244240), .ai = &N(npcAI_80244240),
.onHit = EnemyNpcHit, .onHit = &EnemyNpcHit,
.onDefeat = &N(802442B0), .onDefeat = &N(802442B0),
.level = 19, .level = 19,
}; };
@ -1186,8 +1186,9 @@ NpcGroupList N(npcGroupList_80247984) = {
#include "world/common/UnkNpcAIFunc23.inc.c" #include "world/common/UnkNpcAIFunc23.inc.c"
void N(func_80240374_CC3B84)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory);
#ifdef NON_EQUIVALENT #ifdef NON_EQUIVALENT
void N(func_802404D0_CB54D0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { void N(func_80240374_CC3B84)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID); Npc* npc = get_npc_unsafe(enemy->npcID);
f32 temp_f24; f32 temp_f24;
@ -1365,7 +1366,7 @@ ApiStatus N(func_802414D0_CC4CE0)(Evt* script, s32 isInitialCall) {
Npc* npc = get_npc_unsafe(enemy->npcID); Npc* npc = get_npc_unsafe(enemy->npcID);
EnemyTerritoryThing territory; EnemyTerritoryThing territory;
EnemyTerritoryThing* territoryPtr = &territory; EnemyTerritoryThing* territoryPtr = &territory;
NpcAISettings* aiSettings = evt_get_variable(script, *args); NpcAISettings* aiSettings = (NpcAISettings*) evt_get_variable(script, *args);
territory.unk_00 = 0; territory.unk_00 = 0;
territory.shape = enemy->territory->wander.detectShape; territory.shape = enemy->territory->wander.detectShape;
@ -1710,7 +1711,7 @@ ApiStatus N(func_8024262C_CC5E3C)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
EnemyTerritoryThing territory; EnemyTerritoryThing territory;
EnemyTerritoryThing* territoryPtr = &territory; EnemyTerritoryThing* territoryPtr = &territory;
NpcAISettings* aiSettings = evt_get_variable(script, *args); NpcAISettings* aiSettings = (NpcAISettings*) evt_get_variable(script, *args);
s32 var; s32 var;
territory.unk_00 = 0; territory.unk_00 = 0;
@ -1846,7 +1847,7 @@ ApiStatus N(func_80242A6C_CC627C)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
EnemyTerritoryThing territory; EnemyTerritoryThing territory;
EnemyTerritoryThing* territoryPtr = &territory; EnemyTerritoryThing* territoryPtr = &territory;
NpcAISettings* aiSettings = evt_get_variable(script, *args); NpcAISettings* aiSettings = (NpcAISettings*) evt_get_variable(script, *args);
s32 var; s32 var;
u32 x, y, z; u32 x, y, z;
f32 x2, y2, z2, w2; f32 x2, y2, z2, w2;

View File

@ -330,8 +330,8 @@ NpcSettings N(npcSettings_802444C4) = {
.height = 28, .height = 28,
.radius = 24, .radius = 24,
.ai = &N(npcAI_80244454), .ai = &N(npcAI_80244454),
.onHit = EnemyNpcHit, .onHit = &EnemyNpcHit,
.onDefeat = EnemyNpcDefeat, .onDefeat = &EnemyNpcDefeat,
.level = 20, .level = 20,
}; };
@ -378,7 +378,7 @@ NpcSettings N(npcSettings_8024465C) = {
.height = 21, .height = 21,
.radius = 22, .radius = 22,
.ai = &N(npcAI_80244520), .ai = &N(npcAI_80244520),
.onHit = EnemyNpcHit, .onHit = &EnemyNpcHit,
.onDefeat = &N(80244590), .onDefeat = &N(80244590),
.level = 19, .level = 19,
}; };
@ -611,9 +611,10 @@ EvtSource N(makeEntities) = SCRIPT({
#include "world/common/UnkNpcAIFunc23.inc.c" #include "world/common/UnkNpcAIFunc23.inc.c"
void N(func_80240220_CD7500)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory);
#ifdef NON_EQUIVALENT #ifdef NON_EQUIVALENT
// second npc_raycast_down_sides call // second npc_raycast_down_sides call
void N(func_80241040_BE47F0)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { void N(func_80240220_CD7500)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID); Npc* npc = get_npc_unsafe(enemy->npcID);
f32 temp_f24; f32 temp_f24;
@ -786,7 +787,7 @@ ApiStatus N(func_8024137C_CD865C)(Evt* script, s32 isInitialCall) {
Npc* npc = get_npc_unsafe(enemy->npcID); Npc* npc = get_npc_unsafe(enemy->npcID);
EnemyTerritoryThing territory; EnemyTerritoryThing territory;
EnemyTerritoryThing* territoryPtr = &territory; EnemyTerritoryThing* territoryPtr = &territory;
NpcAISettings* aiSettings = evt_get_variable(script, *args); NpcAISettings* aiSettings = (NpcAISettings*) evt_get_variable(script, *args);
territory.unk_00 = 0; territory.unk_00 = 0;
territory.shape = enemy->territory->wander.detectShape; territory.shape = enemy->territory->wander.detectShape;
@ -1131,7 +1132,7 @@ ApiStatus N(func_802424D8_CD97B8)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
EnemyTerritoryThing territory; EnemyTerritoryThing territory;
EnemyTerritoryThing* territoryPtr = &territory; EnemyTerritoryThing* territoryPtr = &territory;
NpcAISettings* aiSettings = evt_get_variable(script, *args); NpcAISettings* aiSettings = (NpcAISettings*) evt_get_variable(script, *args);
s32 var; s32 var;
territory.unk_00 = 0; territory.unk_00 = 0;
@ -1267,7 +1268,7 @@ ApiStatus N(func_80242918_CD9BF8)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
EnemyTerritoryThing territory; EnemyTerritoryThing territory;
EnemyTerritoryThing* territoryPtr = &territory; EnemyTerritoryThing* territoryPtr = &territory;
NpcAISettings* aiSettings = evt_get_variable(script, *args); NpcAISettings* aiSettings = (NpcAISettings*) evt_get_variable(script, *args);
s32 var; s32 var;
u32 x, y, z; u32 x, y, z;
f32 x2, y2, z2, w2; f32 x2, y2, z2, w2;

View File

@ -408,7 +408,7 @@ EvtSource N(80241ED4) = {
EVT_CMD(EVT_OP_SETF, EVT_VAR(5), EVT_FIXED(3.0)), EVT_CMD(EVT_OP_SETF, EVT_VAR(5), EVT_FIXED(3.0)),
EVT_CMD(EVT_OP_THREAD), EVT_CMD(EVT_OP_THREAD),
EVT_CMD(EVT_OP_WAIT_FRAMES, 10), EVT_CMD(EVT_OP_WAIT_FRAMES, 10),
EVT_CMD(EVT_OP_CALL, PlaySoundAtCollider, 19, 486, 0), EVT_CMD(EVT_OP_CALL, EVT_PTR(PlaySoundAtCollider), 19, 486, 0),
EVT_CMD(EVT_OP_END_THREAD), EVT_CMD(EVT_OP_END_THREAD),
EVT_CMD(EVT_OP_LOOP, 300), EVT_CMD(EVT_OP_LOOP, 300),
EVT_CMD(EVT_OP_ADDF, EVT_VAR(4), EVT_FIXED(-0.5)), EVT_CMD(EVT_OP_ADDF, EVT_VAR(4), EVT_FIXED(-0.5)),
@ -425,19 +425,19 @@ EvtSource N(80241ED4) = {
EVT_CMD(EVT_OP_END_IF), EVT_CMD(EVT_OP_END_IF),
EVT_CMD(EVT_OP_END_IF), EVT_CMD(EVT_OP_END_IF),
EVT_CMD(EVT_OP_END_IF), // BUG: extraneous END_IF EVT_CMD(EVT_OP_END_IF), // BUG: extraneous END_IF
EVT_CMD(EVT_OP_CALL, TranslateModel, 31, -78, 19, 2), EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 31, -78, 19, 2),
EVT_CMD(EVT_OP_CALL, TranslateModel, 32, -78, 19, 2), EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 32, -78, 19, 2),
EVT_CMD(EVT_OP_CALL, TranslateModel, 31, EVT_VAR(0), EVT_VAR(1), 0), EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 31, EVT_VAR(0), EVT_VAR(1), 0),
EVT_CMD(EVT_OP_CALL, TranslateModel, 32, EVT_VAR(0), EVT_VAR(1), 0), EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 32, EVT_VAR(0), EVT_VAR(1), 0),
EVT_CMD(EVT_OP_CALL, RotateModel, 31, EVT_VAR(2), 0, 0, 1), EVT_CMD(EVT_OP_CALL, EVT_PTR(RotateModel), 31, EVT_VAR(2), 0, 0, 1),
EVT_CMD(EVT_OP_CALL, RotateModel, 32, EVT_VAR(2), 0, 0, 1), EVT_CMD(EVT_OP_CALL, EVT_PTR(RotateModel), 32, EVT_VAR(2), 0, 0, 1),
EVT_CMD(EVT_OP_CALL, TranslateModel, 31, 78, -19, -2), EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 31, 78, -19, -2),
EVT_CMD(EVT_OP_CALL, TranslateModel, 32, 78, -19, -2), EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 32, 78, -19, -2),
EVT_CMD(EVT_OP_WAIT_FRAMES, 1), EVT_CMD(EVT_OP_WAIT_FRAMES, 1),
EVT_CMD(EVT_OP_END_LOOP), EVT_CMD(EVT_OP_END_LOOP),
EVT_CMD(EVT_OP_LABEL, 0), EVT_CMD(EVT_OP_LABEL, 0),
EVT_CMD(EVT_OP_WAIT_FRAMES, 30), EVT_CMD(EVT_OP_WAIT_FRAMES, 30),
EVT_CMD(EVT_OP_CALL, ModifyColliderFlags, 0, 19, 0x7FFFFE00), EVT_CMD(EVT_OP_CALL, EVT_PTR(ModifyColliderFlags), 0, 19, 0x7FFFFE00),
EVT_CMD(EVT_OP_RETURN), EVT_CMD(EVT_OP_RETURN),
EVT_CMD(EVT_OP_END) EVT_CMD(EVT_OP_END)
}; };
@ -605,7 +605,7 @@ EvtSource N(80242910) = {
EVT_CMD(EVT_OP_SETF, EVT_VAR(5), EVT_FIXED(3.0)), EVT_CMD(EVT_OP_SETF, EVT_VAR(5), EVT_FIXED(3.0)),
EVT_CMD(EVT_OP_THREAD), EVT_CMD(EVT_OP_THREAD),
EVT_CMD(EVT_OP_WAIT_FRAMES, 15), EVT_CMD(EVT_OP_WAIT_FRAMES, 15),
EVT_CMD(EVT_OP_CALL, PlaySoundAtCollider, 18, 486, 0), EVT_CMD(EVT_OP_CALL, EVT_PTR(PlaySoundAtCollider), 18, 486, 0),
EVT_CMD(EVT_OP_END_THREAD), EVT_CMD(EVT_OP_END_THREAD),
EVT_CMD(EVT_OP_LOOP, 300), EVT_CMD(EVT_OP_LOOP, 300),
EVT_CMD(EVT_OP_ADDF, EVT_VAR(4), EVT_FIXED(-0.5)), EVT_CMD(EVT_OP_ADDF, EVT_VAR(4), EVT_FIXED(-0.5)),
@ -622,10 +622,10 @@ EvtSource N(80242910) = {
EVT_CMD(EVT_OP_END_IF), EVT_CMD(EVT_OP_END_IF),
EVT_CMD(EVT_OP_END_IF), EVT_CMD(EVT_OP_END_IF),
EVT_CMD(EVT_OP_END_IF), // BUG: extraneous END_IF EVT_CMD(EVT_OP_END_IF), // BUG: extraneous END_IF
EVT_CMD(EVT_OP_CALL, TranslateModel, 29, 124, 17, 3), EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 29, 124, 17, 3),
EVT_CMD(EVT_OP_CALL, TranslateModel, 29, EVT_VAR(0), EVT_VAR(1), 0), EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 29, EVT_VAR(0), EVT_VAR(1), 0),
EVT_CMD(EVT_OP_CALL, RotateModel, 29, EVT_VAR(2), 0, 0, -1), EVT_CMD(EVT_OP_CALL, EVT_PTR(RotateModel), 29, EVT_VAR(2), 0, 0, -1),
EVT_CMD(EVT_OP_CALL, TranslateModel, 29, -124, -17, -3), EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateModel), 29, -124, -17, -3),
EVT_CMD(EVT_OP_WAIT_FRAMES, 1), EVT_CMD(EVT_OP_WAIT_FRAMES, 1),
EVT_CMD(EVT_OP_END_LOOP), EVT_CMD(EVT_OP_END_LOOP),
EVT_CMD(EVT_OP_LABEL, 0), EVT_CMD(EVT_OP_LABEL, 0),
@ -932,16 +932,16 @@ EvtSource N(802436BC) = SCRIPT({
NpcSettings N(npcSettings_80243F10) = { NpcSettings N(npcSettings_80243F10) = {
.height = 32, .height = 32,
.radius = 24, .radius = 24,
.onHit = EnemyNpcHit, .onHit = &EnemyNpcHit,
.onDefeat = EnemyNpcDefeat, .onDefeat = &EnemyNpcDefeat,
.level = 20, .level = 20,
}; };
NpcSettings N(npcSettings_80243F3C) = { NpcSettings N(npcSettings_80243F3C) = {
.height = 34, .height = 34,
.radius = 24, .radius = 24,
.onHit = EnemyNpcHit, .onHit = &EnemyNpcHit,
.onDefeat = EnemyNpcDefeat, .onDefeat = &EnemyNpcDefeat,
.level = 26, .level = 26,
}; };
@ -1680,7 +1680,13 @@ static s32 N(pad_66B4)[] = {
#include "world/common/UnkTexturePanFunc2.inc.c" #include "world/common/UnkTexturePanFunc2.inc.c"
void playFX_82(); // It seems like playFX_82 was not properly defined for this file. Having a proper
// declaration makes it not match.
#ifdef AVOID_UB
void playFX_82(s32, f32, f32, f32, f32, s32);
#else
void playFX_82(s32, s32, s32, s32, s32, s32);
#endif
ApiStatus N(func_8024030C_CDC9AC)(Evt* script, s32 isInitialCall) { ApiStatus N(func_8024030C_CDC9AC)(Evt* script, s32 isInitialCall) {
playFX_82(1, 0, 0, 0, 0, 0); playFX_82(1, 0, 0, 0, 0, 0);
@ -1704,7 +1710,7 @@ typedef struct N(temp) {
} N(temp); } N(temp);
ApiStatus N(func_80240340_CDC9E0)(Evt* script, s32 isInitialCall) { ApiStatus N(func_80240340_CDC9E0)(Evt* script, s32 isInitialCall) {
N(temp)* ptr = script->varTable[15]; N(temp)* ptr = (N(temp)*) script->varTable[15];
ptr->unk_0C->unk_30 = 69; ptr->unk_0C->unk_30 = 69;
ptr->unk_0C->unk_34 = 255; ptr->unk_0C->unk_34 = 255;

View File

@ -36,11 +36,11 @@ EvtSource N(802409C0) = SCRIPT({
}); });
#else #else
EvtSource N(802409C0) = { EvtSource N(802409C0) = {
EVT_CMD(EVT_OP_CALL, GetEntryID, EVT_VAR(0)), EVT_CMD(EVT_OP_CALL, EVT_PTR(GetEntryID), EVT_VAR(0)),
EVT_CMD(EVT_OP_SWITCH, EVT_VAR(0)), EVT_CMD(EVT_OP_SWITCH, EVT_VAR(0)),
EVT_CMD(EVT_OP_CASE_OR_EQ, 0), EVT_CMD(EVT_OP_CASE_OR_EQ, 0),
EVT_CMD(EVT_OP_CASE_OR_EQ, 1), EVT_CMD(EVT_OP_CASE_OR_EQ, 1),
EVT_CMD(EVT_OP_CALL, SetMusicTrack, 0, SONG_CLOUDY_CLIMB, 0, 8), EVT_CMD(EVT_OP_CALL, EVT_PTR(SetMusicTrack), 0, SONG_CLOUDY_CLIMB, 0, 8),
EVT_CMD(EVT_OP_END_CASE_GROUP), EVT_CMD(EVT_OP_END_CASE_GROUP),
EVT_CMD(EVT_OP_CASE_OR_EQ, 2), EVT_CMD(EVT_OP_CASE_OR_EQ, 2),
EVT_CMD(EVT_OP_CASE_OR_EQ, 7), EVT_CMD(EVT_OP_CASE_OR_EQ, 7),
@ -48,8 +48,8 @@ EvtSource N(802409C0) = {
EVT_CMD(EVT_OP_CASE_EQ, 3), EVT_CMD(EVT_OP_CASE_EQ, 3),
EVT_CMD(EVT_OP_IF_NE, EVT_AREA_FLAG(44), 0), EVT_CMD(EVT_OP_IF_NE, EVT_AREA_FLAG(44), 0),
EVT_CMD(EVT_OP_ELSE), EVT_CMD(EVT_OP_ELSE),
EVT_CMD(EVT_OP_CALL, FadeOutMusic, 1, 3000), EVT_CMD(EVT_OP_CALL, EVT_PTR(FadeOutMusic), 1, 3000),
EVT_CMD(EVT_OP_CALL, FadeInMusic, 0, 50, 0, 3000, 0, 127), EVT_CMD(EVT_OP_CALL, EVT_PTR(FadeInMusic), 0, 50, 0, 3000, 0, 127),
EVT_CMD(EVT_OP_END_IF), EVT_CMD(EVT_OP_END_IF),
EVT_CMD(EVT_OP_END_CASE_GROUP), EVT_CMD(EVT_OP_END_CASE_GROUP),
EVT_CMD(EVT_OP_END_SWITCH), EVT_CMD(EVT_OP_END_SWITCH),
@ -662,7 +662,13 @@ EvtSource N(80242FD0) = SCRIPT({
#include "world/common/UnkTexturePanFunc2.inc.c" #include "world/common/UnkTexturePanFunc2.inc.c"
void playFX_82(); // It seems like playFX_82 was not properly defined for this file. Having a proper
// declaration makes it not match.
#ifdef AVOID_UB
void playFX_82(s32, f32, f32, f32, f32, s32);
#else
void playFX_82(s32, s32, s32, s32, s32, s32);
#endif
ApiStatus N(func_8024030C_CE39FC)(Evt* script, s32 isInitialCall) { ApiStatus N(func_8024030C_CE39FC)(Evt* script, s32 isInitialCall) {
playFX_82(1, 0, 0, 0, 0, 0); playFX_82(1, 0, 0, 0, 0, 0);

View File

@ -183,8 +183,8 @@ NpcSettings N(npcSettings_80241538) = {
.height = 21, .height = 21,
.radius = 22, .radius = 22,
.ai = &N(npcAI_802414C8), .ai = &N(npcAI_802414C8),
.onHit = EnemyNpcHit, .onHit = &EnemyNpcHit,
.onDefeat = EnemyNpcDefeat, .onDefeat = &EnemyNpcDefeat,
.level = 19, .level = 19,
}; };
@ -485,7 +485,7 @@ ApiStatus N(func_802402C0_CEE520)(Evt* script, s32 isInitialCall) {
ApiStatus N(func_802402F8_CEE558)(Evt* script, s32 isInitialCall) { ApiStatus N(func_802402F8_CEE558)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32* ptr = evt_get_variable(script, *args); s32* ptr = (s32*) evt_get_variable(script, *args);
s32 i; s32 i;
if (ptr != NULL) { if (ptr != NULL) {
@ -516,7 +516,7 @@ ApiStatus N(func_80240728_CEE988)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
EnemyTerritoryThing territory; EnemyTerritoryThing territory;
EnemyTerritoryThing* territoryPtr = &territory; EnemyTerritoryThing* territoryPtr = &territory;
NpcAISettings* aiSettings = evt_get_variable(script, *args); NpcAISettings* aiSettings = (NpcAISettings*) evt_get_variable(script, *args);
s32 var; s32 var;
territory.unk_00 = 0; territory.unk_00 = 0;

View File

@ -15,7 +15,6 @@ ApiStatus N(func_80240728_CEE988)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80240B68_CEEDC8)(Evt* script, s32 isInitialCall); ApiStatus N(func_80240B68_CEEDC8)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80240C2C_CEEE8C)(Evt* script, s32 isInitialCall); ApiStatus N(func_80240C2C_CEEE8C)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80240C9C_CEEEFC)(Evt* script, s32 isInitialCall); ApiStatus N(func_80240C9C_CEEEFC)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80240000_CEE260)(Evt *script, s32 isInitialCall);
extern NpcGroupList N(npcGroupList_80242568); extern NpcGroupList N(npcGroupList_80242568);
extern EvtSource N(main); extern EvtSource N(main);

View File

@ -186,7 +186,7 @@ EvtSource N(updateTexturePan_802417A0) = SCRIPT({
N(UnkTexturePanFunc2)(); N(UnkTexturePanFunc2)();
}); });
const char N(flo_10_name_hack)[]; extern const char N(flo_10_name_hack)[];
// BUG: missing END_SPAWN_THREADs // BUG: missing END_SPAWN_THREADs
#ifdef NON_EQUIVALENT #ifdef NON_EQUIVALENT
@ -231,32 +231,32 @@ EvtSource N(8024183C) = SCRIPT({
}); });
#else #else
EvtSource N(8024183C) = { EvtSource N(8024183C) = {
EVT_CMD(EVT_OP_CALL, DisablePlayerInput, 1), EVT_CMD(EVT_OP_CALL, EVT_PTR(DisablePlayerInput), 1),
EVT_CMD(EVT_OP_CALL, TranslateGroup, 100, 0, 45, 0), EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateGroup), 100, 0, 45, 0),
EVT_CMD(EVT_OP_CALL, UseSettingsFrom, 0, 170, 0, 160), EVT_CMD(EVT_OP_CALL, EVT_PTR(UseSettingsFrom), 0, 170, 0, 160),
EVT_CMD(EVT_OP_CALL, SetPanTarget, 0, 170, -90, 160), EVT_CMD(EVT_OP_CALL, EVT_PTR(SetPanTarget), 0, 170, -90, 160),
EVT_CMD(EVT_OP_CALL, SetCamDistance, 0, 800), EVT_CMD(EVT_OP_CALL, EVT_PTR(SetCamDistance), 0, 800),
EVT_CMD(EVT_OP_CALL, SetCamPitch, 0, EVT_FIXED(18.5), EVT_FIXED(-7.5)), EVT_CMD(EVT_OP_CALL, EVT_PTR(SetCamPitch), 0, EVT_FIXED(18.5), EVT_FIXED(-7.5)),
EVT_CMD(EVT_OP_CALL, SetCamPosA, 0, EVT_FIXED(-300.0), EVT_FIXED(200.0)), EVT_CMD(EVT_OP_CALL, EVT_PTR(SetCamPosA), 0, EVT_FIXED(-300.0), EVT_FIXED(200.0)),
EVT_CMD(EVT_OP_CALL, SetCamPosB, 0, EVT_FIXED(300.0), EVT_FIXED(-150.0)), EVT_CMD(EVT_OP_CALL, EVT_PTR(SetCamPosB), 0, EVT_FIXED(300.0), EVT_FIXED(-150.0)),
EVT_CMD(EVT_OP_CALL, SetCamSpeed, 0, EVT_FIXED(90.0)), EVT_CMD(EVT_OP_CALL, EVT_PTR(SetCamSpeed), 0, EVT_FIXED(90.0)),
EVT_CMD(EVT_OP_CALL, PanToTarget, 0, 0, 1), EVT_CMD(EVT_OP_CALL, EVT_PTR(PanToTarget), 0, 0, 1),
EVT_CMD(EVT_OP_CALL, PlaySound, 0x80000050), EVT_CMD(EVT_OP_CALL, EVT_PTR(PlaySound), 0x80000050),
EVT_CMD(EVT_OP_THREAD), EVT_CMD(EVT_OP_THREAD),
EVT_CMD(EVT_OP_CALL, MakeLerp, 80, 90, 10, 0), EVT_CMD(EVT_OP_CALL, EVT_PTR(MakeLerp), 80, 90, 10, 0),
EVT_CMD(EVT_OP_LABEL, 0), EVT_CMD(EVT_OP_LABEL, 0),
EVT_CMD(EVT_OP_CALL, UpdateLerp), EVT_CMD(EVT_OP_CALL, EVT_PTR(UpdateLerp)),
EVT_CMD(EVT_OP_CALL, RotateModel, 101, EVT_VAR(0), 1, 0, 0), EVT_CMD(EVT_OP_CALL, EVT_PTR(RotateModel), 101, EVT_VAR(0), 1, 0, 0),
EVT_CMD(EVT_OP_CALL, RotateModel, 103, EVT_VAR(0), 1, 0, 0), EVT_CMD(EVT_OP_CALL, EVT_PTR(RotateModel), 103, EVT_VAR(0), 1, 0, 0),
EVT_CMD(EVT_OP_IF_EQ, EVT_VAR(1), 1), EVT_CMD(EVT_OP_IF_EQ, EVT_VAR(1), 1),
EVT_CMD(EVT_OP_WAIT_FRAMES, 1), EVT_CMD(EVT_OP_WAIT_FRAMES, 1),
EVT_CMD(EVT_OP_GOTO, 0), EVT_CMD(EVT_OP_GOTO, 0),
EVT_CMD(EVT_OP_END_IF), EVT_CMD(EVT_OP_END_IF),
EVT_CMD(EVT_OP_THREAD), EVT_CMD(EVT_OP_THREAD),
EVT_CMD(EVT_OP_CALL, MakeLerp, 45, 100, 150, 0), EVT_CMD(EVT_OP_CALL, EVT_PTR(MakeLerp), 45, 100, 150, 0),
EVT_CMD(EVT_OP_LOOP, 0), EVT_CMD(EVT_OP_LOOP, 0),
EVT_CMD(EVT_OP_CALL, UpdateLerp), EVT_CMD(EVT_OP_CALL, EVT_PTR(UpdateLerp)),
EVT_CMD(EVT_OP_CALL, TranslateGroup, 100, 0, EVT_VAR(0), 0), EVT_CMD(EVT_OP_CALL, EVT_PTR(TranslateGroup), 100, 0, EVT_VAR(0), 0),
EVT_CMD(EVT_OP_WAIT_FRAMES, 1), EVT_CMD(EVT_OP_WAIT_FRAMES, 1),
EVT_CMD(EVT_OP_IF_EQ, EVT_VAR(1), 0), EVT_CMD(EVT_OP_IF_EQ, EVT_VAR(1), 0),
EVT_CMD(EVT_OP_BREAK_LOOP), EVT_CMD(EVT_OP_BREAK_LOOP),
@ -264,7 +264,7 @@ EvtSource N(8024183C) = {
EVT_CMD(EVT_OP_END_LOOP), EVT_CMD(EVT_OP_END_LOOP),
EVT_CMD(EVT_OP_WAIT_FRAMES, 30), EVT_CMD(EVT_OP_WAIT_FRAMES, 30),
EVT_CMD(EVT_OP_SET, EVT_STORY_PROGRESS, STORY_CH6_FILLED_SPRING_WITH_WATER), EVT_CMD(EVT_OP_SET, EVT_STORY_PROGRESS, STORY_CH6_FILLED_SPRING_WITH_WATER),
EVT_CMD(EVT_OP_CALL, GotoMap, N(flo_10_name_hack), 2), EVT_CMD(EVT_OP_CALL, EVT_PTR(GotoMap), EVT_PTR(N(flo_10_name_hack)), 2),
EVT_CMD(EVT_OP_WAIT_FRAMES, 100), EVT_CMD(EVT_OP_WAIT_FRAMES, 100),
EVT_CMD(EVT_OP_RETURN), EVT_CMD(EVT_OP_RETURN),
EVT_CMD(EVT_OP_END) EVT_CMD(EVT_OP_END)

View File

@ -139,13 +139,10 @@ ApiStatus func_80240510_B1BA80(Evt* script, s32 isInitialCall) {
void func_80240574_B1BAE4(void) { void func_80240574_B1BAE4(void) {
Npc* partner = get_npc_safe(NPC_PARTNER); Npc* partner = get_npc_safe(NPC_PARTNER);
if (partner == NULL) { if (partner != NULL) {
return ApiStatus_DONE2;
}
partner->flags |= 0x20000; partner->flags |= 0x20000;
partner->flags |= 0x80000; partner->flags |= 0x80000;
return ApiStatus_DONE2; }
} }
void func_802405B0_B1BB20(void) { void func_802405B0_B1BB20(void) {

View File

@ -1,5 +1,6 @@
#include "common.h" #include "common.h"
#include "npc.h" #include "npc.h"
#include "model.h"
void func_8011B950(u16, s32, s32, s32); void func_8011B950(u16, s32, s32, s32);

View File

@ -1,7 +1,7 @@
#include "common.h" #include "common.h"
#include "npc.h" #include "npc.h"
void N(UnkNpcAIFunc12)(Evt* script, NpcAISettings* aiSettings, s32 arg2) { void N(UnkNpcAIFunc12)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territoryPtr) {
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID); Npc* npc = get_npc_unsafe(enemy->npcID);
s32 temp; s32 temp;

View File

@ -30,6 +30,8 @@
#include "partner/twink.h" #include "partner/twink.h"
#include "sprite/npc/twink.h" #include "sprite/npc/twink.h"
extern s32 D_80108068[];
extern s32 D_801083D8[];
extern f32 D_8010CFC0; extern f32 D_8010CFC0;
extern s16 D_8010CFC8; extern s16 D_8010CFC8;
extern s16 D_8010CFCA; extern s16 D_8010CFCA;
@ -887,7 +889,7 @@ INCLUDE_ASM(void, "world/partners", partner_clear_player_tracking, Npc* partner)
s32 func_800EF4E0(void) { s32 func_800EF4E0(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Camera* cameras = &gCameras; Camera* cameras = gCameras;
s32 ret; s32 ret;
if (playerStatus->unk_90 == 0.0f) { if (playerStatus->unk_90 == 0.0f) {

View File

@ -48,5 +48,8 @@ void partner_do_player_collision(Npc* partner);
void partner_walking_follow_player(Npc* partner); void partner_walking_follow_player(Npc* partner);
s32 func_800EA52C(s32); s32 func_800EA52C(s32);
s32 func_800EF4E0(void); s32 func_800EF4E0(void);
void partner_suspend_ability_script(void);
void partner_resume_ability_script(void);
void partner_enable_input(void);
#endif #endif

View File

@ -20,17 +20,17 @@ ApiStatus func_80280410(Evt* script, s32 isInitialCall);
ApiStatus ShowShopPurchaseDialog(Evt* script, s32 isInitialCall); ApiStatus ShowShopPurchaseDialog(Evt* script, s32 isInitialCall);
ApiStatus ShowShopOwnerDialog(Evt* script, s32 isInitialCall); ApiStatus ShowShopOwnerDialog(Evt* script, s32 isInitialCall);
s32 ShopBeginSpeech[] = { 0x00000043, 0x00000006, SpeakToPlayer, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000000, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, }; EvtSource ShopBeginSpeech = { 0x00000043, 0x00000006, SpeakToPlayer, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000000, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, };
s32 ShopContinueSpeech[] = { 0x00000043, 0x00000006, ContinueSpeech, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000000, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, }; EvtSource ShopContinueSpeech = { 0x00000043, 0x00000006, ContinueSpeech, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000000, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, };
s32 ShopResetSpeech[] = { 0x00000043, 0x00000005, EndSpeech, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000000, 0x00000043, 0x00000006, SpeakToPlayer, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000000, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, }; EvtSource ShopResetSpeech = { 0x00000043, 0x00000005, EndSpeech, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000000, 0x00000043, 0x00000006, SpeakToPlayer, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000000, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, };
s32 ShopEndSpeech[] = { 0x00000043, 0x00000005, EndSpeech, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, }; EvtSource ShopEndSpeech = { 0x00000043, 0x00000005, EndSpeech, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, };
s32 D_80283F58_7E4DD8[] = { 0x00000043, 0x00000002, GetCurrentPartner, 0xFE363C81, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000000, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000002, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000003, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x00000002, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000001, func_802803C8, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000000, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000002, func_80280410, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, }; EvtSource D_80283F58_7E4DD8 = { 0x00000043, 0x00000002, GetCurrentPartner, 0xFE363C81, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000000, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000002, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C81, 0x00000003, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x00000002, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000001, func_802803C8, 0x0000000A, 0x00000002, 0xFE363C82, 0x00000000, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000002, func_80280410, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, };
s32 BadgeShopInteract[] = { 0x00000043, 0x00000002, ShowShopPurchaseDialog, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000001, ShowShopOwnerDialog, 0x00000002, 0x00000000, 0x00000001, 0x00000000, }; EvtSource BadgeShopInteract = { 0x00000043, 0x00000002, ShowShopPurchaseDialog, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000001, ShowShopOwnerDialog, 0x00000002, 0x00000000, 0x00000001, 0x00000000, };
s32 shop_owner_begin_speech(s32 messageIndex) { s32 shop_owner_begin_speech(s32 messageIndex) {
Shop* shop = gGameStatusPtr->mapShop; Shop* shop = gGameStatusPtr->mapShop;
@ -708,7 +708,7 @@ void shop_draw_item_desc(s32 arg0, s32 posX, s32 posY) {
draw_msg(shopItem->unk_08, posX + 8, posY, 255, 0xA, 0); draw_msg(shopItem->unk_08, posX + 8, posY, 255, 0xA, 0);
} }
extern void draw_shop_items(); extern void draw_shop_items(void);
// Problems with the struct iteration // Problems with the struct iteration
#ifdef NON_EQUIVALENT #ifdef NON_EQUIVALENT
void draw_shop_items(void) { void draw_shop_items(void) {
@ -875,6 +875,6 @@ INCLUDE_ASM(ApiStatus, "world/script_api/7E0E80", MakeShop, Evt* script, s32 isI
ApiStatus MakeShopOwner(Evt* script, s32 isInitialCall) { ApiStatus MakeShopOwner(Evt* script, s32 isInitialCall) {
Shop* mapShop = gGameStatusPtr->mapShop; Shop* mapShop = gGameStatusPtr->mapShop;
mapShop->owner = evt_get_variable(script, *script->ptrReadPos); mapShop->owner = (ShopOwner*) evt_get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -37,7 +37,7 @@ typedef struct {
} AssetHeader; // size = 0x1C } AssetHeader; // size = 0x1C
void load_map_script_lib(void) { void load_map_script_lib(void) {
dma_copy((s32)&world_script_api_ROM_START, (s32)&world_script_api_ROM_END, &world_script_api_VRAM); dma_copy((u8 *) &world_script_api_ROM_START, (u8 *) &world_script_api_ROM_END, &world_script_api_VRAM);
} }
void load_map_by_IDs(s16 areaID, s16 mapID, s16 loadType) { void load_map_by_IDs(s16 areaID, s16 mapID, s16 loadType) {
@ -221,17 +221,17 @@ void* load_asset_by_name(const char* assetName, u32* decompressedSize) {
AssetHeader* curAsset; AssetHeader* curAsset;
void* ret; void* ret;
dma_copy(ASSET_TABLE_FIRST_ENTRY, ASSET_TABLE_FIRST_ENTRY + sizeof(AssetHeader), &firstHeader); dma_copy((u8*) ASSET_TABLE_FIRST_ENTRY, (u8*) ASSET_TABLE_FIRST_ENTRY + sizeof(AssetHeader), &firstHeader);
assetTableBuffer = heap_malloc(firstHeader.offset); assetTableBuffer = heap_malloc(firstHeader.offset);
curAsset = &assetTableBuffer[0]; curAsset = &assetTableBuffer[0];
dma_copy(ASSET_TABLE_FIRST_ENTRY, ASSET_TABLE_FIRST_ENTRY + firstHeader.offset, assetTableBuffer); dma_copy((u8*) ASSET_TABLE_FIRST_ENTRY, (u8*) ASSET_TABLE_FIRST_ENTRY + firstHeader.offset, assetTableBuffer);
while (strcmp(curAsset->name, assetName) != 0) { while (strcmp(curAsset->name, assetName) != 0) {
curAsset++; curAsset++;
} }
*decompressedSize = curAsset->decompressedLength; *decompressedSize = curAsset->decompressedLength;
ret = general_heap_malloc(curAsset->compressedLength); ret = general_heap_malloc(curAsset->compressedLength);
dma_copy(ASSET_TABLE_FIRST_ENTRY + curAsset->offset, dma_copy((u8*) ASSET_TABLE_FIRST_ENTRY + curAsset->offset,
ASSET_TABLE_FIRST_ENTRY + curAsset->offset + curAsset->compressedLength, ret); (u8*) ASSET_TABLE_FIRST_ENTRY + curAsset->offset + curAsset->compressedLength, ret);
heap_free(assetTableBuffer); heap_free(assetTableBuffer);
return ret; return ret;
} }
@ -242,10 +242,10 @@ s32 get_asset_offset(char* assetName, s32* compressedSize) {
AssetHeader* curAsset; AssetHeader* curAsset;
s32 ret; s32 ret;
dma_copy(ASSET_TABLE_FIRST_ENTRY, ASSET_TABLE_FIRST_ENTRY + sizeof(AssetHeader), &firstHeader); dma_copy((u8*) ASSET_TABLE_FIRST_ENTRY, (u8*) ASSET_TABLE_FIRST_ENTRY + sizeof(AssetHeader), &firstHeader);
assetTableBuffer = heap_malloc(firstHeader.offset); assetTableBuffer = heap_malloc(firstHeader.offset);
curAsset = &assetTableBuffer[0]; curAsset = &assetTableBuffer[0];
dma_copy(ASSET_TABLE_FIRST_ENTRY, ASSET_TABLE_FIRST_ENTRY + firstHeader.offset, assetTableBuffer); dma_copy((u8*) ASSET_TABLE_FIRST_ENTRY, (u8*) ASSET_TABLE_FIRST_ENTRY + firstHeader.offset, assetTableBuffer);
while (strcmp(curAsset->name, assetName) != 0) { while (strcmp(curAsset->name, assetName) != 0) {
curAsset++; curAsset++;
} }