diff --git a/include/PR/os_internal_reg.h b/include/PR/os_internal_reg.h index a161998118..0806e9066c 100755 --- a/include/PR/os_internal_reg.h +++ b/include/PR/os_internal_reg.h @@ -12,7 +12,7 @@ /*---------------------------------------------------------------------* Copyright (C) 1998 Nintendo. (Originated by SGI) - + $RCSfile: os_internal_reg.h,v $ $Revision: 1.2 $ $Date: 1999/03/10 12:19:14 $ diff --git a/include/common_structs.h b/include/common_structs.h index ac265c8883..fb2408c844 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -1482,7 +1482,7 @@ typedef struct DecorationTable { /* 0x89C */ u8 rotZ[16]; /* 0x8AC */ s8 effectType; /* 0 = blur, 14 = none? */ /* 0x8AD */ char unk_8AD[3]; - /* 0x8B0 */ struct Temp8025D160* unk_8B0[2]; + /* 0x8B0 */ struct EffectInstance* unk_8B0[2]; /* 0x8B8 */ s8 decorationType[2]; /* 0x8BA */ u8 unk_8BA[2]; /* 0x8BC */ u8 unk_8BC[2]; diff --git a/include/dead.h b/include/dead.h index daa9bd869f..65636530eb 100644 --- a/include/dead.h +++ b/include/dead.h @@ -1,5 +1,3 @@ -#include "ultra64.h" - #ifndef _DEAD_H_ #define _DEAD_H_ @@ -92,8 +90,8 @@ #define guTranslateF dead_guTranslateF #define get_model_from_list_index dead_get_model_from_list_index #define get_model_list_index_from_tree_index dead_get_model_list_index_from_tree_index -#define guMtxCatF osSiRawReadIo -#define guMtxIdentF osGetCause +#define guMtxCatF dead_guMtxCatF +#define guMtxIdentF dead_guMtxIdentF //#define sqrtf dead_sqrtf // <- This somehow breaks things #endif diff --git a/include/effects.h b/include/effects.h index 1c1a7f2c6d..4c283bef4f 100644 --- a/include/effects.h +++ b/include/effects.h @@ -2,6 +2,7 @@ #define _EFFECTS_H_ #include "types.h" +#include "common_structs.h" typedef struct { char unk_00[0x38]; diff --git a/include/evt.h b/include/evt.h index 80b0d0757f..acc19b244a 100644 --- a/include/evt.h +++ b/include/evt.h @@ -113,7 +113,7 @@ enum { #define EVT_SAVE_FLAG(v) ((v - 130000000)) #define EVT_AREA_VAR(v) ((v - 150000000)) #define EVT_SAVE_VAR(v) ((v - 170000000)) -#define EVT_ARRAY(v) ((v - 190000000)) +#define EVT_ARRAY(v) (Bytecode) ((v - 190000000)) #define EVT_ARRAY_FLAG(v) ((v - 210000000)) #define EVT_FIXED(v) (((v * 1024.0f) + -230000000)) // See evt_float_to_fixed_var #define EVT_PTR(sym) (Bytecode) &sym diff --git a/include/functions.h b/include/functions.h index e3967f804c..27f489fb6e 100644 --- a/include/functions.h +++ b/include/functions.h @@ -519,9 +519,6 @@ void set_curtain_fade(f32 fade); void crash_screen_init(void); void crash_screen_set_draw_info(u16* frameBufPtr, s16 width, s16 height); -// Dead functions: -void dead_guTranslateF(float mf[4][4], float x, float y, float z); // Has to be externed for codegen to work! - void func_800495A0(Evt* script, NpcAISettings* npcAISettings, EnemyTerritoryThing* territory); void func_800496B8(Evt* script, NpcAISettings* npcAISettings, EnemyTerritoryThing* territory); void func_80049C04(Evt* script, NpcAISettings* npcAISettings, EnemyTerritoryThing* territory); @@ -532,9 +529,20 @@ void func_8004A124(Evt* script, NpcAISettings* npcAISettings, EnemyTerritoryThin void func_8004A3E8(Evt* script, NpcAISettings* npcAISettings, EnemyTerritoryThing* territory); void func_8004A73C(Evt* script); -s32 create_generic_entity_world(void (*updateFunc)(void), void (*drawFunc)(void)); +// This legally allows all functions to be pointers without warnings. +// Perhaps the void arg functions can be changed later to remove this need. +typedef union { + void (*func1)(Evt*, s32); + void (*func2)(void); +} WorldArgs __attribute__ ((__transparent_union__)); + +s32 create_generic_entity_world(WorldArgs, WorldArgs); + EntityModel* get_entity_model(s32 idx); f32 phys_get_spin_history(s32 lag, s32* x, s32* y, s32* z); +void fold_update(u32, s32, s32, s32, s32, s32, s32); +s32 func_8013A704(s32); +void free_generic_entity(s32); void sfx_get_spatialized_sound_params(f32 arg0, f32 arg1, f32 arg2, s16* arg3, s16* arg4, s32 arg5); void sfx_play_sound_with_params(s32 arg0, u8 arg1, u8 arg2, s16 arg3); @@ -644,6 +652,23 @@ void func_8024EFE0(f32 x, f32 y, f32 z, s32, s32, s32); void func_802664DC(f32 x, f32 y, f32 z, s32 attack, s32 a); s32 dispatch_damage_event_partner(s32 damageAmount, s32 event, s32 stopMotion); s32 calc_partner_test_enemy(void); +void reset_actor_blur(Actor*); +s32 func_8025C8A0(s32, ActorPart*); +void func_8025CD28(s32, ActorPart*); +void func_8025D158(ActorPart*, s32); +void func_8025D290(ActorPart*, s32); +void func_8025D3C4(ActorPart*, s32); +void func_8025D4A0(ActorPart*, s32); +void func_8025D620(ActorPart*, s32); +void func_8025D6FC(ActorPart*, s32); +void func_8025D810(ActorPart*, s32); +void func_8025D8EC(ActorPart*, s32); +void func_8025DA60(ActorPart*, s32); +void func_8025DBC8(ActorPart*, s32); +void func_8025DD40(ActorPart*, s32); +void func_8025DE88(ActorPart*, s32); +void func_800E9894(void); +void func_8013A854(u32); void init_encounters_ui(void); void initialize_collision(void); diff --git a/include/map.h b/include/map.h index 2ad6af3686..6eff9b1c96 100644 --- a/include/map.h +++ b/include/map.h @@ -28,7 +28,7 @@ typedef struct MapConfig { /* 0x38 */ BackgroundHeader* background; /* 0x3C */ union { s32 msgID; - UNK_FUN_PTR(get); + s32 (*get)(void); } tattle; } MapConfig; // size = 0x40 diff --git a/src/182B30.c b/src/182B30.c index e3891b1cbd..8bdd5cfb69 100644 --- a/src/182B30.c +++ b/src/182B30.c @@ -1,5 +1,6 @@ #include "common.h" #include "sprite.h" +#include "effects.h" #include "battle/battle.h" s32 func_80254250(void) { @@ -316,7 +317,7 @@ void func_80254C50(Actor* actor) { partTable->opacity = phi_s6 - (sp29C * phi_s4); func_802591EC(0, partTable, clamp_angle(scale + 0xB4), &sp218, 1); partTable->opacity = temp_s0_2; - } + } } } } @@ -389,16 +390,16 @@ void func_802552EC(s32 arg0, Actor* actor) { guMtxCatF(sp18, sp58, sp198); guMtxCatF(sp198, sp98, spD8); guScaleF(sp118, actor->scale.x * SPRITE_PIXEL_SCALE * actor->scalingFactor, - actor->scale.y * SPRITE_PIXEL_SCALE * actor->scalingFactor, + actor->scale.y * SPRITE_PIXEL_SCALE * actor->scalingFactor, actor->scale.z * SPRITE_PIXEL_SCALE); guMtxCatF(sp118, spD8, sp298); numParts = actor->numParts; partTable = actor->partsTable; for (i = 0; i < numParts; i++) { - if ((partTable->idleAnimations == NULL) || (partTable->flags & ACTOR_PART_FLAG_2)) { + if ((partTable->idleAnimations == NULL) || (partTable->flags & ACTOR_PART_FLAG_2)) { partTable = partTable->nextPart; - continue; + continue; } decorationTable = partTable->decorationTable; @@ -703,7 +704,7 @@ void update_player_actor_shadow(void) { func_802549F4(player); } - shadow = get_shadow_by_index(player->shadow); + shadow = get_shadow_by_index((s32) player->shadow); shadow->flags &= ~SHADOW_FLAGS_1; if (!battleStatus->outtaSightActive) { @@ -899,7 +900,7 @@ void func_8025D158(ActorPart* part, s32 decorationIndex) { INCLUDE_ASM(s32, "182B30", func_8025D160); void func_8025D290(ActorPart* part, s32 decorationIndex) { - part->decorationTable->unk_8B0[decorationIndex]->unk_0C->unk_2C = 5; + part->decorationTable->unk_8B0[decorationIndex]->data->unk_2C = 5; } INCLUDE_ASM(s32, "182B30", func_8025D2B0); @@ -916,25 +917,25 @@ void func_8025D4A0(ActorPart* part, s32 decorationIndex) { INCLUDE_ASM(s32, "182B30", func_8025D4C8); void func_8025D620(ActorPart* part, s32 decorationIndex) { - part->decorationTable->unk_8B0[decorationIndex]->unk_0C->unk_2C = 5; + part->decorationTable->unk_8B0[decorationIndex]->data->unk_2C = 5; } INCLUDE_ASM(s32, "182B30", func_8025D640); void func_8025D6FC(ActorPart* part, s32 decorationIndex) { - part->decorationTable->unk_8B0[decorationIndex]->unk_00 |= 0x10; + part->decorationTable->unk_8B0[decorationIndex]->flags |= 0x10; } INCLUDE_ASM(s32, "182B30", func_8025D71C); void func_8025D810(ActorPart* part, s32 decorationIndex) { - part->decorationTable->unk_8B0[decorationIndex]->unk_00 |= 0x10; + part->decorationTable->unk_8B0[decorationIndex]->flags |= 0x10; } INCLUDE_ASM(s32, "182B30", func_8025D830); void func_8025D8EC(ActorPart* part, s32 decorationIndex) { - part->decorationTable->unk_8B0[decorationIndex]->unk_00 |= 0x10; + part->decorationTable->unk_8B0[decorationIndex]->flags |= 0x10; } INCLUDE_ASM(s32, "182B30", func_8025D90C); @@ -950,12 +951,11 @@ void func_8025DBC8(ActorPart* part, s32 decorationIndex) { INCLUDE_ASM(s32, "182B30", func_8025DBD0); void func_8025DD40(ActorPart* actorPart, s32 decorationIndex) { - actorPart->decorationTable->unk_8B0[decorationIndex]->unk_0C->unk_2C = 5; + actorPart->decorationTable->unk_8B0[decorationIndex]->data->unk_2C = 5; } INCLUDE_ASM(s32, "182B30", func_8025DD60); void func_8025DE88(ActorPart* actorPart, s32 decorationIndex) { - actorPart->decorationTable->unk_8B0[decorationIndex]->unk_00 |= 0x10; + actorPart->decorationTable->unk_8B0[decorationIndex]->flags |= 0x10; } - diff --git a/src/1A5830.c b/src/1A5830.c index 1def8945b0..9e02494587 100644 --- a/src/1A5830.c +++ b/src/1A5830.c @@ -6,9 +6,6 @@ extern s32 D_802946E0[]; -void dispatch_event_actor(Actor* actor, s32 event); -void func_8024EFE0(f32 x, f32 y, f32 z, s32, s32, s32); -void func_802664DC(f32 x, f32 y, f32 z, s32 attack, s32 a); s32 dispatch_damage_event_actor_1(Actor* actor, s32 damageAmount, s32 event); s32 func_80263230(Actor*, Actor*); void func_80267018(Actor* actor, s32 arg1); diff --git a/src/8a860_len_3f30.c b/src/8a860_len_3f30.c index 0677e11d1a..27605b3477 100644 --- a/src/8a860_len_3f30.c +++ b/src/8a860_len_3f30.c @@ -61,7 +61,6 @@ extern PopupMenu* gPopupMenu; extern MessagePrintState* D_8010D6A0; extern s32 D_8010D6A4; -void func_800E9894(void); s8 func_800E98D4(void); enum PopupTypes { diff --git a/src/E225B0.c b/src/E225B0.c index e0feef4104..957318f212 100644 --- a/src/E225B0.c +++ b/src/E225B0.c @@ -34,7 +34,6 @@ extern void (*D_8010C93C)(void); extern struct802B7C78* D_802B7C78_E23228; extern struct8015A578 D_8015A578; -void fold_update(s32, s32, s32, s32, s32, s32, s32); void fold_appendGfx_component(s32, UnknownCommand*, s32, Matrix4f*); void func_802B735C_E2290C(void); diff --git a/src/EB1170.c b/src/EB1170.c index c13e5d78af..28dcae1082 100644 --- a/src/EB1170.c +++ b/src/EB1170.c @@ -49,7 +49,7 @@ ApiStatus func_802406A8_EB1508(Evt* script, s32 isInitialCall) { ApiStatus func_802406E0_EB1540(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - s32* ptr = evt_get_variable(script, *args++); + s32* ptr = (s32*) evt_get_variable(script, *args++); s32 i; if (ptr != NULL) { diff --git a/src/EF2680.c b/src/EF2680.c index 710d67decb..e8f4da2688 100644 --- a/src/EF2680.c +++ b/src/EF2680.c @@ -199,7 +199,7 @@ ApiStatus func_8024299C_EF4FAC(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings = (NpcAISettings*) evt_get_variable(script, *args); s32 var; u32 x, y, z; f32 x2, y2, z2, w2; diff --git a/src/EF7A80.c b/src/EF7A80.c index e8e897bcd9..2ed4f2fc3d 100644 --- a/src/EF7A80.c +++ b/src/EF7A80.c @@ -28,7 +28,7 @@ typedef struct temp { } temp; ApiStatus func_80240340_EF7DC0(Evt* script, s32 isInitialCall) { - temp* ptr = script->varTable[15]; + temp* ptr = (temp*) script->varTable[15]; ptr->unk_0C->unk_30 = 69; ptr->unk_0C->unk_34 = 255; diff --git a/src/battle/action_cmd/mega_shock.c b/src/battle/action_cmd/mega_shock.c index a0d5f1d325..8fc6870754 100644 --- a/src/battle/action_cmd/mega_shock.c +++ b/src/battle/action_cmd/mega_shock.c @@ -12,7 +12,6 @@ extern s32 D_802943C0; extern HudElementAnim D_80108B80; extern HudElementAnim D_80292374; -void btl_set_popup_duration(s32); void sfx_adjust_env_sound_params(s32, s32, s32, s32); typedef struct structD_802A9930_42E340 { diff --git a/src/battle/area_kmr_part_1/actor/goomba.c b/src/battle/area_kmr_part_1/actor/goomba.c index 8d05c747c7..9c28f7a641 100644 --- a/src/battle/area_kmr_part_1/actor/goomba.c +++ b/src/battle/area_kmr_part_1/actor/goomba.c @@ -302,7 +302,7 @@ EvtSource N(takeTurn_8021A300) = { EVT_WAIT_FRAMES(5) EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), ((0)), 0, 1, 16) + EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 1, 16) EVT_SWITCH(EVT_VAR(0)) EVT_CASE_OR_EQ(6) EVT_CASE_OR_EQ(5) @@ -414,7 +414,7 @@ EvtSource N(takeTurn_8021A300) = { EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.3), EVT_FIXED(0.5), EVT_FIXED(1.0)) EVT_WAIT_FRAMES(1) EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, EVT_VAR(0), ((0)), 0, 0, 1, 32) + EVT_CALL(EnemyDamageTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 0, 1, 32) EVT_SWITCH(EVT_VAR(0)) EVT_CASE_OR_EQ(0) EVT_CASE_OR_EQ(2) diff --git a/src/battle/area_kmr_part_1/actor/paragoomba.c b/src/battle/area_kmr_part_1/actor/paragoomba.c index fa52f230f3..4221d20219 100644 --- a/src/battle/area_kmr_part_1/actor/paragoomba.c +++ b/src/battle/area_kmr_part_1/actor/paragoomba.c @@ -381,7 +381,7 @@ EvtSource N(takeTurn_8021D74C) = { EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FIXED(6.0)) EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), ((0)), 0, 1, 16) + EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 1, 16) EVT_SWITCH(EVT_VAR(0)) EVT_CASE_OR_EQ(6) EVT_CASE_OR_EQ(5) @@ -457,7 +457,7 @@ EvtSource N(takeTurn_8021D74C) = { EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, 0) EVT_END_SWITCH EVT_WAIT_FRAMES(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, EVT_VAR(0), ((0)), 0, 0, 1, 32) + EVT_CALL(EnemyDamageTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 0, 1, 32) EVT_SWITCH(EVT_VAR(0)) EVT_CASE_OR_EQ(0) EVT_CASE_OR_EQ(2) @@ -780,7 +780,7 @@ EvtSource N(takeTurn_8021F0D8) = { EVT_WAIT_FRAMES(5) EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_normal_headbonk) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), ((0)), 0, 1, 16) + EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 1, 16) EVT_SWITCH(EVT_VAR(0)) EVT_CASE_OR_EQ(6) EVT_CASE_OR_EQ(5) @@ -892,7 +892,7 @@ EvtSource N(takeTurn_8021F0D8) = { EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.3), EVT_FIXED(0.5), EVT_FIXED(1.0)) EVT_WAIT_FRAMES(1) EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, EVT_VAR(0), ((0)), 0, 0, 1, 32) + EVT_CALL(EnemyDamageTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 0, 1, 32) EVT_SWITCH(EVT_VAR(0)) EVT_CASE_OR_EQ(0) EVT_CASE_OR_EQ(2) diff --git a/src/battle/area_kmr_part_1/actor/spiked_goomba.c b/src/battle/area_kmr_part_1/actor/spiked_goomba.c index 90fc6a366a..91cd2a7f5c 100644 --- a/src/battle/area_kmr_part_1/actor/spiked_goomba.c +++ b/src/battle/area_kmr_part_1/actor/spiked_goomba.c @@ -317,7 +317,7 @@ EvtSource N(takeTurn_8021BDDC) = { EVT_WAIT_FRAMES(5) EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_spiked_goomba_default_headbonk) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), ((0)), 0, 1, 16) + EVT_CALL(EnemyTestTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 1, 16) EVT_SWITCH(EVT_VAR(0)) EVT_CASE_OR_EQ(6) EVT_CASE_OR_EQ(5) @@ -429,7 +429,7 @@ EvtSource N(takeTurn_8021BDDC) = { EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.3), EVT_FIXED(0.5), EVT_FIXED(1.0)) EVT_WAIT_FRAMES(1) EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, EVT_VAR(0), ((0)), 0, 0, 2, 32) + EVT_CALL(EnemyDamageTarget, ACTOR_SELF, EVT_VAR(0), 0, 0, 0, 2, 32) EVT_SWITCH(EVT_VAR(0)) EVT_CASE_OR_EQ(0) EVT_CASE_OR_EQ(2) diff --git a/src/battle/area_kmr_part_2/actor/blue_goomba.c b/src/battle/area_kmr_part_2/actor/blue_goomba.c index 8154ac3928..c23707a022 100644 --- a/src/battle/area_kmr_part_2/actor/blue_goomba.c +++ b/src/battle/area_kmr_part_2/actor/blue_goomba.c @@ -303,7 +303,7 @@ EvtSource N(takeTurn_8021A5A0) = { EVT_WAIT_FRAMES(5) EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_bros_Palette_01_Anim_8) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), ((0)), 0, 1, 16) + EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, 16) EVT_SWITCH(LW(0)) EVT_CASE_OR_EQ(6) EVT_CASE_OR_EQ(5) @@ -415,7 +415,7 @@ EvtSource N(takeTurn_8021A5A0) = { EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.30078125), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) EVT_WAIT_FRAMES(1) EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), ((0)), 0, 0, 1, 32) + EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 1, 32) EVT_SWITCH(LW(0)) EVT_CASE_OR_EQ(0) EVT_CASE_OR_EQ(2) diff --git a/src/battle/area_kmr_part_2/actor/blue_goomba2.c b/src/battle/area_kmr_part_2/actor/blue_goomba2.c index e1cb328498..c43cfe4ad2 100644 --- a/src/battle/area_kmr_part_2/actor/blue_goomba2.c +++ b/src/battle/area_kmr_part_2/actor/blue_goomba2.c @@ -301,7 +301,7 @@ EvtSource N(takeTurn_8021E0F0) = { EVT_WAIT_FRAMES(5) EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_bros_Palette_01_Anim_8) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), ((0)), 0, 1, 16) + EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, 16) EVT_SWITCH(LW(0)) EVT_CASE_OR_EQ(6) EVT_CASE_OR_EQ(5) @@ -413,7 +413,7 @@ EvtSource N(takeTurn_8021E0F0) = { EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.30078125), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) EVT_WAIT_FRAMES(1) EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), ((0)), 0, 0, 1, 32) + EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 1, 32) EVT_SWITCH(LW(0)) EVT_CASE_OR_EQ(0) EVT_CASE_OR_EQ(2) diff --git a/src/battle/area_kmr_part_2/actor/goomba_king.c b/src/battle/area_kmr_part_2/actor/goomba_king.c index c8f2ac2576..f0ca0d14d7 100644 --- a/src/battle/area_kmr_part_2/actor/goomba_king.c +++ b/src/battle/area_kmr_part_2/actor/goomba_king.c @@ -405,7 +405,7 @@ EvtSource N(80221680) = { EVT_WAIT_FRAMES(1) EVT_END_LOOP EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), ((0)), 0, 2, 16) + EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), 0, 0, 2, 16) EVT_SWITCH(LW(10)) EVT_CASE_OR_EQ(6) EVT_CASE_OR_EQ(5) @@ -437,7 +437,7 @@ EvtSource N(80221680) = { EVT_CALL(MoveBattleCamOver, 20) EVT_WAIT_FRAMES(2) EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(10), ((0)), 0, 0, 1, 32) + EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(10), 0, 0, 0, 1, 32) EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) EVT_CALL(SetActorYaw, ACTOR_SELF, 0) EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) @@ -484,7 +484,7 @@ EvtSource N(80221CD4) = { EVT_CALL(PlayEffect, 0x14, 0, -15, 135, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0) EVT_CALL(PlayEffect, 0x14, 0, 100, 103, 0, 70, 0, 0, 0, 0, 0, 0, 0, 0) EVT_END_THREAD - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), ((0)), 0, 2, 16) + EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(10), 0, 0, 2, 16) EVT_SWITCH(LW(10)) EVT_CASE_OR_EQ(6) EVT_CASE_OR_EQ(5) @@ -620,7 +620,7 @@ EvtSource N(80221CD4) = { EVT_WAIT_FRAMES(24) EVT_WAIT_FRAMES(2) EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), ((0)), 65535, 0, 2, 32) + EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 65535, 0, 2, 32) EVT_SWITCH(LW(0)) EVT_CASE_EQ(10) EVT_RETURN diff --git a/src/battle/area_kmr_part_2/actor/red_goomba.c b/src/battle/area_kmr_part_2/actor/red_goomba.c index 42377af3aa..89efe03340 100644 --- a/src/battle/area_kmr_part_2/actor/red_goomba.c +++ b/src/battle/area_kmr_part_2/actor/red_goomba.c @@ -303,7 +303,7 @@ EvtSource N(takeTurn_8021C3B0) = { EVT_WAIT_FRAMES(5) EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_bros_Palette_00_Anim_8) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), ((0)), 0, 1, 16) + EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, 16) EVT_SWITCH(LW(0)) EVT_CASE_OR_EQ(6) EVT_CASE_OR_EQ(5) @@ -415,7 +415,7 @@ EvtSource N(takeTurn_8021C3B0) = { EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.30078125), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) EVT_WAIT_FRAMES(1) EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), ((0)), 0, 0, 1, 32) + EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 1, 32) EVT_SWITCH(LW(0)) EVT_CASE_OR_EQ(0) EVT_CASE_OR_EQ(2) diff --git a/src/battle/area_kmr_part_2/actor/red_goomba2.c b/src/battle/area_kmr_part_2/actor/red_goomba2.c index 97826bc690..d0084b3355 100644 --- a/src/battle/area_kmr_part_2/actor/red_goomba2.c +++ b/src/battle/area_kmr_part_2/actor/red_goomba2.c @@ -301,7 +301,7 @@ EvtSource N(takeTurn_8021FAF0) = { EVT_WAIT_FRAMES(5) EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) EVT_CALL(SetAnimation, ACTOR_SELF, 1, NPC_ANIM_goomba_bros_Palette_00_Anim_8) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), ((0)), 0, 1, 16) + EVT_CALL(EnemyTestTarget, ACTOR_SELF, LW(0), 0, 0, 1, 16) EVT_SWITCH(LW(0)) EVT_CASE_OR_EQ(6) EVT_CASE_OR_EQ(5) @@ -413,7 +413,7 @@ EvtSource N(takeTurn_8021FAF0) = { EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.30078125), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) EVT_WAIT_FRAMES(1) EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), ((0)), 0, 0, 1, 32) + EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LW(0), 0, 0, 0, 1, 32) EVT_SWITCH(LW(0)) EVT_CASE_OR_EQ(0) EVT_CASE_OR_EQ(2) diff --git a/src/battle/item/coconut.c b/src/battle/item/coconut.c index 04ee3c8c5e..46bf13dc0c 100644 --- a/src/battle/item/coconut.c +++ b/src/battle/item/coconut.c @@ -13,10 +13,10 @@ static s32 _pad = 0; /// 32x32 square. Vtx N(model)[] = { - { .v = { -16, -16, 0, FALSE, 0, 0, 0, 0, 0, 255 } }, - { .v = { 15, -16, 0, FALSE, 1024, 0, 0, 0, 0, 255 } }, - { .v = { 15, 15, 0, FALSE, 1024, 1024, 0, 0, 0, 255 } }, - { .v = { -16, 15, 0, FALSE, 0, 1024, 0, 0, 0, 255 } }, + { .v = {{ -16, -16, 0 }, FALSE, { 0, 0 }, { 0, 0, 0, 255 }}}, + { .v = {{ 15, -16, 0 }, FALSE, { 1024, 0 }, { 0, 0, 0, 255 }}}, + { .v = {{ 15, 15, 0 }, FALSE, { 1024, 1024 }, { 0, 0, 0, 255 }}}, + { .v = {{ -16, 15, 0 }, FALSE, { 0, 1024 }, { 0, 0, 0, 255 }}}, }; Gfx N(displayList)[] = { diff --git a/src/battle/item/coconut.h b/src/battle/item/coconut.h index 995ff0cb30..74a28d249a 100644 --- a/src/battle/item/coconut.h +++ b/src/battle/item/coconut.h @@ -7,8 +7,8 @@ #undef NAMESPACE #define NAMESPACE battle_item_coconut -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); ApiStatus func_802A1000_72F720(Evt* script, s32 isInitialCall); ApiStatus func_802A11D4_72F8F4(Evt* script, s32 isInitialCall); diff --git a/src/battle/item/dizzy_dial.h b/src/battle/item/dizzy_dial.h index b0260cf411..5a5e272dab 100644 --- a/src/battle/item/dizzy_dial.h +++ b/src/battle/item/dizzy_dial.h @@ -7,11 +7,10 @@ #undef NAMESPACE #define NAMESPACE battle_item_dizzy_dial -ApiStatus func_8024ECF8(Evt* script, s32 isInitialCall); ApiStatus func_80252B3C(Evt* script, s32 isInitialCall); ApiStatus N(func_802A1270_727B80)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/dried_shroom.h b/src/battle/item/dried_shroom.h index 293dc5b7e3..c9d8d1d9d4 100644 --- a/src/battle/item/dried_shroom.h +++ b/src/battle/item/dried_shroom.h @@ -10,8 +10,8 @@ ApiStatus N(func_802A123C_71CF1C)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A12FC_71CFDC)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); -EvtSource N(EatItem); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); +extern EvtSource N(EatItem); #endif diff --git a/src/battle/item/dusty_hammer.c b/src/battle/item/dusty_hammer.c index d644cb3672..c8c8459d34 100644 --- a/src/battle/item/dusty_hammer.c +++ b/src/battle/item/dusty_hammer.c @@ -12,10 +12,10 @@ static s32 _pad = 0; // XXX #include "battle/item/dusty_hammer.pal.inc.c" Vtx N(model)[] = { - { .v = { -16, -16, 0, FALSE, 0, 0, 0, 0, 0, 255 } }, - { .v = { 15, -16, 0, FALSE, 1024, 0, 0, 0, 0, 255 } }, - { .v = { 15, 15, 0, FALSE, 1024, 1024, 0, 0, 0, 255 } }, - { .v = { -16, 15, 0, FALSE, 0, 1024, 0, 0, 0, 255 } }, + { .v = {{ -16, -16, 0 }, FALSE, { 0, 0 }, { 0, 0, 0, 255 }}}, + { .v = {{ 15, -16, 0 }, FALSE, { 1024, 0 }, { 0, 0, 0, 255 }}}, + { .v = {{ 15, 15, 0 }, FALSE, { 1024, 1024 }, { 0, 0, 0, 255 }}}, + { .v = {{ -16, 15, 0 }, FALSE, { 0, 1024 }, { 0, 0, 0, 255 }}}, }; Gfx N(displayList)[] = { diff --git a/src/battle/item/dusty_hammer.h b/src/battle/item/dusty_hammer.h index 41b94d3741..46832529f5 100644 --- a/src/battle/item/dusty_hammer.h +++ b/src/battle/item/dusty_hammer.h @@ -7,7 +7,7 @@ #undef NAMESPACE #define NAMESPACE battle_item_dusty_hammer -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/egg_missile.c b/src/battle/item/egg_missile.c index cb92ceefad..6418ff9847 100644 --- a/src/battle/item/egg_missile.c +++ b/src/battle/item/egg_missile.c @@ -34,10 +34,10 @@ static s32 _pad = 0; #include "battle/item/egg_missile4.pal.inc.c" Vtx N(model)[] = { - { .v = { -16, -16, 0, FALSE, 0, 0, 0, 0, 0, 255 } }, - { .v = { 15, -16, 0, FALSE, 1024, 0, 0, 0, 0, 255 } }, - { .v = { 15, 15, 0, FALSE, 1024, 1024, 0, 0, 0, 255 } }, - { .v = { -16, 15, 0, FALSE, 0, 1024, 0, 0, 0, 255 } }, + { .v = {{ -16, -16, 0 }, FALSE, { 0, 0 }, { 0, 0, 0, 255 }}}, + { .v = {{ 15, -16, 0 }, FALSE, { 1024, 0 }, { 0, 0, 0, 255 }}}, + { .v = {{ 15, 15, 0 }, FALSE, { 1024, 1024 }, { 0, 0, 0, 255 }}}, + { .v = {{ -16, 15, 0 }, FALSE, { 0, 1024 }, { 0, 0, 0, 255 }}}, }; Gfx N(frame1_displayList)[] = { diff --git a/src/battle/item/egg_missile.h b/src/battle/item/egg_missile.h index d21de8a32a..9a907f75fa 100644 --- a/src/battle/item/egg_missile.h +++ b/src/battle/item/egg_missile.h @@ -7,8 +7,8 @@ #undef NAMESPACE #define NAMESPACE battle_item_egg_missile -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); ApiStatus N(func_802A123C_71CF1C)(Evt* script, s32 isInitialCall); diff --git a/src/battle/item/electro_pop.h b/src/battle/item/electro_pop.h index 8df2d94792..2f46bcd23a 100644 --- a/src/battle/item/electro_pop.h +++ b/src/battle/item/electro_pop.h @@ -12,8 +12,8 @@ ApiStatus N(func_802A14F0_730A90)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A133C_7308DC)(Evt* script, s32 isInitialCall); ApiStatus N(AddFP)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); -EvtSource N(EatItem); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); +extern EvtSource N(EatItem); #endif diff --git a/src/battle/item/fire_flower.h b/src/battle/item/fire_flower.h index 7dddb3b901..7f4147b324 100644 --- a/src/battle/item/fire_flower.h +++ b/src/battle/item/fire_flower.h @@ -11,7 +11,7 @@ ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A123C_716E9C)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A1378_716FD8)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/food.h b/src/battle/item/food.h index b5828d0da9..3a4b8135b8 100644 --- a/src/battle/item/food.h +++ b/src/battle/item/food.h @@ -15,10 +15,10 @@ ApiStatus N(func_802A1438_733508)(Evt* script, s32 isInitialCall); ApiStatus N(AddHP)(Evt* script, s32 isInitialCall); ApiStatus N(AddFP)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); -EvtSource N(UseItem); -EvtSource N(EatItem); -EvtSource N(DrinkItem); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); +extern EvtSource N(UseItem); +extern EvtSource N(EatItem); +extern EvtSource N(DrinkItem); #endif diff --git a/src/battle/item/fright_jar.h b/src/battle/item/fright_jar.h index fe194b4c0b..b33a46f6f0 100644 --- a/src/battle/item/fright_jar.h +++ b/src/battle/item/fright_jar.h @@ -11,7 +11,7 @@ ApiStatus func_80269EAC(Evt* script, s32 isInitialCall); ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A12D4_72BBE4)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/insecticide_herb.h b/src/battle/item/insecticide_herb.h index ae9d01a893..0f4b0d258e 100644 --- a/src/battle/item/insecticide_herb.h +++ b/src/battle/item/insecticide_herb.h @@ -7,8 +7,8 @@ #undef NAMESPACE #define NAMESPACE battle_item_insecticide_herb -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); ApiStatus N(func_802A12E0_72AA30)(Evt *script, s32 isInitialCall); ApiStatus N(func_802A123C_72A98C)(Evt *script, s32 isInitialCall); ApiStatus N(func_802A1280_72A9D0)(Evt *script, s32 isInitialCall); diff --git a/src/battle/item/life_shroom.h b/src/battle/item/life_shroom.h index 4ec7f138e8..b88fe458c3 100644 --- a/src/battle/item/life_shroom.h +++ b/src/battle/item/life_shroom.h @@ -13,9 +13,9 @@ ApiStatus N(func_802A1484_72E9B4)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A1438_72E968)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A1378_72E8A8)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); -EvtSource N(UseItem); -EvtSource N(EatItem); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); +extern EvtSource N(UseItem); +extern EvtSource N(EatItem); #endif diff --git a/src/battle/item/mushroom.h b/src/battle/item/mushroom.h index 95d7afd0a5..02dce7004c 100644 --- a/src/battle/item/mushroom.h +++ b/src/battle/item/mushroom.h @@ -15,9 +15,9 @@ ApiStatus N(func_802A1438_715C88)(Evt* script, s32 isInitialCall); ApiStatus N(AddHP)(Evt* script, s32 isInitialCall); ApiStatus N(AddFP)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); -EvtSource N(UseItem); -EvtSource N(EatItem); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); +extern EvtSource N(UseItem); +extern EvtSource N(EatItem); #endif diff --git a/src/battle/item/mystery.c b/src/battle/item/mystery.c index d7613b96c5..54c51f5d81 100644 --- a/src/battle/item/mystery.c +++ b/src/battle/item/mystery.c @@ -231,10 +231,10 @@ static s32 _pad = 0; #include "battle/item/mystery.pal.inc.c" Vtx N(model)[] = { - { .v = { -16, -16, 0, FALSE, 0, 0, 0, 0, 0, 255 } }, - { .v = { 15, -16, 0, FALSE, 1024, 0, 0, 0, 0, 255 } }, - { .v = { 15, 15, 0, FALSE, 1024, 1024, 0, 0, 0, 255 } }, - { .v = { -16, 15, 0, FALSE, 0, 1024, 0, 0, 0, 255 } }, + { .v = {{ -16, -16, 0 }, FALSE, { 0, 0 }, { 0, 0, 0, 255 }}}, + { .v = {{ 15, -16, 0 }, FALSE, { 1024, 0 }, { 0, 0, 0, 255 }}}, + { .v = {{ 15, 15, 0 }, FALSE, { 1024, 1024 }, { 0, 0, 0, 255 }}}, + { .v = {{ -16, 15, 0 }, FALSE, { 0, 1024 }, { 0, 0, 0, 255 }}}, }; Gfx N(displayList)[] = { diff --git a/src/battle/item/pebble.h b/src/battle/item/pebble.h index b622660934..690425d97d 100644 --- a/src/battle/item/pebble.h +++ b/src/battle/item/pebble.h @@ -7,7 +7,7 @@ #undef NAMESPACE #define NAMESPACE battle_item_pebble -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/please_come_back.h b/src/battle/item/please_come_back.h index 6edbfc31c9..eac43d951b 100644 --- a/src/battle/item/please_come_back.h +++ b/src/battle/item/please_come_back.h @@ -7,6 +7,6 @@ #undef NAMESPACE #define NAMESPACE battle_item_please_come_back -EvtSource N(UseItemWithEffect); +extern EvtSource N(UseItemWithEffect); #endif diff --git a/src/battle/item/pow_block.h b/src/battle/item/pow_block.h index 219b15aa80..3e720c638f 100644 --- a/src/battle/item/pow_block.h +++ b/src/battle/item/pow_block.h @@ -13,7 +13,7 @@ ApiStatus N(func_802A1318_718B68)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A123C_718A8C)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A12E4_718B34)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/repel_gel.h b/src/battle/item/repel_gel.h index c7d3459aa6..6c40725add 100644 --- a/src/battle/item/repel_gel.h +++ b/src/battle/item/repel_gel.h @@ -9,7 +9,7 @@ ApiStatus N(func_802A123C_72DDAC)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/shooting_star.h b/src/battle/item/shooting_star.h index c6be88cd78..6e7875a801 100644 --- a/src/battle/item/shooting_star.h +++ b/src/battle/item/shooting_star.h @@ -12,7 +12,7 @@ ApiStatus N(func_802A123C_71D9AC)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A1388_71DAF8)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A14D4_71DC44)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/sleepy_sheep.c b/src/battle/item/sleepy_sheep.c index a942b543af..77e502d0ef 100644 --- a/src/battle/item/sleepy_sheep.c +++ b/src/battle/item/sleepy_sheep.c @@ -240,10 +240,10 @@ static s32 _pad = 0; #include "battle/item/sleepy_sheep3.pal.inc.c" Vtx N(model)[] = { - { .v = { -28, 0, 0, FALSE, 0, 1536, 0, 0, 0, 255 } }, - { .v = { 27, 0, 0, FALSE, 1792, 1536, 0, 0, 0, 255 } }, - { .v = { 27, 47, 0, FALSE, 1792, 0, 0, 0, 0, 255 } }, - { .v = { -28, 47, 0, FALSE, 0, 0, 0, 0, 0, 255 } }, + { .v = {{ -28, 0, 0 }, FALSE, { 0, 1536 }, { 0, 0, 0, 255 }}}, + { .v = {{ 27, 0, 0 }, FALSE, { 1792, 1536 }, { 0, 0, 0, 255 }}}, + { .v = {{ 27, 47, 0 }, FALSE, { 1792, 0 }, { 0, 0, 0, 255 }}}, + { .v = {{ -28, 47, 0 }, FALSE, { 0, 0 }, { 0, 0, 0, 255 }}}, }; Gfx N(frame1_displayList)[] = { diff --git a/src/battle/item/sleepy_sheep.h b/src/battle/item/sleepy_sheep.h index 5d87887e12..857782d01e 100644 --- a/src/battle/item/sleepy_sheep.h +++ b/src/battle/item/sleepy_sheep.h @@ -15,8 +15,8 @@ ApiStatus N(func_802A123C_71E88C)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A1740_71ED90)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A1848_71EE98)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/snowman_doll.h b/src/battle/item/snowman_doll.h index 417df0e2af..a1a184abad 100644 --- a/src/battle/item/snowman_doll.h +++ b/src/battle/item/snowman_doll.h @@ -11,8 +11,8 @@ ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A123C_71C06C)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A13B8_71C1E8)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/stone_cap.h b/src/battle/item/stone_cap.h index 36d3878da4..580f75cedb 100644 --- a/src/battle/item/stone_cap.h +++ b/src/battle/item/stone_cap.h @@ -9,8 +9,8 @@ ApiStatus N(func_802A123C_7217DC)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/stop_watch.h b/src/battle/item/stop_watch.h index 78d0053b39..fdc2ff57cb 100644 --- a/src/battle/item/stop_watch.h +++ b/src/battle/item/stop_watch.h @@ -12,8 +12,8 @@ ApiStatus func_80252B3C(Evt* script, s32 isInitialCall); ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A12D4_7270A4)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/strange_cake.h b/src/battle/item/strange_cake.h index cc7e8dd614..dd677dff04 100644 --- a/src/battle/item/strange_cake.h +++ b/src/battle/item/strange_cake.h @@ -15,12 +15,12 @@ ApiStatus N(func_802A1AD8_731DD8)(Evt *script, s32 isInitialCall); ApiStatus N(func_802A1B14_731E14)(Evt *script, s32 isInitialCall); ApiStatus N(func_802A1B68_731E68)(Evt *script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); -EvtSource N(EatItem); -EvtSource N(script7); -EvtSource N(script8); -EvtSource N(script9); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); +extern EvtSource N(EatItem); +extern EvtSource N(script7); +extern EvtSource N(script8); +extern EvtSource N(script9); #endif diff --git a/src/battle/item/super_soda.h b/src/battle/item/super_soda.h index c3963fb925..d27ba0a377 100644 --- a/src/battle/item/super_soda.h +++ b/src/battle/item/super_soda.h @@ -13,8 +13,8 @@ ApiStatus N(func_802A1418_7250F8)(Evt* script, s32 isInitialCall); ApiStatus N(AddFP)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A1378_725058)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); -EvtSource N(UseItem); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); +extern EvtSource N(UseItem); #endif diff --git a/src/battle/item/tasty_tonic.h b/src/battle/item/tasty_tonic.h index 47a6798339..400cf4ce80 100644 --- a/src/battle/item/tasty_tonic.h +++ b/src/battle/item/tasty_tonic.h @@ -9,8 +9,8 @@ ApiStatus N(func_802A123C_72223C)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); -EvtSource N(DrinkItem); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); +extern EvtSource N(DrinkItem); #endif diff --git a/src/battle/item/thunder_bolt.h b/src/battle/item/thunder_bolt.h index 1695d9cfa8..3c8f2d0529 100644 --- a/src/battle/item/thunder_bolt.h +++ b/src/battle/item/thunder_bolt.h @@ -11,7 +11,7 @@ ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A123C_722D7C)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A1420_722F60)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/thunder_rage.h b/src/battle/item/thunder_rage.h index 5b3462a031..9e1600197c 100644 --- a/src/battle/item/thunder_rage.h +++ b/src/battle/item/thunder_rage.h @@ -11,7 +11,7 @@ ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A1354_71B4F4)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A12D4_71B474)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); #endif diff --git a/src/battle/item/ultra_shroom.h b/src/battle/item/ultra_shroom.h index 1e3a65ee34..2a790a1da0 100644 --- a/src/battle/item/ultra_shroom.h +++ b/src/battle/item/ultra_shroom.h @@ -10,8 +10,8 @@ ApiStatus N(func_802A123C_7239BC)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A12FC_723A7C)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); -EvtSource N(EatItem); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); +extern EvtSource N(EatItem); #endif diff --git a/src/battle/item/unknown_item.h b/src/battle/item/unknown_item.h index 90a7eb0761..16a3a2a8dc 100644 --- a/src/battle/item/unknown_item.h +++ b/src/battle/item/unknown_item.h @@ -10,8 +10,8 @@ ApiStatus N(func_802A123C_72447C)(Evt* script, s32 isInitialCall); ApiStatus N(func_802A12FC_72453C)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); -EvtSource N(EatItem); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); +extern EvtSource N(EatItem); #endif diff --git a/src/battle/item/volt_shroom.h b/src/battle/item/volt_shroom.h index 2261479080..977efdac98 100644 --- a/src/battle/item/volt_shroom.h +++ b/src/battle/item/volt_shroom.h @@ -9,8 +9,8 @@ ApiStatus N(func_802A123C_71AA2C)(Evt* script, s32 isInitialCall); -EvtSource N(UseItemWithEffect); -EvtSource N(PlayerGoHome); -EvtSource N(EatItem); +extern EvtSource N(UseItemWithEffect); +extern EvtSource N(PlayerGoHome); +extern EvtSource N(EatItem); #endif diff --git a/src/entity.c b/src/entity.c index f4e64d6770..664036475f 100644 --- a/src/entity.c +++ b/src/entity.c @@ -8,7 +8,6 @@ extern EntityModelList gWorldEntityModelList; extern EntityModelList gBattleEntityModelList; extern EntityModelList* gCurrentEntityModelList; extern s32 gEntityModelCount; -extern s32 D_8014C260[]; extern s32 entity_fog_enabled; extern s32 entity_fog_red; extern s32 entity_fog_green; @@ -374,7 +373,7 @@ void init_generic_entity_list(void) { } } -s32 create_generic_entity_world(void (*updateFunc)(void), void (*drawFunc)(void)) { +s32 create_generic_entity_world(void (*updateFunc)(Evt*, s32), void (*drawFunc)(Evt*, s32)) { s32 i; DynamicEntity* newDynEntity; diff --git a/src/world/area_arn/arn_03/events.c b/src/world/area_arn/arn_03/events.c index 5360cd03a5..4ed5212cd0 100644 --- a/src/world/area_arn/arn_03/events.c +++ b/src/world/area_arn/arn_03/events.c @@ -1039,7 +1039,7 @@ ApiStatus N(func_80241648_BE03D8)(Evt* script, s32 isInitialCall) { ApiStatus N(func_80241680_BE0410)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - s32* ptr = evt_get_variable(script, *args); + s32* ptr = (s32*) evt_get_variable(script, *args); s32 i; if (ptr != NULL) { diff --git a/src/world/area_arn/arn_04/events.c b/src/world/area_arn/arn_04/events.c index ce8b890c91..d6bb272d9b 100644 --- a/src/world/area_arn/arn_04/events.c +++ b/src/world/area_arn/arn_04/events.c @@ -346,7 +346,7 @@ ApiStatus N(func_8024219C_BE594C)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(enemy->npcID); EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings =(NpcAISettings*) evt_get_variable(script, *args); territory.unk_00 = 0; territory.shape = enemy->territory->wander.detectShape; diff --git a/src/world/area_arn/arn_07/events.c b/src/world/area_arn/arn_07/events.c index 9e9d6c13ae..be8697e5d3 100644 --- a/src/world/area_arn/arn_07/events.c +++ b/src/world/area_arn/arn_07/events.c @@ -1237,7 +1237,7 @@ ApiStatus N(func_80241C5C_BEEA4C)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(enemy->npcID); EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings =(NpcAISettings*) evt_get_variable(script, *args); territory.unk_00 = 0; territory.shape = enemy->territory->wander.detectShape; diff --git a/src/world/area_dgb/dgb_01/BFD9A0.c b/src/world/area_dgb/dgb_01/BFD9A0.c index cb419e829e..440cb7a557 100644 --- a/src/world/area_dgb/dgb_01/BFD9A0.c +++ b/src/world/area_dgb/dgb_01/BFD9A0.c @@ -536,7 +536,7 @@ ApiStatus N(func_8024142C_BFECAC)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(enemy->npcID); EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings =(NpcAISettings*) evt_get_variable(script, *args); territory.unk_00 = 0; territory.shape = enemy->territory->wander.detectShape; @@ -834,7 +834,7 @@ ApiStatus N(func_802422B0_BFFB30)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings =(NpcAISettings*) evt_get_variable(script, *args); territory.unk_00 = 0; territory.shape = enemy->territory->wander.detectShape; @@ -904,7 +904,7 @@ ApiStatus N(func_802422B0_BFFB30)(Evt* script, s32 isInitialCall) { return (script->functionTemp[0] == 100) * ApiStatus_DONE2; } -const char N(dgb_00_name_hack)[]; +extern const char N(dgb_00_name_hack)[]; EvtSource N(npcAI_80244D54) = { EVT_CALL(SetSelfVar, 0, 0) @@ -1228,7 +1228,7 @@ ApiStatus N(func_802430C0_C00940)(Evt* script, s32 isInitialCall) { #include "world/common/UnkFunc1.inc.c" -const char N(dgb_08_name_hack)[]; +extern const char N(dgb_08_name_hack)[]; EvtSource N(defeat_802457D8) = { EVT_CALL(N(UnkFunc1)) diff --git a/src/world/area_dgb/dgb_02/dgb_02.h b/src/world/area_dgb/dgb_02/dgb_02.h index 56c3cce03f..35d36d63e3 100644 --- a/src/world/area_dgb/dgb_02/dgb_02.h +++ b/src/world/area_dgb/dgb_02/dgb_02.h @@ -10,5 +10,5 @@ ApiStatus N(func_8024061C_C2F1BC)(Evt* script, s32 isInitialCall); ApiStatus N(func_802410D4_C2FC74)(Evt* script, s32 isInitialCall); ApiStatus N(UnkFunc7)(Evt *script, s32 isInitialCall); -NpcGroupList N(npcGroupList_802425C8); -EvtSource N(main); +extern NpcGroupList N(npcGroupList_802425C8); +extern EvtSource N(main); diff --git a/src/world/area_dgb/dgb_04/C36530.c b/src/world/area_dgb/dgb_04/C36530.c index 183b009a0c..a76cd794d1 100644 --- a/src/world/area_dgb/dgb_04/C36530.c +++ b/src/world/area_dgb/dgb_04/C36530.c @@ -1,4 +1,6 @@ #include "dgb_04.h" +#include "sprite.h" +#include "world/partners.h" #include "sprite/npc/sentinel.h" #include "message_ids.h" @@ -737,7 +739,7 @@ ApiStatus N(func_80242154_C38684)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings =(NpcAISettings*) evt_get_variable(script, *args); territory.unk_00 = 0; territory.shape = enemy->territory->wander.detectShape; diff --git a/src/world/area_dgb/dgb_05/dgb_05.h b/src/world/area_dgb/dgb_05/dgb_05.h index 117bd11a82..1ef9bda530 100644 --- a/src/world/area_dgb/dgb_05/dgb_05.h +++ b/src/world/area_dgb/dgb_05/dgb_05.h @@ -11,7 +11,7 @@ ApiStatus N(func_80240030_C3AA40)(Evt* script, s32 isInitialCall); ApiStatus N(UnkFunc7)(Evt* script, s32 isInitialCall); ApiStatus N(func_80240E80_C3B890)(Evt* script, s32 isInitialCall); -NpcGroupList N(npcGroupList_8024230C); -EvtSource N(802417F0); -EvtSource N(main); -EvtSource N(makeEntities); +extern NpcGroupList N(npcGroupList_8024230C); +extern EvtSource N(802417F0); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_06/dgb_06.h b/src/world/area_dgb/dgb_06/dgb_06.h index c41d6cf39c..64ba168295 100644 --- a/src/world/area_dgb/dgb_06/dgb_06.h +++ b/src/world/area_dgb/dgb_06/dgb_06.h @@ -6,6 +6,6 @@ #define NAMESPACE dgb_06 -NpcGroupList N(npcGroupList_80240B44); -EvtSource N(main); -EvtSource N(makeEntities); +extern NpcGroupList N(npcGroupList_80240B44); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_07/dgb_07.h b/src/world/area_dgb/dgb_07/dgb_07.h index ff4dc801e9..fdff6d38fd 100644 --- a/src/world/area_dgb/dgb_07/dgb_07.h +++ b/src/world/area_dgb/dgb_07/dgb_07.h @@ -10,5 +10,5 @@ ApiStatus N(func_80240E20_C3EA10)(Evt* script, s32 isInitialCall); ApiStatus N(UnkFunc7)(Evt *script, s32 isInitialCall); NpcGroupList N(npcGroupList_80241E5C); -EvtSource N(main); -EvtSource N(makeEntities); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_08/C3FDB0.c b/src/world/area_dgb/dgb_08/C3FDB0.c index 8566629ae8..dde40c2836 100644 --- a/src/world/area_dgb/dgb_08/C3FDB0.c +++ b/src/world/area_dgb/dgb_08/C3FDB0.c @@ -1,5 +1,7 @@ #include "dgb_08.h" #include "message_ids.h" +#include "sprite.h" +#include "world/partners.h" #include "sprite/npc/sentinel.h" #include "sprite/npc/world_clubba.h" #include "sprite/npc/world_tubba.h" @@ -284,7 +286,7 @@ NpcAISettings N(npcAISettings_802444B4) = { .unk_2C = 1, }; -const char N(dgb_00_name_hack)[]; +extern const char N(dgb_00_name_hack)[]; EvtSource N(npcAI_802444E4) = { EVT_CALL(SetSelfVar, 0, 0) @@ -463,7 +465,7 @@ EvtSource N(npcAI_80244D7C) = { EVT_END }; -const char N(dgb_01_name_hack)[]; +extern const char N(dgb_01_name_hack)[]; EvtSource N(defeat_80244E58) = { EVT_CALL(N(UnkFunc1)) @@ -1224,7 +1226,7 @@ ApiStatus N(func_80242A6C_C4281C)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(enemy->npcID); EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings = (NpcAISettings*) evt_get_variable(script, *args); territory.unk_00 = 0; territory.shape = enemy->territory->wander.detectShape; @@ -1523,7 +1525,7 @@ ApiStatus N(func_802438F0_C436A0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* npcAISettings = evt_get_variable(script, *args); + NpcAISettings* npcAISettings = (NpcAISettings*) evt_get_variable(script, *args); territory.unk_00 = 0; territory.shape = enemy->territory->wander.detectShape; diff --git a/src/world/area_dgb/dgb_08/dgb_08.h b/src/world/area_dgb/dgb_08/dgb_08.h index 2f7572a11d..d89adca22d 100644 --- a/src/world/area_dgb/dgb_08/dgb_08.h +++ b/src/world/area_dgb/dgb_08/dgb_08.h @@ -15,10 +15,10 @@ ApiStatus N(func_80243B98_C43948)(Evt* script, s32 isInitialCall); ApiStatus N(func_80243C10_C439C0)(Evt* script, s32 isInitialCall); ApiStatus N(func_80243C50_C43A00)(Evt* script, s32 isInitialCall); -NpcGroupList N(npcGroupList_80246958); -NpcGroupList N(npcGroupList_802469AC); -NpcGroupList N(npcGroupList_802469C4); -EvtSource N(802469E0); -EvtSource N(main); -EvtSource N(npcAI_80244D7C); -EvtSource N(unk_80244100); +extern NpcGroupList N(npcGroupList_80246958); +extern NpcGroupList N(npcGroupList_802469AC); +extern NpcGroupList N(npcGroupList_802469C4); +extern EvtSource N(802469E0); +extern EvtSource N(main); +extern EvtSource N(npcAI_80244D7C); +extern EvtSource N(unk_80244100); diff --git a/src/world/area_dgb/dgb_09/C46BE0.c b/src/world/area_dgb/dgb_09/C46BE0.c index 6754affaf4..1dea3d7756 100644 --- a/src/world/area_dgb/dgb_09/C46BE0.c +++ b/src/world/area_dgb/dgb_09/C46BE0.c @@ -1,10 +1,10 @@ #include "dgb_09.h" #include "message_ids.h" +#include "sprite.h" +#include "world/partners.h" #include "sprite/npc/sentinel.h" #include "sprite/npc/world_clubba.h" -extern Npc* wPartnerNpc; - enum { NPC_WORLD_CLUBBA0, NPC_WORLD_CLUBBA1, @@ -338,7 +338,7 @@ NpcAISettings N(npcAISettings_802443AC) = { .unk_2C = 1, }; -const char N(dgb_00_name_hack)[]; +extern const char N(dgb_00_name_hack)[]; EvtSource N(npcAI_802443DC) = { EVT_CALL(SetSelfVar, 0, 0) @@ -1035,7 +1035,7 @@ ApiStatus N(func_80242730_C49310)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(enemy->npcID); EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings =(NpcAISettings*) evt_get_variable(script, *args); territory.unk_00 = 0; territory.shape = enemy->territory->wander.detectShape; @@ -1326,7 +1326,7 @@ ApiStatus N(func_80243578_C4A158)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings =(NpcAISettings*) evt_get_variable(script, *args); territory.unk_00 = 0; territory.shape = enemy->territory->wander.detectShape; diff --git a/src/world/area_dgb/dgb_09/dgb_09.h b/src/world/area_dgb/dgb_09/dgb_09.h index ea622d777b..6e2c080212 100644 --- a/src/world/area_dgb/dgb_09/dgb_09.h +++ b/src/world/area_dgb/dgb_09/dgb_09.h @@ -11,6 +11,6 @@ ApiStatus N(func_802410D4_C47CB4)(Evt* script, s32 isInitialCall); ApiStatus N(func_80243578_C4A158)(Evt* script, s32 isInitialCall); ApiStatus N(UnkFunc7)(Evt *script, s32 isInitialCall); -NpcGroupList N(npcGroupList_8024533C); -EvtSource N(80243F6C); -EvtSource N(main); +extern NpcGroupList N(npcGroupList_8024533C); +extern EvtSource N(80243F6C); +extern EvtSource N(main); diff --git a/src/world/area_dgb/dgb_10/dgb_10.h b/src/world/area_dgb/dgb_10/dgb_10.h index e2cc5e371b..b59655db4c 100644 --- a/src/world/area_dgb/dgb_10/dgb_10.h +++ b/src/world/area_dgb/dgb_10/dgb_10.h @@ -11,9 +11,9 @@ ApiStatus N(func_802400A0_C4C430)(Evt* script, s32 isInitialCall); ApiStatus N(func_8024013C_C4C4CC)(Evt* script, s32 isInitialCall); ApiStatus N(func_802401C0_C4C550)(Evt* script, s32 isInitialCall); -EvtSource N(80240770); -EvtSource N(80240AF4); -EvtSource N(80240CB8); -EvtSource N(80240E68); -EvtSource N(main); -EvtSource N(makeEntities); +extern EvtSource N(80240770); +extern EvtSource N(80240AF4); +extern EvtSource N(80240CB8); +extern EvtSource N(80240E68); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_11/dgb_11.h b/src/world/area_dgb/dgb_11/dgb_11.h index 1efc66562b..72f7a36322 100644 --- a/src/world/area_dgb/dgb_11/dgb_11.h +++ b/src/world/area_dgb/dgb_11/dgb_11.h @@ -8,5 +8,5 @@ ApiStatus N(func_80240000_C4D3E0)(Evt* script, s32 isInitialCall); -EvtSource N(main); -EvtSource N(makeEntities); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_12/dgb_12.h b/src/world/area_dgb/dgb_12/dgb_12.h index ac8f16b8d9..3be539209d 100644 --- a/src/world/area_dgb/dgb_12/dgb_12.h +++ b/src/world/area_dgb/dgb_12/dgb_12.h @@ -6,6 +6,6 @@ #define NAMESPACE dgb_12 -EvtSource N(802405E0); -EvtSource N(main); -EvtSource N(makeEntities); +extern EvtSource N(802405E0); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_13/dgb_13.h b/src/world/area_dgb/dgb_13/dgb_13.h index 79b491726d..b5ce63c62d 100644 --- a/src/world/area_dgb/dgb_13/dgb_13.h +++ b/src/world/area_dgb/dgb_13/dgb_13.h @@ -6,6 +6,6 @@ #define NAMESPACE dgb_13 -EvtSource N(80240270); -EvtSource N(80240680); -EvtSource N(main); +extern EvtSource N(80240270); +extern EvtSource N(80240680); +extern EvtSource N(main); diff --git a/src/world/area_dgb/dgb_14/dgb_14.h b/src/world/area_dgb/dgb_14/dgb_14.h index 0e346fe9e4..fb24e84371 100644 --- a/src/world/area_dgb/dgb_14/dgb_14.h +++ b/src/world/area_dgb/dgb_14/dgb_14.h @@ -6,5 +6,5 @@ #define NAMESPACE dgb_14 -EvtSource N(main); -EvtSource N(makeEntities); +extern EvtSource N(main); +extern EvtSource N(makeEntities); diff --git a/src/world/area_dgb/dgb_18/C55F40.c b/src/world/area_dgb/dgb_18/C55F40.c index 42d5d7fa32..45ec93136e 100644 --- a/src/world/area_dgb/dgb_18/C55F40.c +++ b/src/world/area_dgb/dgb_18/C55F40.c @@ -426,7 +426,7 @@ EvtSource N(npcAI_80242834) = { EVT_END }; -const char N(dgb_01_name_hack)[]; +extern const char N(dgb_01_name_hack)[]; EvtSource N(defeat_802428E8) = { EVT_CALL(N(UnkFunc1)) diff --git a/src/world/area_dro/dro_01/95B7E0.c b/src/world/area_dro/dro_01/95B7E0.c index deffeba9b8..d7516c89d9 100644 --- a/src/world/area_dro/dro_01/95B7E0.c +++ b/src/world/area_dro/dro_01/95B7E0.c @@ -59,8 +59,6 @@ typedef struct { void N(func_802430C8_95E2C8)(Unk_Struct_1* ptr, s32 arg1); -EvtSource N(80248504); - typedef struct { /* 0x00 */ s32 flags; /* 0x04 */ s32 effectIndex; @@ -1564,7 +1562,7 @@ EvtSource N(80248504) = { EVT_END }; -s32 N(D_8024884C_963A4C)[] = { +Unk_Struct_2 N(D_8024884C_963A4C) = { 0x0000007D, 0x00000000, 0xFFFFFFD6, 0x0000004B, 0x0000004B, N(func_802430C8_95E2C8), }; @@ -2454,7 +2452,7 @@ s32 N(shopItemPositions_8024BA68)[] = { 0x004C0021, 0x004B0022, 0x00490023, 0x004A0024, 0x00480025, 0x00470026, }; -s32 N(shopOwnerNPC_8024BA80)[] = { +ShopOwner N(shopOwnerNPC_8024BA80) = { 0x00000006, 0x00940101, 0x00940105, N(8024B894), 0x00000000, 0x00000000, N(intTable_8024B4A0), }; @@ -2919,7 +2917,7 @@ EvtSource N(8024CF7C) = { EVT_END }; -const char N(dro_01_name_hack)[]; +extern const char N(dro_01_name_hack)[]; EvtSource N(8024D2B0) = { EVT_SET(EVT_SAVE_FLAG(761), 0) @@ -2974,11 +2972,11 @@ ApiStatus N(func_80241470_95C670)(Evt* script, s32 isInitialCall) { if (N(D_802451B8_9603B8) == NULL) { N(D_802451B8_9603B8) = heap_malloc(16 * sizeof(s32)); for (i = 0; i < 16; i++) { - N(D_802451B8_9603B8)[i] = script->varTable[i]; + N(D_802451B8_9603B8)[i] = (s32*) script->varTable[i]; } } else { for (i = 0; i < 16; i++) { - script->varTable[i] = N(D_802451B8_9603B8)[i]; + script->varTable[i] = (s32) N(D_802451B8_9603B8)[i]; } heap_free(N(D_802451B8_9603B8)); N(D_802451B8_9603B8) = NULL; @@ -3173,7 +3171,7 @@ ApiStatus N(func_80242784_95D984)(Evt* script, s32 isInitialCall) { ApiStatus N(func_802427BC_95D9BC)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - s32* ptr = evt_get_variable(script, *args); + s32* ptr = (s32*) evt_get_variable(script, *args); s32 i; if (ptr != NULL) { @@ -3192,15 +3190,15 @@ ApiStatus N(func_802427BC_95D9BC)(Evt* script, s32 isInitialCall) { ApiStatus N(func_80242858_95DA58)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; - Unk_Struct_2* temp_s1 = evt_get_variable(script, *script->ptrReadPos); + Unk_Struct_2* temp_s1 = (Unk_Struct_2*) evt_get_variable(script, *script->ptrReadPos); Unk_Struct_1* ptr; s32 atan_res1, atan_res2; s32 clamp; s32 res; if (isInitialCall) { - script->functionTemp[1] = (Unk_Struct_1*)heap_malloc(0x3C); - ptr = script->functionTemp[1]; + script->functionTemp[1] = (s32) heap_malloc(0x3C); + ptr = (Unk_Struct_1*) script->functionTemp[1]; ptr->unk_00 = temp_s1->unk_00; ptr->unk_04 = temp_s1->unk_04; ptr->unk_08 = temp_s1->unk_08; @@ -3218,7 +3216,7 @@ ApiStatus N(func_80242858_95DA58)(Evt* script, s32 isInitialCall) { ptr->unk_38 = 0; } - ptr = script->functionTemp[1]; + ptr = (Unk_Struct_1*) script->functionTemp[1]; switch (ptr->unk_20) { case 0: res = get_xz_dist_to_player(ptr->unk_00, ptr->unk_08); @@ -3345,7 +3343,7 @@ void N(func_802430C8_95E2C8)(Unk_Struct_1* ptr, s32 arg1) { if (ptr->unk_1C >= 6) { if (fabsf(get_clamped_angle_diff(atan2(125.0f, -42.0f, 152.0f, -61.0f), atan2(125.0f, -42.0f, playerStatus->position.x, playerStatus->position.z))) < 30.0f) { - start_script(N(80248504), 1, 0); + start_script(&N(80248504), 1, 0); ptr->unk_20 = 4; } } diff --git a/src/world/area_dro/dro_01/95E660.c b/src/world/area_dro/dro_01/95E660.c index 1be52498f8..cf442bbc4c 100644 --- a/src/world/area_dro/dro_01/95E660.c +++ b/src/world/area_dro/dro_01/95E660.c @@ -6,11 +6,11 @@ ApiStatus N(func_80243460_95E660)(Evt* script, s32 isInitialCall) { if (N(D_8024B5B0_9667B0) == NULL) { N(D_8024B5B0_9667B0) = heap_malloc(16 * sizeof(s32)); for (i = 0; i < 16; i++) { - N(D_8024B5B0_9667B0)[i] = script->varTable[i]; + N(D_8024B5B0_9667B0)[i] = (s32*) script->varTable[i]; } } else { for (i = 0; i < 16; i++) { - script->varTable[i] = N(D_8024B5B0_9667B0)[i]; + script->varTable[i] = (s32) N(D_8024B5B0_9667B0)[i]; } heap_free(N(D_8024B5B0_9667B0)); N(D_8024B5B0_9667B0) = NULL; diff --git a/src/world/area_dro/dro_01/dro_01.h b/src/world/area_dro/dro_01/dro_01.h index 53c50137ab..b666378118 100644 --- a/src/world/area_dro/dro_01/dro_01.h +++ b/src/world/area_dro/dro_01/dro_01.h @@ -89,6 +89,6 @@ extern EvtSource N(8024DD78); extern EvtSource N(main); extern EvtSource N(makeEntities); extern EvtSource N(shopItemPositions_8024BA68); -extern EvtSource N(shopOwnerNPC_8024BA80); +extern ShopOwner N(shopOwnerNPC_8024BA80); extern EvtSource N(unk_80248088); extern EvtSource N(unk_8024884C); diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 8eeb892963..4f8cade6bb 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -61,9 +61,9 @@ static N(temp)* N(D_8024EF90)[4]; // possibly bigger? static s8 N(pad_D_8024EF94)[0x18]; static s32 N(D_8024EFB8); static s8 N(pad_D_8024EFBC)[0x4]; -static EffectGraphics* N(D_8024EFC0); -static EffectGraphics* N(D_8024EFC4); -static EffectGraphics* N(D_8024EFC8); +static EffectInstance* N(D_8024EFC0); +static EffectInstance* N(D_8024EFC4); +static EffectInstance* N(D_8024EFC8); static Evt* N(D_8024EFCC); static s32 N(D_8024EFD0)[16]; static D_8024F010_Struct N(D_8024F010)[3]; @@ -91,36 +91,19 @@ MapConfig N(config) = { .tattle = { MSG_dro_02_tattle }, }; -// Extraneous END_CASE_MULTI -#ifdef NON_EQUIVALENT EvtSource N(80243AF0) = { - EVT_CALL(GetEntryID, EVT_VAR(0)) - EVT_SWITCH(EVT_VAR(0)) - EVT_CASE_OR_EQ(2) - EVT_CASE_OR_EQ(3) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_OUTPOST, 0, 8) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END -}; -#else -EvtSource N(80243AF0) = { - 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_CASE_OR_EQ, 2), EVT_CMD(EVT_OP_CASE_OR_EQ, 3), EVT_CMD(EVT_OP_END_CASE_GROUP), EVT_CMD(EVT_OP_CASE_DEFAULT), - EVT_CMD(EVT_OP_CALL, SetMusicTrack, 0, 21, 0, 8), + EVT_CMD(EVT_OP_CALL, EVT_PTR(SetMusicTrack), 0, 21, 0, 8), EVT_CMD(EVT_OP_END_CASE_GROUP), EVT_CMD(EVT_OP_END_SWITCH), EVT_CMD(EVT_OP_RETURN), EVT_CMD(EVT_OP_END) }; -#endif EvtSource N(80243B70) = { EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) @@ -1296,21 +1279,21 @@ s32 N(image1_pal)[] = { Vtx N(D_80247808_9709C8)[] = { - { .v = { -24, 2, 0, 0, 0, 60, 0xFF, 0xFF, 0xFF, 0xFF } }, - { .v = { -22, 0, 0, 0, 85, 0, 0xFF, 0xFF, 0xFF, 0xFF } }, - { .v = { 22, 0, 0, 0, 1963, 0, 0xFF, 0xFF, 0xFF, 0xFF } }, - { .v = { 24, 2, 0, 0, 2048, 60, 0xFF, 0xFF, 0xFF, 0xFF } }, - { .v = { 24, 66, 0, 0, 2048, 1988, 0xFF, 0xFF, 0xFF, 0xFF } }, - { .v = { 22, 68, 0, 0, 1963, 2048, 0xFF, 0xFF, 0xFF, 0xFF } }, - { .v = { -22, 68, 0, 0, 85, 2048, 0xFF, 0xFF, 0xFF, 0xFF } }, - { .v = { -24, 66, 0, 0, 0, 1988, 0xFF, 0xFF, 0xFF, 0xFF } }, + { .v = {{ -24, 2, 0 }, 0, { 0, 60 }, { 0xFF, 0xFF, 0xFF, 0xFF }}}, + { .v = {{ -22, 0, 0 }, 0, { 85, 0 }, { 0xFF, 0xFF, 0xFF, 0xFF }}}, + { .v = {{ 22, 0, 0 }, 0, { 1963, 0 }, { 0xFF, 0xFF, 0xFF, 0xFF }}}, + { .v = {{ 24, 2, 0 }, 0, { 2048, 60 }, { 0xFF, 0xFF, 0xFF, 0xFF }}}, + { .v = {{ 24, 66, 0 }, 0, { 2048, 1988 }, { 0xFF, 0xFF, 0xFF, 0xFF }}}, + { .v = {{ 22, 68, 0 }, 0, { 1963, 2048 }, { 0xFF, 0xFF, 0xFF, 0xFF }}}, + { .v = {{ -22, 68, 0 }, 0, { 85, 2048 }, { 0xFF, 0xFF, 0xFF, 0xFF }}}, + { .v = {{ -24, 66, 0 }, 0, { 0, 1988 }, { 0xFF, 0xFF, 0xFF, 0xFF }}}, }; Vtx N(D_80247888_970A48)[] = { - { .v = { -30, 68, -2, 0, 0, -160, 0x00, 0x00, 0x00, 0x00 } }, - { .v = { 30, 68, -2, 0, 1920, -160, 0x00, 0x00, 0x00, 0x00 } }, - { .v = { -30, 0, -2, 0, 0, 2016, 0x00, 0x00, 0x00, 0x00 } }, - { .v = { 30, 0, -2, 0, 1920, 2016, 0x00, 0x00, 0x00, 0x00 } }, + { .v = {{ -30, 68, -2 }, 0, { 0, -160 }, { 0x00, 0x00, 0x00, 0x00 }}}, + { .v = {{ 30, 68, -2 }, 0, { 1920, -160 }, { 0x00, 0x00, 0x00, 0x00 }}}, + { .v = {{ -30, 0, -2 }, 0, { 0, 2016 }, { 0x00, 0x00, 0x00, 0x00 }}}, + { .v = {{ 30, 0, -2 }, 0, { 1920, 2016 }, { 0x00, 0x00, 0x00, 0x00 }}}, }; Gfx N(D_802478C8_970A88)[] = { @@ -1690,284 +1673,138 @@ EvtSource N(80248A50) = { EVT_END }; -Gfx N(D_8024A3B8_973578)[]; -s32 N(D_80248DD8_971F98)[]; +extern Gfx N(D_8024A3B8_973578)[]; +extern Vtx vtx_971F98[]; -s32 N(D_80248AA0_971C60)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x02EE0000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248AA0_971C60) = { + .displayList = N(D_8024A3B8_973578), + .vertexStartOffset = 0x02EE, + .vtxList = vtx_971F98, }; -s32 N(D_80248ACC_971C8C)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, N(D_80248AA0_971C60), 0x00000000, - 0x02BC0000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248ACC_971C8C) = { + .displayList = N(D_8024A3B8_973578), + .sibling = &N(D_80248AA0_971C60), + .vertexStartOffset = 0x02BC, + .vtxList = vtx_971F98, }; -s32 N(D_80248AF8_971CB8)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, N(D_80248ACC_971C8C), 0x00000000, - 0x028A0000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248AF8_971CB8) = { + .displayList = N(D_8024A3B8_973578), + .sibling = &N(D_80248ACC_971C8C), + .vertexStartOffset = 0x028A, + .vtxList = vtx_971F98, }; -s32 N(D_80248B24_971CE4)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, N(D_80248AF8_971CB8), 0x00000000, - 0x02580000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248B24_971CE4) = { + .displayList = N(D_8024A3B8_973578), + .sibling = &N(D_80248AF8_971CB8), + .vertexStartOffset = 0x0258, + .vtxList = vtx_971F98, }; -s32 N(D_80248B50_971D10)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, N(D_80248B24_971CE4), 0x00000000, - 0x02260000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248B50_971D10) = { + .displayList = N(D_8024A3B8_973578), + .sibling = &N(D_80248B24_971CE4), + .vertexStartOffset = 0x0226, + .vtxList = vtx_971F98, }; -s32 N(D_80248B7C_971D3C)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, N(D_80248B50_971D10), 0x00000000, - 0x01F40000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248B7C_971D3C) = { + .displayList = N(D_8024A3B8_973578), + .sibling = &N(D_80248B50_971D10), + .vertexStartOffset = 0x01F4, + .vtxList = vtx_971F98, }; -s32 N(D_80248BA8_971D68)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, N(D_80248B7C_971D3C), 0x00000000, - 0x01C20000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248BA8_971D68) = { + .displayList = N(D_8024A3B8_973578), + .sibling = &N(D_80248B7C_971D3C), + .vertexStartOffset = 0x01C2, + .vtxList = vtx_971F98, }; -s32 N(D_80248BD4_971D94)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, N(D_80248BA8_971D68), 0x00000000, - 0x01900000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248BD4_971D94) = { + .displayList = N(D_8024A3B8_973578), + .sibling = &N(D_80248BA8_971D68), + .vertexStartOffset = 0x0190, + .vtxList = vtx_971F98, }; -s32 N(D_80248C00_971DC0)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, N(D_80248BD4_971D94), 0x00000000, - 0x015E0000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248C00_971DC0) = { + .displayList = N(D_8024A3B8_973578), + .sibling = &N(D_80248BD4_971D94), + .vertexStartOffset = 0x015E, + .vtxList = vtx_971F98, }; -s32 N(D_80248C2C_971DEC)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, N(D_80248C00_971DC0), 0x00000000, - 0x012C0000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248C2C_971DEC) = { + .displayList = N(D_8024A3B8_973578), + .sibling = &N(D_80248C00_971DC0), + .vertexStartOffset = 0x012C, + .vtxList = vtx_971F98, }; -s32 N(D_80248C58_971E18)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, N(D_80248C2C_971DEC), 0x00000000, - 0x00FA0000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248C58_971E18) = { + .displayList = N(D_8024A3B8_973578), + .sibling = &N(D_80248C2C_971DEC), + .vertexStartOffset = 0x00FA, + .vtxList = vtx_971F98, }; -s32 N(D_80248C84_971E44)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, N(D_80248C58_971E18), 0x00000000, - 0x00C80000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248C84_971E44) = { + .displayList = N(D_8024A3B8_973578), + .sibling = &N(D_80248C58_971E18), + .vertexStartOffset = 0x00C8, + .vtxList = vtx_971F98, }; -s32 N(D_80248CB0_971E70)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, N(D_80248C84_971E44), 0x00000000, - 0x00960000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248CB0_971E70) = { + .displayList = N(D_8024A3B8_973578), + .sibling = &N(D_80248C84_971E44), + .vertexStartOffset = 0x0096, + .vtxList = vtx_971F98, }; -s32 N(D_80248CDC_971E9C)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, N(D_80248CB0_971E70), 0x00000000, - 0x00640000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248CDC_971E9C) = { + .displayList = N(D_8024A3B8_973578), + .sibling = &N(D_80248CB0_971E70), + .vertexStartOffset = 0x0064, + .vtxList = vtx_971F98, }; -s32 N(D_80248D08_971EC8)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, N(D_80248CDC_971E9C), 0x00000000, - 0x00320000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248D08_971EC8) = { + .displayList = N(D_8024A3B8_973578), + .sibling = &N(D_80248CDC_971E9C), + .vertexStartOffset = 0x0032, + .vtxList = vtx_971F98, }; -s32 N(D_80248D34_971EF4)[] = { - N(D_8024A3B8_973578), 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, N(D_80248D08_971EC8), 0x00000000, - 0x00000000, N(D_80248DD8_971F98), 0x00000000, +StaticAnimatorNode N(D_80248D34_971EF4) = { + .displayList = N(D_8024A3B8_973578), + .sibling = &N(D_80248D08_971EC8), + .vertexStartOffset = 0, + .vtxList = vtx_971F98, }; -s32 N(D_80248D60_971F20)[] = { - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, N(D_80248D34_971EF4), - 0xFFFF0000, 0x00000000, 0x00000000, N(D_80248D60_971F20), - N(D_80248D34_971EF4), N(D_80248D08_971EC8), N(D_80248CDC_971E9C), N(D_80248CB0_971E70), - N(D_80248C84_971E44), N(D_80248C58_971E18), N(D_80248C2C_971DEC), N(D_80248C00_971DC0), - N(D_80248BD4_971D94), N(D_80248BA8_971D68), N(D_80248B7C_971D3C), N(D_80248B50_971D10), - N(D_80248B24_971CE4), N(D_80248AF8_971CB8), N(D_80248ACC_971C8C), N(D_80248AA0_971C60), - 0x00000000, 0x00000000, +StaticAnimatorNode N(D_80248D60_971F20) = { + .child = &N(D_80248D34_971EF4), + .vertexStartOffset = -1, }; -// Vertexes? -s32 N(D_80248DD8_971F98)[] = { - 0x00000000, 0x00000000, 0x04000000, 0xDB1396FF, 0x00000000, 0x00000000, 0x04120038, 0xB615A5FF, - 0x00000000, 0x00000000, 0x04000038, 0xD05CC5FF, 0x00000000, 0x00000000, 0x03ED0000, 0xF94FB2FF, - 0x00000000, 0x00000000, 0x04000071, 0xBB15A1FF, 0x00000000, 0x00000000, 0x03ED0071, 0xD75CC0FF, - 0x00000000, 0x00000000, 0x041200AA, 0xB615A5FF, 0x00000000, 0x00000000, 0x040000AA, 0xD05CC5FF, - 0x00000000, 0x00000000, 0x040000E3, 0xAE15ACFF, 0x00000000, 0x00000000, 0x03ED00E3, 0xC65BCFFF, - 0x00000000, 0x00000000, 0x0412011C, 0xB615A5FF, 0x00000000, 0x00000000, 0x0400011C, 0xD05CC5FF, - 0x00000000, 0x00000000, 0x04000155, 0xBF159FFF, 0x00000000, 0x00000000, 0x03ED0155, 0xDC5BBDFF, - 0x00000000, 0x00000000, 0x0412018E, 0xB615A5FF, 0x00000000, 0x00000000, 0x0400018E, 0xD05CC5FF, - 0x00000000, 0x00000000, 0x040001C7, 0xA515BAFF, 0x00000000, 0x00000000, 0x03ED01C7, 0xBB56DEFF, - 0x00000000, 0x00000000, 0x0400041C, 0x8E20F5FF, 0x00000000, 0x00000000, 0x03ED0400, 0xAC55F8FF, - 0x00000000, 0x00000000, 0x001201C7, 0x14564BFF, 0x00000000, 0x00000000, 0x001203FF, 0xF85554FF, - 0x00000000, 0x00000000, 0x0000041C, 0xF52072FF, 0x00000000, 0x00000000, 0x000001C7, 0x321567FF, - 0x00000000, 0x00000000, 0x00000038, 0x305C3BFF, 0x00000000, 0x00000000, 0x00120000, 0x4B4F16FF, - 0x00000000, 0x00000000, 0x00120071, 0x365C35FF, 0x00000000, 0x00000000, 0x000000AA, 0x305C3BFF, - 0x00000000, 0x00000000, 0x001200E3, 0x245B43FF, 0x00000000, 0x00000000, 0x0000011C, 0x305C3BFF, - 0x00000000, 0x00000000, 0x00120155, 0x3A5B31FF, 0x00000000, 0x00000000, 0x0000018E, 0x305C3BFF, - 0x00000000, 0x00000000, 0x00120000, 0x4B4F16FF, 0x00000000, 0x00000000, 0x00000038, 0x305C3BFF, - 0x00000000, 0x00000000, 0xFFEE0038, 0x4A155BFF, 0x00000000, 0x00000000, 0x00000000, 0x601339FF, - 0x00000000, 0x00000000, 0x00120071, 0x365C35FF, 0x00000000, 0x00000000, 0x00000071, 0x4F1557FF, - 0x00000000, 0x00000000, 0x000000AA, 0x305C3BFF, 0x00000000, 0x00000000, 0xFFEE00AA, 0x4A155BFF, - 0x00000000, 0x00000000, 0x001200E3, 0x245B43FF, 0x00000000, 0x00000000, 0x000000E3, 0x411561FF, - 0x00000000, 0x00000000, 0x0000011C, 0x305C3BFF, 0x00000000, 0x00000000, 0xFFEE011C, 0x4A155BFF, - 0x00000000, 0x00000000, 0x00120155, 0x3A5B31FF, 0x00000000, 0x00000000, 0x00000155, 0x521554FF, - 0x00000000, 0x00000000, 0x0000018E, 0x305C3BFF, 0x00000000, 0x00000000, 0xFFEE018E, 0x4A155BFF, - 0x00000000, 0x00000000, 0x001201C7, 0x14564BFF, 0x00000000, 0x00000000, 0x000001C7, 0x321567FF, +StaticAnimatorNode* N(D_80248D8C_971F4C)[] = { + &N(D_80248D60_971F20), &N(D_80248D34_971EF4), &N(D_80248D08_971EC8), &N(D_80248CDC_971E9C), + &N(D_80248CB0_971E70), &N(D_80248C84_971E44), &N(D_80248C58_971E18), &N(D_80248C2C_971DEC), + &N(D_80248C00_971DC0), &N(D_80248BD4_971D94), &N(D_80248BA8_971D68), &N(D_80248B7C_971D3C), + &N(D_80248B50_971D10), &N(D_80248B24_971CE4), &N(D_80248AF8_971CB8), &N(D_80248ACC_971C8C), + &N(D_80248AA0_971C60), 0x00000000, 0x00000000, }; -// vertexes but vtxdis ignores the flag entirely, and it's set here -s32 N(D_802490F8_9722B8)[] = { - 0xFE6F008C, 0xFE14FE4D, 0x008CFE21, 0xFE5300C8, 0xFE29FE75, 0x00BEFE1B, 0xFE39008C, 0xFE3FFE3F, - 0x00BEFE47, 0xFE1C008C, 0xFE49FE22, 0x00C8FE51, 0xFE0C008C, 0xFE64FE12, 0x00BEFE6C, 0xFDE6008C, - 0xFE75FDED, 0x00C8FE7C, 0xFDCE008C, 0xFE96FDD4, 0x00BEFE9E, 0xFDB1008C, 0xFEA0FDB7, 0x00C8FEA8, - 0xFDA1008C, 0xFEBBFDA8, 0x00BEFEC3, 0xFD2D008C, 0xFF1AFD3B, 0x00BEFF1B, 0xFEF000BE, 0x0055FE84, - 0x00BE00AD, 0xFE83008C, 0x00BBFEF6, 0x008C005D, 0xFFAA00C8, 0xFFCDFFBE, 0x00BEFFAE, 0xFF8800BE, - 0xFFDAFF79, 0x00C8FFF5, 0xFF5B00BE, 0xFFFFFF43, 0x00C8001F, 0xFF1D00BE, 0x0030FF0E, 0x00C8004B, - 0xFFBE00BE, 0xFFAEFFAA, 0x00C8FFCD, 0xFFB0008C, 0xFFD4FFC4, 0x008CFFB6, 0xFF8800BE, 0xFFDAFF8E, - 0x008CFFE2, 0xFF7900C8, 0xFFF5FF7F, 0x008CFFFC, 0xFF5B00BE, 0xFFFFFF61, 0x008C0005, 0xFF4300C8, - 0x001FFF49, 0x008C0027, 0xFF1D00BE, 0x0030FF23, 0x008C0038, 0xFF0E00C8, 0x004BFF14, 0x008C0053, - 0xFEF000BE, 0x0055FEF6, 0x008C005D, 0xFE6F008C, 0xFE14FE4D, 0x008CFE21, 0xFE5300C8, 0xFE29FE75, - 0x00BEFE1B, 0xFE39008C, 0xFE3FFE3F, 0x00BEFE47, 0xFE1C008C, 0xFE49FE22, 0x00C8FE51, 0xFE0C008C, - 0xFE64FE12, 0x00BEFE6C, 0xFDE6008C, 0xFE75FDED, 0x00C8FE7C, 0xFDCE008C, 0xFE96FDD4, 0x00BEFE9E, - 0xFDB1008C, 0xFEA0FDB7, 0x00C8FEA8, 0xFDA1008C, 0xFEBBFDA8, 0x00BEFEC3, 0xFD2D008C, 0xFF1AFD3B, - 0x00BEFF1B, 0xFEF000BE, 0x0055FE84, 0x00BE00AD, 0xFE83008C, 0x00BBFEF6, 0x008C005D, 0xFFAA00C8, - 0xFFCDFFBE, 0x00BEFFAE, 0xFF8800BE, 0xFFDAFF79, 0x00C8FFF5, 0xFF5B00BE, 0xFFFFFF43, 0x00C8001F, - 0xFF1D00BE, 0x0030FF0E, 0x00C8004B, 0xFFBE00BE, 0xFFAEFFAA, 0x00C8FFCD, 0xFFB0008C, 0xFFD4FFC4, - 0x008CFFB6, 0xFF8800BE, 0xFFDAFF8E, 0x008CFFE2, 0xFF7900C8, 0xFFF5FF7F, 0x008CFFFC, 0xFF5B00BE, - 0xFFFFFF61, 0x008C0005, 0xFF4300C8, 0x001FFF49, 0x008C0027, 0xFF1D00BE, 0x0030FF23, 0x008C0038, - 0xFF0E00C8, 0x004BFF14, 0x008C0053, 0xFEF000BE, 0x0055FEF6, 0x008C005D, 0xFE6F008C, 0xFE14FE4D, - 0x008CFE21, 0xFE5300C8, 0xFE29FE75, 0x00BEFE1B, 0xFE39008C, 0xFE3FFE3F, 0x00BEFE47, 0xFE1C008C, - 0xFE49FE22, 0x00C8FE51, 0xFE0C008C, 0xFE64FE12, 0x00BEFE6C, 0xFDE6008C, 0xFE75FDED, 0x00C8FE7C, - 0xFDCE008C, 0xFE96FDD4, 0x00BEFE9E, 0xFDB1008C, 0xFEA0FDB7, 0x00C8FEA8, 0xFDA1008C, 0xFEBBFDA8, - 0x00BEFEC3, 0xFD2D008C, 0xFF1AFD3B, 0x00BEFF1B, 0xFEF000BE, 0x0055FE84, 0x00BE00AD, 0xFE83008C, - 0x00BBFEF6, 0x008C005D, 0xFFAA00C8, 0xFFCDFFBE, 0x00BEFFAE, 0xFF8800BE, 0xFFDAFF79, 0x00C8FFF5, - 0xFF5B00BE, 0xFFFFFF43, 0x00C8001F, 0xFF1D00BE, 0x0030FF0E, 0x00C8004B, 0xFFBE00BE, 0xFFAEFFAA, - 0x00C8FFCD, 0xFFB0008C, 0xFFD4FFC4, 0x008CFFB6, 0xFF8800BE, 0xFFDAFF8E, 0x008CFFE2, 0xFF7900C8, - 0xFFF5FF7F, 0x008CFFFC, 0xFF5B00BE, 0xFFFFFF61, 0x008C0005, 0xFF4300C8, 0x001FFF49, 0x008C0027, - 0xFF1D00BE, 0x0030FF23, 0x008C0038, 0xFF0E00C8, 0x004BFF14, 0x008C0053, 0xFEF000BE, 0x0055FEF6, - 0x008C005D, 0xFE6F008C, 0xFE14FE4D, 0x008CFE21, 0xFE5300C8, 0xFE29FE75, 0x00BEFE1B, 0xFE39008C, - 0xFE3FFE3F, 0x00BEFE47, 0xFE1C008C, 0xFE49FE22, 0x00C8FE51, 0xFE0C008C, 0xFE64FE12, 0x00BEFE6C, - 0xFDE6008C, 0xFE75FDED, 0x00C8FE7C, 0xFDCE008C, 0xFE96FDD4, 0x00BEFE9E, 0xFDB1008C, 0xFEA0FDB7, - 0x00C8FEA8, 0xFDA1008C, 0xFEBBFDA8, 0x00BEFEC3, 0xFD2D008C, 0xFF1AFD3B, 0x00BEFF1B, 0xFEF000BE, - 0x0055FE84, 0x00BE00AD, 0xFE83008C, 0x00BBFEF6, 0x008C005D, 0xFFAA00C8, 0xFFCDFFBE, 0x00BEFFAE, - 0xFF8800BE, 0xFFDAFF79, 0x00C8FFF5, 0xFF5B00BE, 0xFFFFFF43, 0x00C8001F, 0xFF1D00BE, 0x0030FF0E, - 0x00C8004B, 0xFFBE00BE, 0xFFAEFFAA, 0x00C8FFCD, 0xFFB0008C, 0xFFD4FFC4, 0x008CFFB6, 0xFF8800BE, - 0xFFDAFF8E, 0x008CFFE2, 0xFF7900C8, 0xFFF5FF7F, 0x008CFFFC, 0xFF5B00BE, 0xFFFFFF61, 0x008C0005, - 0xFF4300C8, 0x001FFF49, 0x008C0027, 0xFF1D00BE, 0x0030FF23, 0x008C0038, 0xFF0E00C8, 0x004BFF14, - 0x008C0053, 0xFEF000BE, 0x0055FEF6, 0x008C005D, 0xFE6F008C, 0xFE14FE4D, 0x008CFE21, 0xFE5300C8, - 0xFE29FE75, 0x00BEFE1B, 0xFE39008C, 0xFE3FFE3F, 0x00BEFE47, 0xFE1C008C, 0xFE49FE22, 0x00C8FE51, - 0xFE0C008C, 0xFE64FE12, 0x00BEFE6C, 0xFDE6008C, 0xFE75FDED, 0x00C8FE7C, 0xFDCE008C, 0xFE96FDD4, - 0x00BEFE9E, 0xFDB1008C, 0xFEA0FDB7, 0x00C8FEA8, 0xFDA1008C, 0xFEBBFDA8, 0x00BEFEC3, 0xFD2D008C, - 0xFF1AFD3B, 0x00BEFF1B, 0xFEF000BE, 0x0055FE84, 0x00BE00AD, 0xFE83008C, 0x00BBFEF6, 0x008C005D, - 0xFFAA00C8, 0xFFCDFFBE, 0x00BEFFAE, 0xFF8800BE, 0xFFDAFF79, 0x00C8FFF5, 0xFF5B00BE, 0xFFFFFF43, - 0x00C8001F, 0xFF1D00BE, 0x0030FF0E, 0x00C8004B, 0xFFBE00BE, 0xFFAEFFAA, 0x00C8FFCD, 0xFFB0008C, - 0xFFD4FFC4, 0x008CFFB6, 0xFF8800BE, 0xFFDAFF8E, 0x008CFFE2, 0xFF7900C8, 0xFFF5FF7F, 0x008CFFFC, - 0xFF5B00BE, 0xFFFFFF61, 0x008C0005, 0xFF4300C8, 0x001FFF49, 0x008C0027, 0xFF1D00BE, 0x0030FF23, - 0x008C0038, 0xFF0E00C8, 0x004BFF14, 0x008C0053, 0xFEF000BE, 0x0055FEF6, 0x008C005D, 0xFE6F008C, - 0xFE14FE4D, 0x008CFE21, 0xFE5300C8, 0xFE29FE75, 0x00BEFE1B, 0xFE39008C, 0xFE3FFE3F, 0x00BEFE47, - 0xFE1C008C, 0xFE49FE22, 0x00C8FE51, 0xFE0C008C, 0xFE64FE12, 0x00BEFE6C, 0xFDE6008C, 0xFE75FDED, - 0x00C8FE7C, 0xFDCE008C, 0xFE96FDD4, 0x00BEFE9E, 0xFDB1008C, 0xFEA0FDB7, 0x00C8FEA8, 0xFDA1008C, - 0xFEBBFDA8, 0x00BEFEC3, 0xFD2D008C, 0xFF1AFD3B, 0x00BEFF1B, 0xFEF000BE, 0x0055FE84, 0x00BE00AD, - 0xFE83008C, 0x00BBFEF6, 0x008C005D, 0xFFAA00C8, 0xFFCDFFBE, 0x00BEFFAE, 0xFF8800BE, 0xFFDAFF79, - 0x00C8FFF5, 0xFF5B00BE, 0xFFFFFF43, 0x00C8001F, 0xFF1D00BE, 0x0030FF0E, 0x00C8004B, 0xFFBE00BE, - 0xFFAEFFAA, 0x00C8FFCD, 0xFFB0008C, 0xFFD4FFC4, 0x008CFFB6, 0xFF8800BE, 0xFFDAFF8E, 0x008CFFE2, - 0xFF7900C8, 0xFFF5FF7F, 0x008CFFFC, 0xFF5B00BE, 0xFFFFFF61, 0x008C0005, 0xFF4300C8, 0x001FFF49, - 0x008C0027, 0xFF1D00BE, 0x0030FF23, 0x008C0038, 0xFF0E00C8, 0x004BFF14, 0x008C0053, 0xFEF000BE, - 0x0055FEF6, 0x008C005D, 0xFE6F008C, 0xFE14FE4D, 0x008CFE21, 0xFE5300C8, 0xFE29FE75, 0x00BEFE1B, - 0xFE39008C, 0xFE3FFE3F, 0x00BEFE47, 0xFE1C008C, 0xFE49FE22, 0x00C8FE51, 0xFE0C008C, 0xFE64FE12, - 0x00BEFE6C, 0xFDE6008C, 0xFE75FDED, 0x00C8FE7C, 0xFDCE008C, 0xFE96FDD4, 0x00BEFE9E, 0xFDB1008C, - 0xFEA0FDB7, 0x00C8FEA8, 0xFDA1008C, 0xFEBBFDA8, 0x00BEFEC3, 0xFD2D008C, 0xFF1AFD3B, 0x00BEFF1B, - 0xFEF000BE, 0x0055FE84, 0x00BE00AD, 0xFE83008C, 0x00BBFEF6, 0x008C005D, 0xFFAA00C8, 0xFFCDFFBE, - 0x00BEFFAE, 0xFF8800BE, 0xFFDAFF79, 0x00C8FFF5, 0xFF5B00BE, 0xFFFFFF43, 0x00C8001F, 0xFF1D00BE, - 0x0030FF0E, 0x00C8004B, 0xFFBE00BE, 0xFFAEFFAA, 0x00C8FFCD, 0xFFB0008C, 0xFFD4FFC4, 0x008CFFB6, - 0xFF8800BE, 0xFFDAFF8E, 0x008CFFE2, 0xFF7900C8, 0xFFF5FF7F, 0x008CFFFC, 0xFF5B00BE, 0xFFFFFF61, - 0x008C0005, 0xFF4300C8, 0x001FFF49, 0x008C0027, 0xFF1D00BE, 0x0030FF23, 0x008C0038, 0xFF0E00C8, - 0x004BFF14, 0x008C0053, 0xFEF000BE, 0x0055FEF6, 0x008C005D, 0xFE6F008C, 0xFE14FE4D, 0x008CFE21, - 0xFE5300C8, 0xFE29FE75, 0x00BEFE1B, 0xFE39008C, 0xFE3FFE3F, 0x00BEFE47, 0xFE1C008C, 0xFE49FE22, - 0x00C8FE51, 0xFE0C008C, 0xFE64FE12, 0x00BEFE6C, 0xFDE6008C, 0xFE75FDED, 0x00C8FE7C, 0xFDCE008C, - 0xFE96FDD4, 0x00BEFE9E, 0xFDB1008C, 0xFEA0FDB7, 0x00C8FEA8, 0xFDA1008C, 0xFEBBFDA8, 0x00BEFEC3, - 0xFD2D008C, 0xFF1AFD3B, 0x00BEFF1B, 0xFEF000BE, 0x0055FE84, 0x00BE00AD, 0xFE83008C, 0x00BBFEF6, - 0x008C005D, 0xFFAA00C8, 0xFFCDFFBE, 0x00BEFFAE, 0xFF8800BE, 0xFFDAFF79, 0x00C8FFF5, 0xFF5B00BE, - 0xFFFFFF43, 0x00C8001F, 0xFF1D00BE, 0x0030FF0E, 0x00C8004B, 0xFFBE00BE, 0xFFAEFFAA, 0x00C8FFCD, - 0xFFB0008C, 0xFFD4FFC4, 0x008CFFB6, 0xFF8800BE, 0xFFDAFF8E, 0x008CFFE2, 0xFF7900C8, 0xFFF5FF7F, - 0x008CFFFC, 0xFF5B00BE, 0xFFFFFF61, 0x008C0005, 0xFF4300C8, 0x001FFF49, 0x008C0027, 0xFF1D00BE, - 0x0030FF23, 0x008C0038, 0xFF0E00C8, 0x004BFF14, 0x008C0053, 0xFEF000BE, 0x0055FEF6, 0x008C005D, - 0xFE6F008C, 0xFE14FE4D, 0x008CFE21, 0xFE5300C8, 0xFE29FE75, 0x00BEFE1B, 0xFE39008C, 0xFE3FFE3F, - 0x00BEFE47, 0xFE1C008C, 0xFE49FE22, 0x00C8FE51, 0xFE0C008C, 0xFE64FE12, 0x00BEFE6C, 0xFDE6008C, - 0xFE75FDED, 0x00C8FE7C, 0xFDCE008C, 0xFE96FDD4, 0x00BEFE9E, 0xFDB1008C, 0xFEA0FDB7, 0x00C8FEA8, - 0xFDA1008C, 0xFEBBFDA8, 0x00BEFEC3, 0xFD2D008C, 0xFF1AFD3B, 0x00BEFF1B, 0xFEF000BE, 0x0055FE84, - 0x00BE00AD, 0xFE83008C, 0x00BBFEF6, 0x008C005D, 0xFFAA00C8, 0xFFCDFFBE, 0x00BEFFAE, 0xFF8800BE, - 0xFFDAFF79, 0x00C8FFF5, 0xFF5B00BE, 0xFFFFFF43, 0x00C8001F, 0xFF1D00BE, 0x0030FF0E, 0x00C8004B, - 0xFFBE00BE, 0xFFAEFFAA, 0x00C8FFCD, 0xFFB0008C, 0xFFD4FFC4, 0x008CFFB6, 0xFF8800BE, 0xFFDAFF8E, - 0x008CFFE2, 0xFF7900C8, 0xFFF5FF7F, 0x008CFFFC, 0xFF5B00BE, 0xFFFFFF61, 0x008C0005, 0xFF4300C8, - 0x001FFF49, 0x008C0027, 0xFF1D00BE, 0x0030FF23, 0x008C0038, 0xFF0E00C8, 0x004BFF14, 0x008C0053, - 0xFEF000BE, 0x0055FEF6, 0x008C005D, 0xFE6F008C, 0xFE14FE4D, 0x008CFE21, 0xFE5300C8, 0xFE29FE75, - 0x00BEFE1B, 0xFE39008C, 0xFE3FFE3F, 0x00BEFE47, 0xFE1C008C, 0xFE49FE22, 0x00C8FE51, 0xFE0C008C, - 0xFE64FE12, 0x00BEFE6C, 0xFDE6008C, 0xFE75FDED, 0x00C8FE7C, 0xFDCE008C, 0xFE96FDD4, 0x00BEFE9E, - 0xFDB1008C, 0xFEA0FDB7, 0x00C8FEA8, 0xFDA1008C, 0xFEBBFDA8, 0x00BEFEC3, 0xFD2D008C, 0xFF1AFD3B, - 0x00BEFF1B, 0xFEF000BE, 0x0055FE84, 0x00BE00AD, 0xFE83008C, 0x00BBFEF6, 0x008C005D, 0xFFAA00C8, - 0xFFCDFFBE, 0x00BEFFAE, 0xFF8800BE, 0xFFDAFF79, 0x00C8FFF5, 0xFF5B00BE, 0xFFFFFF43, 0x00C8001F, - 0xFF1D00BE, 0x0030FF0E, 0x00C8004B, 0xFFBE00BE, 0xFFAEFFAA, 0x00C8FFCD, 0xFFB0008C, 0xFFD4FFC4, - 0x008CFFB6, 0xFF8800BE, 0xFFDAFF8E, 0x008CFFE2, 0xFF7900C8, 0xFFF5FF7F, 0x008CFFFC, 0xFF5B00BE, - 0xFFFFFF61, 0x008C0005, 0xFF4300C8, 0x001FFF49, 0x008C0027, 0xFF1D00BE, 0x0030FF23, 0x008C0038, - 0xFF0E00C8, 0x004BFF14, 0x008C0053, 0xFEF000BE, 0x0055FEF6, 0x008C005D, 0xFE6F008C, 0xFE14FE4D, - 0x008CFE21, 0xFE5300C8, 0xFE29FE75, 0x00BEFE1B, 0xFE39008C, 0xFE3FFE3F, 0x00BEFE47, 0xFE1C008C, - 0xFE49FE22, 0x00C8FE51, 0xFE0C008C, 0xFE64FE12, 0x00BEFE6C, 0xFDE6008C, 0xFE75FDED, 0x00C8FE7C, - 0xFDCE008C, 0xFE96FDD4, 0x00BEFE9E, 0xFDB1008C, 0xFEA0FDB7, 0x00C8FEA8, 0xFDA1008C, 0xFEBBFDA8, - 0x00BEFEC3, 0xFD2D008C, 0xFF1AFD3B, 0x00BEFF1B, 0xFEF000BE, 0x0055FE84, 0x00BE00AD, 0xFE83008C, - 0x00BBFEF6, 0x008C005D, 0xFFAA00C8, 0xFFCDFFBE, 0x00BEFFAE, 0xFF8800BE, 0xFFDAFF79, 0x00C8FFF5, - 0xFF5B00BE, 0xFFFFFF43, 0x00C8001F, 0xFF1D00BE, 0x0030FF0E, 0x00C8004B, 0xFFBE00BE, 0xFFAEFFAA, - 0x00C8FFCD, 0xFFB0008C, 0xFFD4FFC4, 0x008CFFB6, 0xFF8800BE, 0xFFDAFF8E, 0x008CFFE2, 0xFF7900C8, - 0xFFF5FF7F, 0x008CFFFC, 0xFF5B00BE, 0xFFFFFF61, 0x008C0005, 0xFF4300C8, 0x001FFF49, 0x008C0027, - 0xFF1D00BE, 0x0030FF23, 0x008C0038, 0xFF0E00C8, 0x004BFF14, 0x008C0053, 0xFEF000BE, 0x0055FEF6, - 0x008C005D, 0xFE6F008C, 0xFE14FE4D, 0x008CFE21, 0xFE5300C8, 0xFE29FE75, 0x00BEFE1B, 0xFE39008C, - 0xFE3FFE3F, 0x00BEFE47, 0xFE1C008C, 0xFE49FE22, 0x00C8FE51, 0xFE0C008C, 0xFE64FE12, 0x00BEFE6C, - 0xFDE6008C, 0xFE75FDED, 0x00C8FE7C, 0xFDCE008C, 0xFE96FDD4, 0x00BEFE9E, 0xFDB1008C, 0xFEA0FDB7, - 0x00C8FEA8, 0xFDA1008C, 0xFEBBFDA8, 0x00BEFEC3, 0xFD2D008C, 0xFF1AFD3B, 0x00BEFF1B, 0xFEF000BE, - 0x0055FE84, 0x00BE00AD, 0xFE83008C, 0x00BBFEF6, 0x008C005D, 0xFFAA00C8, 0xFFCDFFBE, 0x00BEFFAE, - 0xFF8800BE, 0xFFDAFF79, 0x00C8FFF5, 0xFF5B00BE, 0xFFFFFF43, 0x00C8001F, 0xFF1D00BE, 0x0030FF0E, - 0x00C8004B, 0xFFBE00BE, 0xFFAEFFAA, 0x00C8FFCD, 0xFFB0008C, 0xFFD4FFC4, 0x008CFFB6, 0xFF8800BE, - 0xFFDAFF8E, 0x008CFFE2, 0xFF7900C8, 0xFFF5FF7F, 0x008CFFFC, 0xFF5B00BE, 0xFFFFFF61, 0x008C0005, - 0xFF4300C8, 0x001FFF49, 0x008C0027, 0xFF1D00BE, 0x0030FF23, 0x008C0038, 0xFF0E00C8, 0x004BFF14, - 0x008C0053, 0xFEF000BE, 0x0055FEF6, 0x008C005D, 0xFE6F008C, 0xFE14FE4D, 0x008CFE21, 0xFE5300C8, - 0xFE29FE75, 0x00BEFE1B, 0xFE39008C, 0xFE3FFE3F, 0x00BEFE47, 0xFE1C008C, 0xFE49FE22, 0x00C8FE51, - 0xFE0C008C, 0xFE64FE12, 0x00BEFE6C, 0xFDE6008C, 0xFE75FDED, 0x00C8FE7C, 0xFDCE008C, 0xFE96FDD4, - 0x00BEFE9E, 0xFDB1008C, 0xFEA0FDB7, 0x00C8FEA8, 0xFDA1008C, 0xFEBBFDA8, 0x00BEFEC3, 0xFD2D008C, - 0xFF1AFD3B, 0x00BEFF1B, 0xFEF000BE, 0x0055FE84, 0x00BE00AD, 0xFE83008C, 0x00BBFEF6, 0x008C005D, - 0xFFAA00C8, 0xFFCDFFBE, 0x00BEFFAE, 0xFF8800BE, 0xFFDAFF79, 0x00C8FFF5, 0xFF5B00BE, 0xFFFFFF43, - 0x00C8001F, 0xFF1D00BE, 0x0030FF0E, 0x00C8004B, 0xFFBE00BE, 0xFFAEFFAA, 0x00C8FFCD, 0xFFB0008C, - 0xFFD4FFC4, 0x008CFFB6, 0xFF8800BE, 0xFFDAFF8E, 0x008CFFE2, 0xFF7900C8, 0xFFF5FF7F, 0x008CFFFC, - 0xFF5B00BE, 0xFFFFFF61, 0x008C0005, 0xFF4300C8, 0x001FFF49, 0x008C0027, 0xFF1D00BE, 0x0030FF23, - 0x008C0038, 0xFF0E00C8, 0x004BFF14, 0x008C0053, 0xFEF000BE, 0x0055FEF6, 0x008C005D, 0xFE6F008C, - 0xFE14FE4D, 0x008CFE21, 0xFE5300C8, 0xFE29FE75, 0x00BEFE1B, 0xFE39008C, 0xFE3FFE3F, 0x00BEFE47, - 0xFE1C008C, 0xFE49FE22, 0x00C8FE51, 0xFE0C008C, 0xFE64FE12, 0x00BEFE6C, 0xFDE6008C, 0xFE75FDED, - 0x00C8FE7C, 0xFDCE008C, 0xFE96FDD4, 0x00BEFE9E, 0xFDB1008C, 0xFEA0FDB7, 0x00C8FEA8, 0xFDA1008C, - 0xFEBBFDA8, 0x00BEFEC3, 0xFD2D008C, 0xFF1AFD3B, 0x00BEFF1B, 0xFEF000BE, 0x0055FE84, 0x00BE00AD, - 0xFE83008C, 0x00BBFEF6, 0x008C005D, 0xFFAA00C8, 0xFFCDFFBE, 0x00BEFFAE, 0xFF8800BE, 0xFFDAFF79, - 0x00C8FFF5, 0xFF5B00BE, 0xFFFFFF43, 0x00C8001F, 0xFF1D00BE, 0x0030FF0E, 0x00C8004B, 0xFFBE00BE, - 0xFFAEFFAA, 0x00C8FFCD, 0xFFB0008C, 0xFFD4FFC4, 0x008CFFB6, 0xFF8800BE, 0xFFDAFF8E, 0x008CFFE2, - 0xFF7900C8, 0xFFF5FF7F, 0x008CFFFC, 0xFF5B00BE, 0xFFFFFF61, 0x008C0005, 0xFF4300C8, 0x001FFF49, - 0x008C0027, 0xFF1D00BE, 0x0030FF23, 0x008C0038, 0xFF0E00C8, 0x004BFF14, 0x008C0053, 0xFEF000BE, - 0x0055FEF6, 0x008C005D, 0xFE6F008C, 0xFE14FE4D, 0x008CFE21, 0xFE5300C8, 0xFE29FE75, 0x00BEFE1B, - 0xFE39008C, 0xFE3FFE3F, 0x00BEFE47, 0xFE1C008C, 0xFE49FE22, 0x00C8FE51, 0xFE0C008C, 0xFE64FE12, - 0x00BEFE6C, 0xFDE6008C, 0xFE75FDED, 0x00C8FE7C, 0xFDCE008C, 0xFE96FDD4, 0x00BEFE9E, 0xFDB1008C, - 0xFEA0FDB7, 0x00C8FEA8, 0xFDA1008C, 0xFEBBFDA8, 0x00BEFEC3, 0xFD2D008C, 0xFF1AFD3B, 0x00BEFF1B, - 0xFEF000BE, 0x0055FE84, 0x00BE00AD, 0xFE83008C, 0x00BBFEF6, 0x008C005D, 0xFFAA00C8, 0xFFCDFFBE, - 0x00BEFFAE, 0xFF8800BE, 0xFFDAFF79, 0x00C8FFF5, 0xFF5B00BE, 0xFFFFFF43, 0x00C8001F, 0xFF1D00BE, - 0x0030FF0E, 0x00C8004B, 0xFFBE00BE, 0xFFAEFFAA, 0x00C8FFCD, 0xFFB0008C, 0xFFD4FFC4, 0x008CFFB6, - 0xFF8800BE, 0xFFDAFF8E, 0x008CFFE2, 0xFF7900C8, 0xFFF5FF7F, 0x008CFFFC, 0xFF5B00BE, 0xFFFFFF61, - 0x008C0005, 0xFF4300C8, 0x001FFF49, 0x008C0027, 0xFF1D00BE, 0x0030FF23, 0x008C0038, 0xFF0E00C8, - 0x004BFF14, 0x008C0053, 0xFEF000BE, 0x0055FEF6, 0x008C005D, 0xFE6F008C, 0xFE14FE4D, 0x008CFE21, - 0xFE5300C8, 0xFE29FE75, 0x00BEFE1B, 0xFE39008C, 0xFE3FFE3F, 0x00BEFE47, 0xFE1C008C, 0xFE49FE22, - 0x00C8FE51, 0xFE0C008C, 0xFE64FE12, 0x00BEFE6C, 0xFDE6008C, 0xFE75FDED, 0x00C8FE7C, 0xFDCE008C, - 0xFE96FDD4, 0x00BEFE9E, 0xFDB1008C, 0xFEA0FDB7, 0x00C8FEA8, 0xFDA1008C, 0xFEBBFDA8, 0x00BEFEC3, - 0xFD2D008C, 0xFF1AFD3B, 0x00BEFF1B, 0xFEF000BE, 0x0055FE84, 0x00BE00AD, 0xFE83008C, 0x00BBFEF6, - 0x008C005D, 0xFFAA00C8, 0xFFCDFFBE, 0x00BEFFAE, 0xFF8800BE, 0xFFDAFF79, 0x00C8FFF5, 0xFF5B00BE, - 0xFFFFFF43, 0x00C8001F, 0xFF1D00BE, 0x0030FF0E, 0x00C8004B, 0xFFBE00BE, 0xFFAEFFAA, 0x00C8FFCD, - 0xFFB0008C, 0xFFD4FFC4, 0x008CFFB6, 0xFF8800BE, 0xFFDAFF8E, 0x008CFFE2, 0xFF7900C8, 0xFFF5FF7F, - 0x008CFFFC, 0xFF5B00BE, 0xFFFFFF61, 0x008C0005, 0xFF4300C8, 0x001FFF49, 0x008C0027, 0xFF1D00BE, - 0x0030FF23, 0x008C0038, 0xFF0E00C8, 0x004BFF14, 0x008C0053, 0xFEF000BE, 0x0055FEF6, 0x008C005D, -}; +#include "world/area_dro/dro_02/vtx/971F98.vtx.inc.c" -s32 N(image2)[]; +#include "world/area_dro/dro_02/vtx/9722B8.vtx.inc.c" + +extern s32 N(image2)[]; Gfx N(D_8024A3B8_973578)[] = { gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), @@ -1975,7 +1812,7 @@ Gfx N(D_8024A3B8_973578)[] = { gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA), gsDPLoadTextureBlock(N(image2), G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 32, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, 4, 5, G_TX_NOLOD, G_TX_NOLOD), gsSPSetGeometryMode(G_LIGHTING), - gsSPVertex(N(D_802490F8_9722B8), 32, 0), + gsSPVertex(vtx_9722B8, 32, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(1, 4, 5, 0, 1, 5, 2, 0), gsSP2Triangles(4, 6, 7, 0, 4, 7, 5, 0), @@ -1996,7 +1833,7 @@ Gfx N(D_8024A3B8_973578)[] = { gsSP2Triangles(15, 17, 20, 0, 15, 20, 31, 0), gsSP2Triangles(17, 19, 21, 0, 17, 21, 20, 0), gsSP2Triangles(19, 18, 22, 0, 19, 22, 21, 0), - gsSPVertex(N(D_802490F8_9722B8), 18, 0), + gsSPVertex(vtx_9722B8, 18, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(1, 4, 5, 0, 1, 5, 2, 0), gsSP2Triangles(4, 6, 7, 0, 4, 7, 5, 0), @@ -3231,11 +3068,11 @@ ApiStatus N(func_80240300_9694C0)(Evt* script, s32 isInitialCall) { if (N(D_80244DE0_96DFA0) == NULL) { N(D_80244DE0_96DFA0) = heap_malloc(16 * sizeof(s32)); for (i = 0; i < 16; i++) { - N(D_80244DE0_96DFA0)[i] = script->varTable[i]; + N(D_80244DE0_96DFA0)[i] = (s32*) script->varTable[i]; } } else { for (i = 0; i < 16; i++) { - script->varTable[i] = N(D_80244DE0_96DFA0)[i]; + script->varTable[i] = (s32) N(D_80244DE0_96DFA0)[i]; } heap_free(N(D_80244DE0_96DFA0)); N(D_80244DE0_96DFA0) = NULL; @@ -3272,14 +3109,14 @@ ApiStatus N(func_80240A70_969C30)(Evt* script, s32 isInitialCall) { EffectInstanceDataThing* effectPtr; if (isInitialCall) { - N(D_8024EFC0) = playFX_4E(0, evt_get_variable(script, EVT_ARRAY(1)), evt_get_variable(script, EVT_ARRAY(2)), - evt_get_variable(script, EVT_ARRAY(3))); - N(D_8024EFC4) = playFX_54(0, evt_get_variable(script, EVT_ARRAY(1)), evt_get_variable(script, EVT_ARRAY(2)), - evt_get_variable(script, EVT_ARRAY(3))); - N(D_8024EFC8) = playFX_80(0, evt_get_variable(script, EVT_ARRAY(1)), evt_get_variable(script, EVT_ARRAY(2)), - evt_get_variable(script, EVT_ARRAY(3)), 1.0f, 0); + N(D_8024EFC0) = playFX_4E(0, (f32) evt_get_variable(script, EVT_ARRAY(1)), (f32) evt_get_variable(script, EVT_ARRAY(2)), + (f32) evt_get_variable(script, EVT_ARRAY(3))); + N(D_8024EFC4) = playFX_54(0, (f32) evt_get_variable(script, EVT_ARRAY(1)), (f32) evt_get_variable(script, EVT_ARRAY(2)), + (f32) evt_get_variable(script, EVT_ARRAY(3))); + N(D_8024EFC8) = playFX_80(0, (f32) evt_get_variable(script, EVT_ARRAY(1)), (f32) evt_get_variable(script, EVT_ARRAY(2)), + (f32) evt_get_variable(script, EVT_ARRAY(3)), 1.0f, 0); - effectPtr = N(D_8024EFC0)->freeDelay; // TODO this is wrong + effectPtr = (EffectInstanceDataThing*) N(D_8024EFC0)->data; // TODO this is wrong effectPtr->unk_18 = 0; effectPtr->unk_20 = 0; effectPtr->unk_24.s = 0; @@ -3287,7 +3124,7 @@ ApiStatus N(func_80240A70_969C30)(Evt* script, s32 isInitialCall) { effectPtr->unk_1C = 0; } - effectPtr = N(D_8024EFC0)->freeDelay; // TODO this is wrong + effectPtr = (EffectInstanceDataThing*) N(D_8024EFC0)->data; // TODO this is wrong effectPtr->unk_20 += 10; effectPtr->unk_28 += 10; @@ -3310,7 +3147,7 @@ ApiStatus N(func_80240C88_969E48)(Evt* script, s32 isInitialCall) { N(D_8024EFC8)->flags |= 0x10; } - effectPtr = N(D_8024EFC0)->freeDelay; + effectPtr = (EffectInstanceDataThing*) N(D_8024EFC0)->data; effectPtr->unk_18 -= 10; effectPtr->unk_20 -= 10; effectPtr->unk_24.s -= 10; @@ -3334,7 +3171,7 @@ ApiStatus N(func_80240D3C_969EFC)(Evt* script, s32 isInitialCall) { ApiStatus N(func_80240D70_969F30)(Evt* script, s32 isInitialCall) { s32 var = evt_get_variable(script, *script->ptrReadPos); - EffectInstanceDataThing* effectPtr = N(D_8024EFC0)->freeDelay; + EffectInstanceDataThing* effectPtr = (EffectInstanceDataThing*) N(D_8024EFC0)->data; switch (var) { case 0: @@ -3520,26 +3357,26 @@ ApiStatus N(func_80241874_96AA34)(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } +u32 N(func_8024190C_96AACC)(D_8024F010_Struct*, Matrix4f); INCLUDE_ASM(u32, "world/area_dro/dro_02/9694C0", dro_02_func_8024190C_96AACC, D_8024F010_Struct* ptr, Matrix4f matrix); void N(func_80242214_96B3D4)(s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4) { - s32* CC_ptr = &N(D_8024EFCC); D_8024F010_Struct* F010_ptr; Matrix4f sp20; Matrix4f sp60; Matrix4f spA0; - guPositionF(&spA0, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, SPRITE_WORLD_SCALE, - evt_get_variable(*CC_ptr, EVT_ARRAY(4)), evt_get_variable(*CC_ptr, EVT_ARRAY(5)), - evt_get_variable(*CC_ptr, EVT_ARRAY(6))); + guPositionF(spA0, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, SPRITE_WORLD_SCALE, + evt_get_variable(N(D_8024EFCC), EVT_ARRAY(4)), evt_get_variable(N(D_8024EFCC), EVT_ARRAY(5)), + evt_get_variable(N(D_8024EFCC), EVT_ARRAY(6))); - F010_ptr = ({ D_8024F010_Struct* a = &N(D_8024F010); &a[arg0]; }); - guTranslateF(&sp60, F010_ptr->unk_04, F010_ptr->unk_08, F010_ptr->unk_0C); - guMtxCatF(&sp60, &spA0, &sp20); - guRotateF(&sp60, F010_ptr->unk_10, 0.0f, 1.0f, 0.0f); - guMtxCatF(&sp60, &sp20, &sp20); - guTranslateF(&sp60, 0.0f, 0.0f, 1.0f); - guMtxCatF(&sp60, &sp20, &sp20); + F010_ptr = &N(D_8024F010)[arg0]; + guTranslateF(sp60, F010_ptr->unk_04, F010_ptr->unk_08, F010_ptr->unk_0C); + guMtxCatF(sp60, spA0, sp20); + guRotateF(sp60, F010_ptr->unk_10, 0.0f, 1.0f, 0.0f); + guMtxCatF(sp60, sp20, sp20); + guTranslateF(sp60, 0.0f, 0.0f, 1.0f); + guMtxCatF(sp60, sp20, sp20); *arg1 = sp20[3][0]; *arg2 = sp20[3][1]; *arg3 = sp20[3][2]; @@ -3553,13 +3390,13 @@ void N(func_80242EAC_96C06C)(Evt* script, s32 isInitialCall) { Matrix4f sp20; u32 temp_s1; - guPositionF(&sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, SPRITE_WORLD_SCALE, + guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, SPRITE_WORLD_SCALE, evt_get_variable(N(D_8024EFCC), EVT_ARRAY(4)), evt_get_variable(N(D_8024EFCC), EVT_ARRAY(5)), evt_get_variable(N(D_8024EFCC), EVT_ARRAY(6))); - temp_s1 = N(func_8024190C_96AACC)(&N(D_8024F010)[0], &sp20); - N(func_8024190C_96AACC)(&N(D_8024F010)[1], &sp20); - N(func_8024190C_96AACC)(&N(D_8024F010)[2], &sp20); + temp_s1 = N(func_8024190C_96AACC)(&N(D_8024F010)[0], sp20); + N(func_8024190C_96AACC)(&N(D_8024F010)[1], sp20); + N(func_8024190C_96AACC)(&N(D_8024F010)[2], sp20); if ((N(D_8024F010)[0].unk_00 == 2) && ((temp_s1 - 1) < 2)) { evt_set_variable(N(D_8024EFCC), EVT_ARRAY(9), 3); } @@ -3608,7 +3445,7 @@ ApiStatus N(func_80243314_96C4D4)(Evt* script, s32 isInitialCall) { ApiStatus N(func_8024334C_96C50C)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - s32* ptr = evt_get_variable(script, *args); + s32* ptr = (s32*) evt_get_variable(script, *args); s32 i; if (ptr != NULL) { @@ -3627,7 +3464,7 @@ ApiStatus N(func_8024334C_96C50C)(Evt* script, s32 isInitialCall) { ApiStatus N(func_802433E8_96C5A8)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - s32* ptr = evt_get_variable(script, *args); + s32* ptr = (s32*) evt_get_variable(script, *args); s32 i; if (ptr != NULL) { diff --git a/src/world/area_flo/flo_07/CAC5D0.c b/src/world/area_flo/flo_07/CAC5D0.c index f1563d271f..b1e7e8b01f 100644 --- a/src/world/area_flo/flo_07/CAC5D0.c +++ b/src/world/area_flo/flo_07/CAC5D0.c @@ -406,7 +406,7 @@ EvtSource N(802424F4) = { EVT_END }; -const char N(flo_25_name_hack)[]; +extern const char N(flo_25_name_hack)[]; EvtSource N(tree1_Callback) = { EVT_CALL(DisablePlayerInput, TRUE) @@ -518,11 +518,11 @@ ApiStatus N(func_8024061C_CAC80C)(Evt* script, s32 isInitialCall) { if (N(D_80241BB0_CADDA0) == NULL) { N(D_80241BB0_CADDA0) = heap_malloc(16 * sizeof(s32)); for (i = 0; i < 16; i++) { - N(D_80241BB0_CADDA0)[i] = script->varTable[i]; + N(D_80241BB0_CADDA0)[i] = (s32*) script->varTable[i]; } } else { for (i = 0; i < 16; i++) { - script->varTable[i] = N(D_80241BB0_CADDA0)[i]; + script->varTable[i] = (s32) N(D_80241BB0_CADDA0)[i]; } heap_free(N(D_80241BB0_CADDA0)); N(D_80241BB0_CADDA0) = NULL; diff --git a/src/world/area_flo/flo_08/CAFA80.c b/src/world/area_flo/flo_08/CAFA80.c index 7c0ba3f4da..32c6b05e84 100644 --- a/src/world/area_flo/flo_08/CAFA80.c +++ b/src/world/area_flo/flo_08/CAFA80.c @@ -1,6 +1,12 @@ #include "flo_08.h" -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_80240D40_CAFA80)(Evt* script, s32 isInitialCall) { playFX_82(1, 0, 0, 0, 0, 0); diff --git a/src/world/area_flo/flo_08/CAFAC0.c b/src/world/area_flo/flo_08/CAFAC0.c index 7086fb4beb..e9717913d5 100644 --- a/src/world/area_flo/flo_08/CAFAC0.c +++ b/src/world/area_flo/flo_08/CAFAC0.c @@ -360,9 +360,9 @@ NpcSettings N(npcSettings_80242FB4) = { .height = 30, .radius = 24, .ai = &N(npcAI_80242EE0), - .onHit = EnemyNpcHit, + .onHit = &EnemyNpcHit, .aux = &N(80242F00), - .onDefeat = EnemyNpcDefeat, + .onDefeat = &EnemyNpcDefeat, .level = 100, }; @@ -397,8 +397,8 @@ NpcSettings N(npcSettings_8024305C) = { .height = 30, .radius = 24, .ai = &N(npcAI_8024303C), - .onHit = EnemyNpcHit, - .onDefeat = EnemyNpcDefeat, + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, .level = 19, }; diff --git a/src/world/area_flo/flo_09/CB50E0.c b/src/world/area_flo/flo_09/CB50E0.c index bddad8364c..22a18526dd 100644 --- a/src/world/area_flo/flo_09/CB50E0.c +++ b/src/world/area_flo/flo_09/CB50E0.c @@ -441,8 +441,8 @@ NpcSettings N(npcSettings_80243600) = { .height = 30, .radius = 24, .ai = &N(npcAI_802435E0), - .onHit = EnemyNpcHit, - .onDefeat = EnemyNpcDefeat, + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, .level = 19, }; @@ -480,8 +480,8 @@ NpcSettings N(npcSettings_802436E4) = { .height = 26, .radius = 24, .ai = &N(npcAI_80243674), - .onHit = EnemyNpcHit, - .onDefeat = EnemyNpcDefeat, + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, .level = 19, }; diff --git a/src/world/area_flo/flo_10/CB9280.c b/src/world/area_flo/flo_10/CB9280.c index 42435f2d68..467f1689ee 100644 --- a/src/world/area_flo/flo_10/CB9280.c +++ b/src/world/area_flo/flo_10/CB9280.c @@ -17,7 +17,7 @@ MapConfig N(config) = { .entryList = &N(entryList), .entryCount = ENTRY_COUNT(N(entryList)), .background = &gBackgroundImage, - .tattle = N(func_80240000_CB9200), + .tattle = { .get = N(func_80240000_CB9200) }, }; EvtSource N(802414E0) = SCRIPT({ @@ -345,7 +345,7 @@ EvtSource N(802425BC) = SCRIPT({ spawn N(802424DC); }); -const char N(flo_24_name_hack)[]; +extern const char N(flo_24_name_hack)[]; EvtSource N(802425E4) = SCRIPT({ sleep 20; @@ -811,11 +811,11 @@ ApiStatus N(func_80240080_CB9280)(Evt* script, s32 isInitialCall) { if (N(D_80241CB0_CBAEB0) == NULL) { N(D_80241CB0_CBAEB0) = heap_malloc(16 * sizeof(s32)); for (i = 0; i < 16; i++) { - N(D_80241CB0_CBAEB0)[i] = script->varTable[i]; + N(D_80241CB0_CBAEB0)[i] = (s32*) script->varTable[i]; } } else { for (i = 0; i < 16; i++) { - script->varTable[i] = N(D_80241CB0_CBAEB0)[i]; + script->varTable[i] = (s32) N(D_80241CB0_CBAEB0)[i]; } heap_free(N(D_80241CB0_CBAEB0)); N(D_80241CB0_CBAEB0) = NULL; diff --git a/src/world/area_flo/flo_11/CBDCD0.c b/src/world/area_flo/flo_11/CBDCD0.c index 7746d5a736..a5cafc23a4 100644 --- a/src/world/area_flo/flo_11/CBDCD0.c +++ b/src/world/area_flo/flo_11/CBDCD0.c @@ -449,8 +449,8 @@ static s32 N(pad_1AB8)[] = { NpcSettings N(npcSettings_80241AC0) = { .height = 32, .radius = 24, - .onHit = EnemyNpcHit, - .onDefeat = EnemyNpcDefeat, + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, .level = 20, }; diff --git a/src/world/area_flo/flo_13/CC3850.c b/src/world/area_flo/flo_13/CC3850.c index a31bbe770e..53a0a6821d 100644 --- a/src/world/area_flo/flo_13/CC3850.c +++ b/src/world/area_flo/flo_13/CC3850.c @@ -1458,7 +1458,7 @@ ApiStatus N(func_80241DB8_CC55C8)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(enemy->npcID); EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings =(NpcAISettings*) evt_get_variable(script, *args); f32 temp_f4; f32 dist; diff --git a/src/world/area_flo/flo_14/CCBE20.c b/src/world/area_flo/flo_14/CCBE20.c index a16ff74916..005f447279 100644 --- a/src/world/area_flo/flo_14/CCBE20.c +++ b/src/world/area_flo/flo_14/CCBE20.c @@ -43,8 +43,8 @@ NpcSettings N(npcSettings_80244578) = { .height = 26, .radius = 24, .ai = &N(npcAI_80244508), - .onHit = EnemyNpcHit, - .onDefeat = EnemyNpcDefeat, + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, .level = 19, }; @@ -357,7 +357,7 @@ ApiStatus N(func_80241E1C_CCD12C)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(enemy->npcID); EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings =(NpcAISettings*) evt_get_variable(script, *args); territory.unk_00 = 0; territory.shape = enemy->territory->wander.detectShape; @@ -441,7 +441,7 @@ ApiStatus N(func_80242288_CCD598)(Evt* script, s32 isInitialCall) { ApiStatus N(func_802422C0_CCD5D0)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - s32* ptr = evt_get_variable(script, *args); + s32* ptr = (s32*) evt_get_variable(script, *args); s32 i; if (ptr != NULL) { diff --git a/src/world/area_flo/flo_16/CD2C80.c b/src/world/area_flo/flo_16/CD2C80.c index f8a80cfe17..c0326a1d15 100644 --- a/src/world/area_flo/flo_16/CD2C80.c +++ b/src/world/area_flo/flo_16/CD2C80.c @@ -1,4 +1,6 @@ #include "flo_16.h" +#include "sprite.h" +#include "world/partners.h" #include "sprite/npc/tuff_puff.h" enum { @@ -38,8 +40,8 @@ NpcSettings N(npcSettings_802440C8) = { .height = 24, .radius = 28, .ai = &N(npcAI_80244058), - .onHit = EnemyNpcHit, - .onDefeat = EnemyNpcDefeat, + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, .level = 19, }; @@ -385,7 +387,7 @@ ApiStatus N(func_8024215C_CD3F8C)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(enemy->npcID); EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings =(NpcAISettings*) evt_get_variable(script, *args); territory.unk_00 = 0; territory.shape = enemy->territory->wander.detectShape; @@ -451,7 +453,7 @@ ApiStatus N(func_80242754_CD4584)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(enemy->npcID); EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings =(NpcAISettings*) evt_get_variable(script, *args); territory.unk_00 = 0; territory.shape = enemy->territory->wander.detectShape; diff --git a/src/world/area_flo/flo_17/CD7350.c b/src/world/area_flo/flo_17/CD7350.c index 9d896e1d0d..9fd2138c8d 100644 --- a/src/world/area_flo/flo_17/CD7350.c +++ b/src/world/area_flo/flo_17/CD7350.c @@ -862,7 +862,7 @@ ApiStatus N(func_80241C64_CD8F44)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(enemy->npcID); EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings =(NpcAISettings*) evt_get_variable(script, *args); f32 temp_f4; f32 dist; diff --git a/src/world/area_flo/flo_21/CE6700.c b/src/world/area_flo/flo_21/CE6700.c index ca3c92cde0..6b5c14c4fc 100644 --- a/src/world/area_flo/flo_21/CE6700.c +++ b/src/world/area_flo/flo_21/CE6700.c @@ -253,8 +253,8 @@ static s32 N(pad_17BC) = { NpcSettings N(npcSettings_802417C0) = { .height = 24, .radius = 28, - .onHit = EnemyNpcHit, - .onDefeat = EnemyNpcDefeat, + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, .level = 16, }; diff --git a/src/world/area_flo/flo_25/CF2C10.c b/src/world/area_flo/flo_25/CF2C10.c index 12ef982cd2..dffec0341e 100644 --- a/src/world/area_flo/flo_25/CF2C10.c +++ b/src/world/area_flo/flo_25/CF2C10.c @@ -158,8 +158,8 @@ NpcSettings N(npcSettings_802429D4) = { .height = 24, .radius = 28, .ai = &N(npcAI_80242964), - .onHit = EnemyNpcHit, - .onDefeat = EnemyNpcDefeat, + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, .level = 19, }; @@ -192,8 +192,8 @@ NpcSettings N(npcSettings_80242AA0) = { .height = 26, .radius = 24, .ai = &N(npcAI_80242A30), - .onHit = EnemyNpcHit, - .onDefeat = EnemyNpcDefeat, + .onHit = &EnemyNpcHit, + .onDefeat = &EnemyNpcDefeat, .level = 19, }; @@ -548,7 +548,7 @@ ApiStatus N(func_8024134C_CF3F1C)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(enemy->npcID); EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings = (NpcAISettings*) evt_get_variable(script, *args); territory.unk_00 = 0; territory.shape = enemy->territory->wander.detectShape; @@ -615,7 +615,7 @@ ApiStatus N(func_80241944_CF4514)(Evt* script, s32 isInitialCall) { Npc* npc = get_npc_unsafe(enemy->npcID); EnemyTerritoryThing territory; EnemyTerritoryThing* territoryPtr = &territory; - NpcAISettings* aiSettings = evt_get_variable(script, *args); + NpcAISettings* aiSettings = (NpcAISettings*) evt_get_variable(script, *args); territory.unk_00 = 0; territory.shape = enemy->territory->wander.detectShape; @@ -699,7 +699,7 @@ ApiStatus N(func_80241DAC_CF497C)(Evt* script, s32 isInitialCall) { ApiStatus N(func_80241DE4_CF49B4)(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - s32* ptr = evt_get_variable(script, *args); + s32* ptr = (s32*) evt_get_variable(script, *args); s32 i; if (ptr != NULL) { diff --git a/src/world/common/DeadUnkFunc1.inc.c b/src/world/common/DeadUnkFunc1.inc.c index 047583dc21..264a7deeae 100644 --- a/src/world/common/DeadUnkFunc1.inc.c +++ b/src/world/common/DeadUnkFunc1.inc.c @@ -1,5 +1,7 @@ #include "common.h" +void dead_playFX_82(s32, s32, s32, s32, s32, s32); + ApiStatus N(DeadUnkFunc1)(Evt* script, s32 isInitialCall) { dead_playFX_82(1, 0, 0, 0, 0, 0); return ApiStatus_DONE2; diff --git a/src/world/common/StarSpiritEffectFunc.inc.c b/src/world/common/StarSpiritEffectFunc.inc.c index edd1be96f9..a97e2e4328 100644 --- a/src/world/common/StarSpiritEffectFunc.inc.c +++ b/src/world/common/StarSpiritEffectFunc.inc.c @@ -19,7 +19,7 @@ ApiStatus N(StarSpiritEffectFunc2)(Evt* script, s32 isInitialCall) { if (isInitialCall) { StarSpiritEffect* ptr = heap_malloc(sizeof(StarSpiritEffect)); - script->varTable[0] = ptr; + script->varTable[0] = (s32) ptr; evt_set_variable(NULL, EVT_MAP_VAR(1), ptr); ptr->unk_38 = evt_get_variable(script, *args++); ptr->unk_3C = evt_get_variable(script, *args++); @@ -148,7 +148,7 @@ ApiStatus N(StarSpiritEffectFunc5)(Evt* script, s32 isInitialCall) { if (isInitialCall) { StarSpiritEffect* ptr = (StarSpiritEffect*) heap_malloc(sizeof(StarSpiritEffect)); - script->varTable[0] = ptr; + script->varTable[0] = (s32) ptr; ptr->unk_38 = evt_get_variable(script, *args++); ptr->unk_18 = evt_get_float_variable(script, *args++); ptr->unk_24 = evt_get_float_variable(script, *args++); diff --git a/src/world/common/StashVars.inc.c b/src/world/common/StashVars.inc.c index 11cc4bad0d..93da8c66b9 100644 --- a/src/world/common/StashVars.inc.c +++ b/src/world/common/StashVars.inc.c @@ -9,11 +9,11 @@ ApiStatus N(StashVars)(Evt* script, s32 isInitialCall) { varTable = heap_malloc(sizeof(script->varTable)); for (i = 0; i < ARRAY_COUNT(script->varTable); i++) { - varTable[i] = script->varTable[i]; + varTable[i] = (s32*) script->varTable[i]; } } else { for (i = 0; i < ARRAY_COUNT(script->varTable); i++) { - script->varTable[i] = varTable[i]; + script->varTable[i] = (s32) varTable[i]; } heap_free(varTable); diff --git a/src/world/common/UnkFunc27.inc.c b/src/world/common/UnkFunc27.inc.c index 16d12831c7..3547e4ee94 100644 --- a/src/world/common/UnkFunc27.inc.c +++ b/src/world/common/UnkFunc27.inc.c @@ -9,11 +9,11 @@ ApiStatus N(UnkFunc27)(Evt* script, s32 isInitialCall) { s32 testS2 = evt_get_variable(script, *args++); s32 testS0 = evt_get_variable(script, *args++); s32 testS1 = evt_get_variable(script, *args++); - s32* temp_s0_3 = testS0; + s32* temp_s0_3 = (s32*) testS0; s32 temp_s1 = testS1; s32 temp_s2 = testS2; - if (temp_s0_3 == -1) { + if ((s32) temp_s0_3 == -1) { mdl_set_all_fog_mode(temp_s1); return ApiStatus_DONE2; } diff --git a/src/world/common/UnkFunc31.inc.c b/src/world/common/UnkFunc31.inc.c index eb61ed688e..8b10d87e06 100644 --- a/src/world/common/UnkFunc31.inc.c +++ b/src/world/common/UnkFunc31.inc.c @@ -93,9 +93,9 @@ ApiStatus N(UnkFunc29)(Evt* script, s32 isInitialCall) { } for (i = 0; i < MAX_ITEM_ENTITIES; i++) { - Entity* entity = get_item_entity(i); + ItemEntity* entity = get_item_entity(i); if (entity != NULL && entity->flags & 0x10) { - entity->flags &= ~ENTITY_FLAGS_8000000; + entity->flags &= ~0x8000000; } } diff --git a/src/world/common/UnkQuizFunc.inc.c b/src/world/common/UnkQuizFunc.inc.c index 89db6057ae..426bc91a87 100644 --- a/src/world/common/UnkQuizFunc.inc.c +++ b/src/world/common/UnkQuizFunc.inc.c @@ -1,10 +1,11 @@ #include "common.h" #include "npc.h" +// TODO, can we remove this once all data disasm'ed? extern QuizRequirements N(quizRequirements)[]; ApiStatus N(UnkQuizFunc)(Evt* script, s32 isInitialCall) { - Enemy* enemy = script->owner1.enemyID; + Enemy* enemy = script->owner1.enemy; u16 phi_s0 = evt_get_variable(script, EVT_SAVE_FLAG(1768)); u16 phi_s7 = evt_get_variable(script, EVT_SAVE_FLAG(1769)); u16 temp_s6 = evt_get_variable(script, EVT_SAVE_VAR(350)); diff --git a/src/world/script_api/7E0E80.c b/src/world/script_api/7E0E80.c index c0010d7d14..613a68b262 100644 --- a/src/world/script_api/7E0E80.c +++ b/src/world/script_api/7E0E80.c @@ -20,17 +20,64 @@ ApiStatus func_80280410(Evt* script, s32 isInitialCall); ApiStatus ShowShopPurchaseDialog(Evt* script, s32 isInitialCall); ApiStatus ShowShopOwnerDialog(Evt* script, s32 isInitialCall); -EvtSource ShopBeginSpeech = { 0x00000043, 0x00000006, SpeakToPlayer, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000000, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, }; +EvtSource ShopBeginSpeech = { + EVT_CALL(SpeakToPlayer, LW(1), LW(2), LW(3), 0, LW(0)) + EVT_RETURN + EVT_END +}; -EvtSource ShopContinueSpeech = { 0x00000043, 0x00000006, ContinueSpeech, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000000, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, }; +EvtSource ShopContinueSpeech = { + EVT_CALL(ContinueSpeech, LW(1), LW(2), LW(3), 0, LW(0)) + EVT_RETURN + EVT_END +}; -EvtSource ShopResetSpeech = { 0x00000043, 0x00000005, EndSpeech, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000000, 0x00000043, 0x00000006, SpeakToPlayer, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000000, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, }; +EvtSource ShopResetSpeech = { + EVT_CALL(EndSpeech, LW(1), LW(2), LW(3), 0) + EVT_CALL(SpeakToPlayer, LW(1), LW(2), LW(3), 0, LW(0)) + EVT_RETURN + EVT_END +}; -EvtSource ShopEndSpeech = { 0x00000043, 0x00000005, EndSpeech, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, }; +EvtSource ShopEndSpeech = { + EVT_CALL(EndSpeech, LW(0), LW(1), LW(2), 0) + EVT_RETURN + EVT_END +}; -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, }; +EvtSource D_80283F58_7E4DD8 = { + EVT_CALL(GetCurrentPartner, LW(1)) + EVT_IF_EQ(LW(1), 0) + EVT_GOTO(10) + EVT_END_IF + EVT_IF_EQ(LW(1), 2) + EVT_GOTO(10) + EVT_END_IF + EVT_IF_EQ(LW(1), 3) + EVT_GOTO(10) + EVT_END_IF + EVT_RETURN + EVT_LABEL(10) + EVT_CALL(func_802803C8) + EVT_IF_EQ(LW(2), 0) + EVT_RETURN + EVT_END_IF + EVT_CALL(func_80280410, LW(0)) + EVT_RETURN + EVT_END +}; -EvtSource BadgeShopInteract = { 0x00000043, 0x00000002, ShowShopPurchaseDialog, 0xFE363C80, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000001, ShowShopOwnerDialog, 0x00000002, 0x00000000, 0x00000001, 0x00000000, }; +EvtSource BadgeShopInteract = { + EVT_CALL(ShowShopPurchaseDialog, LW(0)) + EVT_RETURN + EVT_END +}; + +EvtSource D_80284054_7E4ED4 = { + EVT_CALL(ShowShopOwnerDialog) + EVT_RETURN + EVT_END +}; s32 shop_owner_begin_speech(s32 messageIndex) { Shop* shop = gGameStatusPtr->mapShop; @@ -221,7 +268,7 @@ ApiStatus ShowShopPurchaseDialog(Evt* script, s32 isInitialCall) { func_800E9900(); show_coin_counter(); } - + switch (script->functionTemp[0]) { case 0: if (!does_script_exist(script->functionTemp[1])) { @@ -502,7 +549,7 @@ ApiStatus ShowShopOwnerDialog(Evt* script, s32 isInitialCall) { if (shop_update_item_select_popup(&shop->selectedStoreItemSlot) == 1) { script->functionTemp[0] = 21; script->functionTemp[1] = 15; - } + } break; case 21: if (script->functionTemp[1] <= 0) { @@ -598,7 +645,7 @@ ApiStatus ShowShopOwnerDialog(Evt* script, s32 isInitialCall) { script->functionTemp[1] = shop_owner_begin_speech(22); script->functionTemp[0] = 9; } - } else { + } else { script->functionTemp[1]--; } break; @@ -802,13 +849,13 @@ s32 MakeShop(Evt* script, s32 isInitialCall) { f32 sizeY; f32 sizeZ; s32 items; - + gGameStatusPtr->mapShop = shop; shop->staticItemPositions = staticItemPositions; shop->staticInventory = inventory; shop->staticPriceList = prices; shop->inventoryItemFlags = inventoryItemFlags; - + numShopItems = 0; items = inventory->itemID; while (items != 0) { @@ -817,7 +864,7 @@ s32 MakeShop(Evt* script, s32 isInitialCall) { items = inventory->itemID; } shop->numItems = numShopItems; - + numShopItems = 0; if (prices != NULL) { items = prices->itemID; @@ -828,11 +875,11 @@ s32 MakeShop(Evt* script, s32 isInitialCall) { } } shop->numSpecialPrices = numShopItems; - + if (shop->numItems > 0) { gGameStatusPtr->shopItemEntities = heap_malloc(sizeof(ShopItemEntity) * shop->numItems); } - + inventory = shop->staticInventory; staticItemPositions = shop->staticItemPositions; numShopItems = 0; diff --git a/tools/star_rod_idx_to_c.py b/tools/star_rod_idx_to_c.py index 9e082d20d4..81df27513d 100755 --- a/tools/star_rod_idx_to_c.py +++ b/tools/star_rod_idx_to_c.py @@ -246,9 +246,9 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0, namespace var_name = var_names[x] if not var == 0: if var == 0x80077F70: - tmp_out += INDENT + f".{var_name} = EnemyNpcHit,\n" + tmp_out += INDENT + f".{var_name} = &EnemyNpcHit,\n" elif var == 0x8007809C: - tmp_out += INDENT + f".{var_name} = EnemyNpcDefeat,\n" + tmp_out += INDENT + f".{var_name} = &EnemyNpcDefeat,\n" elif var_name != "flags" and var in symbol_map: tmp_out += INDENT + f".{var_name} = &{symbol_map[var][0][1]},\n" if symbol_map[var][0][1] not in INCLUDED["functions"]: diff --git a/ver/us/asm/nonmatchings/EE65B0/func_80240504_EE6AB4.s b/ver/us/asm/nonmatchings/EE65B0/func_80240504_EE6AB4.s index 3cb77c2d27..4f66de9e28 100644 --- a/ver/us/asm/nonmatchings/EE65B0/func_80240504_EE6AB4.s +++ b/ver/us/asm/nonmatchings/EE65B0/func_80240504_EE6AB4.s @@ -17,7 +17,7 @@ glabel func_80240504_EE6AB4 /* EE6ABC 8024050C AFB00060 */ sw $s0, 0x60($sp) /* EE6AC0 80240510 F7B60070 */ sdc1 $f22, 0x70($sp) /* EE6AC4 80240514 F7B40068 */ sdc1 $f20, 0x68($sp) -/* EE6AC8 80240518 0C01B198 */ jal osGetCause +/* EE6AC8 80240518 0C01B198 */ jal __osGetCause /* EE6ACC 8024051C 27A40010 */ addiu $a0, $sp, 0x10 /* EE6AD0 80240520 3C108024 */ lui $s0, %hi(D_80243B44_EEA0F4) /* EE6AD4 80240524 26103B44 */ addiu $s0, $s0, %lo(D_80243B44_EEA0F4) diff --git a/ver/us/asm/nonmatchings/os/45a50_len_3a0/__osInitialize_common.s b/ver/us/asm/nonmatchings/os/45a50_len_3a0/__osInitialize_common.s index 4bfb22c61c..a8d98903a4 100644 --- a/ver/us/asm/nonmatchings/os/45a50_len_3a0/__osInitialize_common.s +++ b/ver/us/asm/nonmatchings/os/45a50_len_3a0/__osInitialize_common.s @@ -169,7 +169,7 @@ glabel __osInitialize_common /* 45D84 8006A984 3442D354 */ ori $v0, $v0, 0xd354 .L8006A988: /* 45D88 8006A988 3C018009 */ lui $at, %hi(D_800958F8) -/* 45D8C 8006A98C 0C01B198 */ jal osGetCause +/* 45D8C 8006A98C 0C01B198 */ jal __osGetCause /* 45D90 8006A990 AC2258F8 */ sw $v0, %lo(D_800958F8)($at) /* 45D94 8006A994 30421000 */ andi $v0, $v0, 0x1000 /* 45D98 8006A998 10400003 */ beqz $v0, .L8006A9A8 diff --git a/ver/us/asm/os/osGetCause.s b/ver/us/asm/os/__osGetCause.s similarity index 95% rename from ver/us/asm/os/osGetCause.s rename to ver/us/asm/os/__osGetCause.s index 561d78401a..207e40e1b1 100644 --- a/ver/us/asm/os/osGetCause.s +++ b/ver/us/asm/os/__osGetCause.s @@ -7,7 +7,7 @@ .section .text, "ax" -glabel osGetCause +glabel __osGetCause /* 47A60 8006C660 40026800 */ mfc0 $v0, $13 /* 47A64 8006C664 03E00008 */ jr $ra /* 47A68 8006C668 00000000 */ nop diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index 4ad7daf787..1d363ae624 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -233,7 +233,7 @@ segments: - [0x46AE0, c, os/46ae0_len_170] - [0x46C50, c, os/46c50_len_20] - [0x46C70, c, os/46c70_len_e00] - - [0x47A60, hasm, os/osGetCause] + - [0x47A60, hasm, os/__osGetCause] - [0x47A70, c, os/47a70_len_10] - [0x47A80, c, os/47a80_len_10] - [0x47A90, c, os/47a90_len_50] @@ -6497,7 +6497,14 @@ segments: subsegments: - [0x9691C0, c, 9691C0] - [0x9694C0, c, 9694C0] - - [0x96CC30, .data, 9694C0] + - start: 0x96CC30 + type: .data + name: 9694C0 + subsegments: + - [0x96CC30, .data, 9694C0] + - [0x971F98, vtx, vtx/971F98] + - [0x9722B8, vtx, vtx/9722B8] + - [0x973578] - [0x9780D0] - name: isk_01 dir: world/area_isk/isk_01 diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index e62c4cd522..4716a62861 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -1086,7 +1086,7 @@ _Litob = 0x8006B980; // type:func rom:0x46D80 _Ldtob = 0x8006BBD0; // type:func rom:0x46FD0 _Ldunscale = 0x8006C01C; // type:func rom:0x4741C _Genld = 0x8006C0B4; // type:func rom:0x474B4 -osGetCause = 0x8006C660; // type:func rom:0x47A60 +__osGetCause = 0x8006C660; // type:func rom:0x47A60 osGetSR = 0x8006C670; // type:func rom:0x47A70 osSetCompare = 0x8006C680; // type:func rom:0x47A80 osSetFpcCsr = 0x8006C690; // type:func rom:0x47A90 diff --git a/ver/us/undefined_syms.txt b/ver/us/undefined_syms.txt index 6fbdc06c7c..429ec2daf0 100644 --- a/ver/us/undefined_syms.txt +++ b/ver/us/undefined_syms.txt @@ -1529,3 +1529,5 @@ D_800A15C4 = 0x800A15C4; D_800A15CC = 0x800A15CC; D_800B7EF0 = 0x800B7EF0; D_800B8DEC = 0x800B8DEC; +dead_guMtxIdentF = 0x8006C660; +dead_guMtxCatF = 0x8006C7C0;