diff --git a/.gitignore b/.gitignore index f064a2bfb3..cefa97b006 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,6 @@ build/ /include/message_ids.h /include/sprite/ /include/map -/tools/permuter_settings.toml # Star Rod /sprite/SpriteTable.xml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e72e35e509..badacd12c8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,8 +21,7 @@ If you use Visual Studio Code, you can use _Run Build Task_ (Ctrl+Shift+B) to ru Once you've created a successful (`OK`) build, copy `ver/us/build/` to `ver/us/expected/build/`: ```sh -$ mkdir -p ver/us/expected -$ cp -r ver/us/build ver/us/expected +./make_expected.sh ``` (If you're working with other versions of the game, replace `us` in the file paths.) diff --git a/diff.py b/diff.py index 5203f8066c..6e1c15d175 100755 --- a/diff.py +++ b/diff.py @@ -541,7 +541,7 @@ def dump_objfile() -> Tuple[str, ObjdumpCommand, ObjdumpCommand]: if not os.path.isfile(objfile): fail(f"Not able to find .o file for function: {objfile} is not a file.") - refobjfile = "expected/" + objfile + refobjfile = "ver/us/expected/" + objfile if not os.path.isfile(refobjfile): fail(f'Please ensure an OK .o file exists at "{refobjfile}".') diff --git a/include/common_structs.h b/include/common_structs.h index a895a45d34..0e8298d2ce 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -100,34 +100,37 @@ typedef struct BlurBuffer { /* 0xA4 */ f32 z[20]; } BlurBuffer; // size = 0xF4 +typedef s32 Palette16[16]; // size = 0x40 + typedef struct Npc { /* 0x000 */ s32 flags; - /* 0x004 */ UNK_PTR onUpdate; /* run before anything else for this npc in the npc update step */ - /* 0x008 */ UNK_PTR onRender; /* run after the display list for this npc is built */ + /* 0x004 */ void (*onUpdate)(struct Npc*); ///< Run before anything else for this NPC in update_npcs() + /* 0x008 */ void (*onRender)(struct Npc*); ///< Run after the display list for this NPC is built /* 0x00C */ f32 yaw; /* 0x010 */ f32 planarFlyDist; /* also used for speech, temp0? */ /* 0x014 */ f32 jumpScale; /* also used for speech, temp1? */ /* 0x018 */ f32 moveSpeed; /* 0x01C */ f32 jumpVelocity; /* 0x020 */ struct BlurBuffer* blurBuf; ///< Null unless flag 0x100000 is set. - /* 0x024 */ s32 unk_24; + /* 0x024 */ s32 spriteInstanceID; /* 0x028 */ u32 currentAnim; /* 0x02C */ char unk_2C[4]; /* 0x030 */ f32 animationSpeed; - /* 0x034 */ f32 unk_34; // some angle? + /* 0x034 */ f32 renderYaw; /* 0x038 */ Vec3f pos; /* 0x044 */ Vec3f rotation; - /* 0x050 */ f32 unk_50; + /* 0x050 */ f32 rotationVerticalPivotOffset; /* 0x054 */ Vec3f scale; /* 0x060 */ Vec3f moveToPos; /* 0x06C */ Vec3f colliderPos; /* used during collision with player */ /* 0x078 */ s32 shadowIndex; /* 0x07C */ f32 shadowScale; /* 0x080 */ s32 unk_80; - /* 0x084 */ char unk_84[4]; + /* 0x084 */ u16 unk_84; + /* 0x086 */ u16 unk_86; /* 0x088 */ s16 isFacingAway; /* 0x08A */ s16 yawCamOffset; - /* 0x08C */ s16 unk_8C; + /* 0x08C */ s16 turnAroundYawAdjustment; /* 0x08E */ s16 duration; // TODO: name less vaguely /* 0x090 */ Vec3s homePos; /* 0x096 */ char unk_96[12]; @@ -138,12 +141,26 @@ typedef struct Npc { /* 0x0A8 */ s16 collisionHeight; /* 0x0AA */ u8 renderMode; /* 0x0AB */ s8 unk_AB; - /* 0x0AC */ u8 unk_AC; - /* 0x0AD */ char unk_AD[3]; - /* 0x0B0 */ s32 unk_B0; - /* 0x0B4 */ char unk_B4[72]; - /* 0x0FC */ s32 unk_FC; - /* 0x100 */ char unk_100[576]; + /* 0x0AC */ u8 alpha; + /* 0x0AD */ u8 alpha2; ///< Multiplied with Npc::alpha + /* 0x0AE */ char unk_AD[2]; + /* 0x0B0 */ s32** extraAnimList; + /* 0x0B4 */ s8 unk_B4; // some kind of rendering type, 0..4 inclusive + /* 0x0B5 */ char unk_B5[13]; + /* 0x0C1 */ s8 paletteCount; + /* 0x0C2 */ char unk_C2[2]; + /* 0x0C4 */ UNK_PTR spritePaletteList; + /* 0x0C8 */ Palette16 localPaletteData[16]; + /* 0x2C8 */ Palette16* localPalettes[16]; + /* 0x308 */ char unk_308[0x50]; + /* 0x318 */ f32 screenSpaceOffset2D[2]; + /* 0x320 */ f32 verticalStretch; + /* 0x324 */ struct EffectInstance* decorations[2]; + /* 0x32C */ s8 decorationType[2]; + /* 0x32E */ s8 changedDecoration; + /* 0x32F */ char unk_32F; + /* 0x330 */ s8 decorationInitialised[2]; + /* 0x332 */ char unk_332[14]; } Npc; // size = 0x340 typedef Npc* NpcList[MAX_NPCS]; @@ -982,7 +999,7 @@ typedef struct GameStatus { /* 0x07D */ s8 unk_7D; /* 0x07E */ u8 peachFlags; /* (1 = isPeach, 2 = isTransformed, 4 = hasUmbrella) */ /* 0x07F */ s8 peachDisguise; /* (1 = koopatrol, 2 = hammer bros, 3 = clubba) */ - /* 0x080 */ char unk_80; + /* 0x080 */ u8 peachAnimIdx; ///< @see world_action_idle_peachAnims /* 0x081 */ s8 unk_81; /* 0x082 */ s8 unk_82; /* 0x083 */ s8 unk_83; @@ -1056,11 +1073,12 @@ typedef struct Shadow { /* 0x04 */ char unk_04[2]; /* 0x06 */ u8 unk_06; /* 0x07 */ char unk_07; - /* 0x08 */ s16 unk_08; + /* 0x08 */ s16 unk_08; // entity model index? /* 0x0A */ char unk_0A[6]; /* 0x10 */ struct Vec3f position; /* 0x1C */ struct Vec3f scale; - /* 0x28 */ char unk_28[80]; + /* 0x28 */ struct Vec3f unk_28; + /* 0x34 */ char unk_34[68]; } Shadow; // size = 0x78 typedef Shadow* ShadowList[MAX_SHADOWS]; @@ -1513,7 +1531,7 @@ typedef struct PlayerStatus { /* 0x004 */ u32 animFlags; /* 0x008 */ s16 framesOnGround; /* Number of frames since last jump landed */ /* 0x00A */ char unk_0A[2]; - /* 0x00C */ u8 peachDisguise; + /* 0x00C */ s8 peachDisguise; /* 0x00D */ char unk_0D[1]; /* 0x00E */ u8 unk_0E; /* 0x00F */ u8 unk_0F; @@ -1539,7 +1557,7 @@ typedef struct PlayerStatus { /* 0x080 */ f32 targetYaw; /* 0x084 */ f32 currentYaw; /* 0x088 */ f32 unk_88; - /* 0x08C */ char unk_8C[4]; + /* 0x08C */ s32 unk_8C; /* 0x090 */ f32 unk_90; /* 0x094 */ char unk_94[12]; /* 0x0A0 */ f32 heading; @@ -1550,15 +1568,16 @@ typedef struct PlayerStatus { /* 0x0B2 */ s16 colliderDiameter; /* 0x0B4 */ s8 actionState; /* 0x0B5 */ u8 prevActionState; - /* 0x0B6 */ u8 fallState; + /* 0x0B6 */ s8 fallState; ///< Also used as sleep state in Peach idle action /* 0x0B7 */ char unk_B7; /* 0x0B8 */ s32 anim; - /* 0x0BC */ s16 unk_BC; + /* 0x0BC */ u16 unk_BC; /* 0x0BE */ u8 renderMode; /* 0x0BF */ s8 unk_BF; /* 0x0C0 */ s16 decorationList; /* 0x0C2 */ s16 unk_C2; - /* 0x0C4 */ char unk_C4[2]; + /* 0x0C4 */ char unk_C4; + /* 0x0C5 */ s8 unk_C5; /* 0x0C6 */ s16 unk_C6; /* 0x0C8 */ s32* unk_C8; /* 0x0CC */ s32 shadowID; @@ -1799,7 +1818,9 @@ typedef struct Temp8010F250 { /* 0x07 */ s8 unk_07; /* 0x08 */ s32 unk_08; /* 0x0C */ s32 unk_0C; -} Temp8010F250; + /* 0x10 */ char unk_10[0x20]; + /* 0x30 */ SoundID unk_30; +} Temp8010F250; // size = 0x34 typedef struct Temp8010EBB0 { /* 0x000 */ s8 unk_00; diff --git a/include/enums.h b/include/enums.h index 59fe2084aa..02ff130ebf 100644 --- a/include/enums.h +++ b/include/enums.h @@ -1346,34 +1346,43 @@ enum ActionStates { ACTION_STATE_WALK, ACTION_STATE_RUN, ACTION_STATE_JUMP, - ACTION_STATE_BOUNCE, - ACTION_STATE_ABORTED_JUMP, - ACTION_STATE_LAUNCH, - ACTION_STATE_7, + ACTION_STATE_BOUNCE, ///< Used with Kooper + ACTION_STATE_HOP, ///< Released A before apex of jump + ACTION_STATE_LAUNCH, ///< Shy Guy Toybox jack-in-the-boxes + ACTION_STATE_LAND_ON_SWITCH, ///< Small red/blue ! switches ACTION_STATE_FALLING, ACTION_STATE_STEP_DOWN, ACTION_STATE_LAND, ACTION_STATE_STEP_DOWN_LAND, - // Following action states prohibit movement: - ACTION_STATE_CONVERSATION, + // Following action states prohibit movement (see set_action_state()) + ACTION_STATE_TALK, ///< Reading signs doesn't count ACTION_STATE_SPIN_JUMP, ACTION_STATE_GROUND_POUND, ACTION_STATE_ULTRA_JUMP, ACTION_STATE_ULTRA_POUND, - ACTION_STATE_SLIDING, + ACTION_STATE_SLIDE, ACTION_STATE_HAMMER, - ACTION_STATE_HIT_HAZARD = 21, - ACTION_STATE_UNKNOWN_16, + ACTION_STATE_13, + ACTION_STATE_14, + ACTION_STATE_HIT_FIRE, ///< Causes Mario to fly up and take damage. Used for fire bars. + ACTION_STATE_UNKNOWN_16, // some kind of knockback, does no damage ACTION_STATE_HIT_LAVA, ACTION_STATE_18, - ACTION_STATE_SPIN = 26, + ACTION_STATE_SNEAKY_PARASOL, + ACTION_STATE_SPIN, ACTION_STATE_ENEMY_FIRST_STRIKE, - ACTION_STATE_SPINNING_FLOWER = 29, - ACTION_STATE_USE_TWEESTER = 31, - ACTION_STATE_RIDE = 33, + ACTION_STATE_GET_STAR_SPIRIT, + ACTION_STATE_USE_SPINNING_FLOWER, + ACTION_STATE_USE_MUNCHLESIA, ///< Set by the jan_09 squishy flower entity; throws the player in the air. + ACTION_STATE_USE_TWEESTER, + ACTION_STATE_BOUNCE_OFF_SWITCH, ///< Small red/blue ! switches + ACTION_STATE_RIDE, ACTION_STATE_STEP_UP, - ACTION_STATE_USE_SPRING = 38, + ACTION_STATE_23, + ACTION_STATE_24, + ACTION_STATE_25, + ACTION_STATE_USE_SPRING, }; typedef s32 NpcID; @@ -1381,6 +1390,7 @@ enum NpcIDs { NPC_SELF = -1, NPC_PLAYER = -2, NPC_PARTNER = -4, + NPC_BTL_MERLEE = -10, }; typedef UNK_TYPE TriggerFlag; @@ -1525,25 +1535,51 @@ enum NpcFlags { NPC_FLAG_PASSIVE = 0x00000001, ///< Collision does not trigger battle NPC_FLAG_4 = 0x00000004, NPC_FLAG_ENABLE_HIT_SCRIPT = 0x00000008, - NPC_FLAG_10 = 0x00000010, // TODO (shadow-related?) + NPC_FLAG_HAS_SHADOW = 0x00000010, ///< Set by default and by enable_npc_shadow NPC_FLAG_NO_AI = 0x00000020, ///< Disable movement AI and collision (idle animation plays) NPC_FLAG_80 = 0x00000080, // TODO NPC_FLAG_100 = 0x00000100, // TODO - NPC_FLAG_200 = 0x00000200, // TODO (enable gravity?) + NPC_FLAG_GRAVITY = 0x00000200, ///< Enables gravity. Does nothing if NPC_FLAG_NO_Y_MOVEMENT is set. NPC_FLAG_LOCK_ANIMS = 0x00000400, ///< Do not allow scripts to change animation - NPC_FLAG_IGNORE_HEIGHT = 0x00000800, ///< Causes NpcMoveTo() to ignore stairs + NPC_FLAG_NO_Y_MOVEMENT = 0x00000800, ///< Causes NpcMoveTo() to ignore stairs NPC_FLAG_NO_PROJECT_SHADOW = 0x00002000, ///< Draw shadow at base of sprite instead of projecting to ground NPC_FLAG_4000 = 0x00004000, NPC_FLAG_8000 = 0x00008000, - NPC_FLAG_10000 = 0x00010000, + NPC_FLAG_DIRTY_SHADOW = 0x00010000, ///< Set if shadow model is dirty (needs to be repositioned etc.) NPC_FLAG_INVISIBLE = 0x00020000, ///< Invisible sprite (shadow and particles still render) (TODO: possibly causes loading of player sprites instead?) - NPC_FLAG_40000 = 0x00040000, + NPC_FLAG_40000 = 0x00040000, ///< Related to NPC_FLAG_8000 + NPC_FLAG_MOTION_BLUR = 0x00100000, ///< Gives motion blur effect as NPC moves. Set by enable_npc_blur NPC_FLAG_200000 = 0x00200000, NPC_FLAG_400000 = 0x00400000, NPC_FLAG_NO_DROPS = 0x00800000, ///< Do not drop hearts, flowers, or coins on defeat - NPC_FLAG_SIMPLE_XZ_HITBOX = 0x04000000, ///< Perform only a single lateral collision test during motion. + NPC_FLAG_1000000 = 0x01000000, // TODO. fails assert in set_npc_sprite + + /// Use simpler, faster physics calculations: + /// - Perform only one lateral collision test during motion + /// - Allow falling below Y=-2000 (by default, NPC_FLAG_NO_Y_MOVEMENT is set when an NPC falls out-of-bounds) + NPC_FLAG_PARTICLE = 0x04000000, + NPC_FLAG_40000000 = 0x40000000, NPC_FLAG_80000000 = 0x80000000, }; +// XXX bad name +/// @see PlayerStatus::animFlags +enum PlayerAnimFlags { + PLAYER_ANIM_FLAG_HOLDING_ITEM = 0x00000001, + PLAYER_ANIM_FLAG_2 = 0x00000002, + PLAYER_ANIM_FLAG_4 = 0x00000004, + PLAYER_ANIM_FLAG_8 = 0x00000008, + PLAYER_ANIM_FLAG_INTERACT_PROMPT = 0x00000010, ///< ! prompt + PLAYER_ANIM_FLAG_SPEECH_PROMPT = 0x00000020, ///< (...) prompt + PLAYER_ANIM_FLAG_40 = 0x00000040, + PLAYER_ANIM_FLAG_PULSE_STONE = 0x00000080, + PLAYER_ANIM_FLAG_100 = 0x00000100, + PLAYER_ANIM_FLAG_GET_STAR_SPIRIT = 0x00000200, ///< Sets action state to ACTION_STATE_GET_STAR_SPIRIT on idle + PLAYER_ANIM_FLAG_SHIVER = 0x00000400, + PLAYER_ANIM_FLAG_PEACH_PHYSICS = 0x00001000, + PLAYER_ANIM_FLAG_IN_DISGUISE = 0x00002000, + PLAYER_ANIM_FLAG_8BIT_MARIO = 0x00004000, +}; + #endif diff --git a/include/functions.h b/include/functions.h index 1ed62efe0f..9d51fc2227 100644 --- a/include/functions.h +++ b/include/functions.h @@ -187,7 +187,7 @@ void clear_partner_move_history(Npc* partner); void set_background_color_blend(u8 r, u8 g, u8 b, u8 a); -void set_parter_tether_distance(f32); +void set_partner_tether_distance(f32); s32 does_script_exist(s32 id); s32 does_script_exist_by_ref(ScriptInstance* script); ScriptInstance* start_script(Bytecode* initialLine, s32 priority, s32 initialState); diff --git a/include/map.h b/include/map.h index d3878fb748..7914d08017 100644 --- a/include/map.h +++ b/include/map.h @@ -62,8 +62,8 @@ typedef struct Area { typedef struct NpcBlueprint { /* 0x00 */ s32 flags; /* 0x04 */ NpcAnimID initialAnim; - /* 0x08 */ UNK_FUN_PTR(onUpdate); - /* 0x0C */ UNK_FUN_PTR(onRender); + /* 0x08 */ void (*onUpdate)(struct Npc*); + /* 0x0C */ void (*onRender)(struct Npc*); } NpcBlueprint; // size = 0x10 typedef struct NpcAISettings { diff --git a/make_expected.sh b/make_expected.sh index 96b0bc5ea6..6a39a2b149 100755 --- a/make_expected.sh +++ b/make_expected.sh @@ -1,2 +1,5 @@ -mkdir -p expected/ver/us -cp -r ver/current/build expected/ver/us +mkdir -p ver/us/expected/ver/us +cp -r ver/us/build ver/us/expected/ver/us + +mkdir -p ver/jp/expected/ver/jp +cp -r ver/jp/build ver/jp/expected/ver/jp diff --git a/src/102C80.c b/src/102C80.c index 4c11860b39..8ba1df15eb 100644 --- a/src/102C80.c +++ b/src/102C80.c @@ -545,7 +545,7 @@ void func_802E2BA4(s32 entityIndex) { x_inv = -entity->position.x; y_inv = -entity->position.y; z_inv = -entity->position.z; - phi_fp = temp_s4->unk_34; + phi_fp = temp_s4->renderYaw; for (i = 0; i < 24; i++) { if (temp_s4->unk_3C.s == 0xFF) { gDPSetRenderMode(temp_s2++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); diff --git a/src/10A8D0.c b/src/10A8D0.c index 0b8acbfbc5..54c4de549c 100644 --- a/src/10A8D0.c +++ b/src/10A8D0.c @@ -7,7 +7,7 @@ void func_802E9050(Entity* entity) { if (!(playerStatus->animFlags & 1) && !(entity->unk_06 & 1) && (val <= 40.0f || val >= 320.0f)) { entity->flags |= 0x1000; - if ((playerStatus->animFlags & 0x10) && (entity->unk_06 & 8)) { + if ((playerStatus->animFlags & PLAYER_ANIM_FLAG_INTERACT_PROMPT) && (entity->unk_06 & 8)) { func_80110678(entity); } } else { diff --git a/src/1a1f0_len_5390.c b/src/1a1f0_len_5390.c index 281c6b110e..846b6f02e5 100644 --- a/src/1a1f0_len_5390.c +++ b/src/1a1f0_len_5390.c @@ -73,28 +73,28 @@ ApiStatus UnfadeBackgroundFromBlack(ScriptInstance* script, s32 isInitialCall) { } ApiStatus FadeInMerlee(ScriptInstance* script, s32 isInitialCall) { - Npc* npc = get_npc_unsafe(-0xA); + Npc* npc = get_npc_unsafe(NPC_BTL_MERLEE); if (isInitialCall) { sfx_play_sound(0x24B); - npc->unk_AC = 0; + npc->alpha = 0; } - npc->unk_AC += 17; + npc->alpha += 17; - if ((u32)(npc->unk_AC & 0xFF) >= 0xFF) { - npc->unk_AC = 0xFF; + if ((u32)(npc->alpha & 0xFF) >= 0xFF) { + npc->alpha = 0xFF; return ApiStatus_DONE1; } return ApiStatus_BLOCK; } ApiStatus FadeOutMerlee(ScriptInstance* script, s32 isInitialCall) { - Npc* npc = get_npc_unsafe(-0xA); + Npc* npc = get_npc_unsafe(NPC_BTL_MERLEE); - npc->unk_AC -= 17; - if (npc->unk_AC == 0) { - npc->unk_AC = 0; + npc->alpha -= 17; + if (npc->alpha == 0) { + npc->alpha = 0; return ApiStatus_DONE1; } @@ -277,7 +277,7 @@ void update_encounters_conversation(void) { enable_player_input(); func_800EF600(); - if (playerStatus->actionState == ACTION_STATE_CONVERSATION) { + if (playerStatus->actionState == ACTION_STATE_TALK) { set_action_state(ACTION_STATE_IDLE); } diff --git a/src/23680.c b/src/23680.c index bb0fdd8f6e..a2cc93b671 100644 --- a/src/23680.c +++ b/src/23680.c @@ -125,7 +125,7 @@ s32 func_800493EC(Enemy* enemy, s32 arg1, f32 arg2, f32 arg3) { f32 f1 = npc->pos.x; f32 f2 = npc->pos.z; - add_vec2D_polar(&f1, &f2, arg3, 270.0f - npc->unk_34); + add_vec2D_polar(&f1, &f2, arg3, 270.0f - npc->renderYaw); if (dist2D(f1, f2, playerStatus->position.x, playerStatus->position.z) <= arg2) { return 1; diff --git a/src/77480.c b/src/77480.c index c310a7f070..4246169183 100644 --- a/src/77480.c +++ b/src/77480.c @@ -92,7 +92,7 @@ void update_player(void) { } } - if (!(playerStatus->animFlags & 0x1000)) { + if (!(playerStatus->animFlags & PLAYER_ANIM_FLAG_PEACH_PHYSICS)) { func_800EFD08(); } @@ -105,7 +105,7 @@ void update_player(void) { gameStatus->playerYaw = playerStatus->currentYaw; check_input_open_menus(); - if (!(playerStatus->animFlags & 0x1000)) { + if (!(playerStatus->animFlags & PLAYER_ANIM_FLAG_PEACH_PHYSICS)) { check_input_status_menu(); } @@ -145,11 +145,15 @@ void func_800DFAAC(void) { check_input_midair_jump(); - if (playerStatus->actionState != ACTION_STATE_SLIDING) { + if (playerStatus->actionState != ACTION_STATE_SLIDE) { collision_main_lateral(); func_800E4508(); - if ((collision_main_above() < 0) && (playerStatus->decorationList == 0) && (playerStatus->animFlags & 0x1000)) { + if ( + collision_main_above() < 0 && + playerStatus->decorationList == 0 && + playerStatus->animFlags & PLAYER_ANIM_FLAG_PEACH_PHYSICS + ) { func_800E4F10(); } @@ -215,9 +219,9 @@ s32 func_800DFCF4(void) { INCLUDE_ASM(s32, "77480", func_800DFD48); -void func_800DFEFC(void) { +void func_800DFEFC(s32 arg0) { PlayerStatus* playerStatus = &gPlayerStatus; - s32 temp_v0 = func_800DFD48(); + s32 temp_v0 = func_800DFD48(arg0); if (temp_v0 != -1) { playerStatus->anim = temp_v0; @@ -234,9 +238,9 @@ void func_800DFF50(s32 arg0) { playerStatus->flags &= ~0x10000000; } -void func_800DFF78(void) { +void func_800DFF78(s32 arg0) { PlayerStatus* playerStatus = &gPlayerStatus; - s32 temp_v0 = func_800DFD48(); + s32 temp_v0 = func_800DFD48(arg0); if (temp_v0 != -1) { playerStatus->anim = temp_v0; @@ -301,7 +305,7 @@ s32 enable_player_input(void) { void func_800E01DC(void) { PlayerStatus* playerStatus = &gPlayerStatus; - if (playerStatus->animFlags & 0x10) { + if (playerStatus->animFlags & PLAYER_ANIM_FLAG_INTERACT_PROMPT) { playerStatus->flags |= 0x8000000; } } @@ -328,14 +332,14 @@ void func_800E0260(void) { INCLUDE_ASM(s32, "77480", func_800E0294); void func_800E0330(void) { - if ((gPlayerStatusPtr->animFlags & 0x100) && (D_8010C93C != 0)) { + if ((gPlayerStatusPtr->animFlags & PLAYER_ANIM_FLAG_100) && (D_8010C93C != 0)) { func_802B7000_E225B0(); } } void func_800E0374(void) { D_8010C93C = 0; - gPlayerStatusPtr->animFlags &= ~0x100; + gPlayerStatusPtr->animFlags &= ~PLAYER_ANIM_FLAG_100; } INCLUDE_ASM(s32, "77480", func_800E0398); diff --git a/src/7bb60_len_41b0.c b/src/7bb60_len_41b0.c index 3fd99ceece..eab1cdc1ee 100644 --- a/src/7bb60_len_41b0.c +++ b/src/7bb60_len_41b0.c @@ -2,7 +2,7 @@ #include "world/partners.h" f32 func_800E34D8(void); -f32 func_800E3514(f32, f32*); +f32 func_800E3514(f32, s32* colliderID); extern s32 D_8010C96C; // npc list index extern s16 D_8010C9B0; @@ -23,7 +23,8 @@ s32 func_800E26C4(void) { actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN || actionState == ACTION_STATE_USE_TWEESTER || - actionState == ACTION_STATE_SPIN) { + actionState == ACTION_STATE_SPIN + ) { return 1; } @@ -97,11 +98,12 @@ void gravity_use_fall_params(void) { void func_800E3100(void) { PlayerStatus* playerStatus = &gPlayerStatus; - if (playerStatus->actionState != ACTION_STATE_7 && playerStatus->actionState != ACTION_STATE_BOUNCE) { - f32* temp; + if (playerStatus->actionState != ACTION_STATE_LAND_ON_SWITCH && playerStatus->actionState != ACTION_STATE_BOUNCE) { + s32* colliderID; - playerStatus->position.y = func_800E3514(func_800E34D8(), &temp); - func_800E315C(temp); + playerStatus->position.y = func_800E3514(func_800E34D8(), &colliderID); + + func_800E315C(colliderID); } } @@ -133,7 +135,7 @@ f32 func_800E34D8(void) { return ret; } -INCLUDE_ASM(f32, "7bb60_len_41b0", func_800E3514, f32 arg0, f32* arg1); +INCLUDE_ASM(f32, "7bb60_len_41b0", func_800E3514, f32 arg0, s32* colliderID); INCLUDE_ASM(s32, "7bb60_len_41b0", collision_main_lateral); @@ -358,21 +360,35 @@ void set_action_state(s32 actionState) { } if (playerStatus->animFlags & 0x4000) { - if (actionState < ACTION_STATE_CONVERSATION) { + // TODO figure this out +#ifdef NON_MATCHING + if ( + actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || + actionState == ACTION_STATE_RUN || actionState == ACTION_STATE_JUMP || + actionState == ACTION_STATE_BOUNCE || actionState == ACTION_STATE_HOP || + actionState == ACTION_STATE_LAUNCH || actionState == ACTION_STATE_LAND_ON_SWITCH || + actionState == ACTION_STATE_FALLING || actionState == ACTION_STATE_STEP_DOWN || + actionState == ACTION_STATE_LAND || actionState == ACTION_STATE_STEP_DOWN_LAND + ) { +#else + if (actionState < ACTION_STATE_TALK) if (actionState >= 0) { +#endif playerStatus->prevActionState = playerStatus->actionState; playerStatus->actionState = actionState; playerStatus->flags |= 0x80000000; +#ifdef NON_MATCHING } +#endif } return; } - if (actionState == ACTION_STATE_HIT_HAZARD || actionState == ACTION_STATE_HIT_LAVA) { + if (actionState == ACTION_STATE_HIT_FIRE || actionState == ACTION_STATE_HIT_LAVA) { PartnerID partner; if (playerStatus->unk_BF == 3) { - actionState = ACTION_STATE_HIT_HAZARD; + actionState = ACTION_STATE_HIT_FIRE; } // Whilst Sushie, Lakilester, Parakarry's ability is active, hazards have no effect. @@ -387,7 +403,7 @@ void set_action_state(s32 actionState) { } } - if (actionState == ACTION_STATE_SLIDING) { + if (actionState == ACTION_STATE_SLIDE) { playerStatus->flags |= 0x10; playerStatus->moveFrames = 0; playerStatus->flags &= ~0x4000; @@ -485,7 +501,7 @@ void check_input_spin(void) { Temp8010F250* temp_8010F250 = &D_8010F250; Temp8010F250* temp2 = temp_8010F250; - if (!(playerStatus->flags & 0x5000) && + if (!(playerStatus->flags & (PLAYER_ANIM_FLAG_8BIT_MARIO | PLAYER_ANIM_FLAG_PEACH_PHYSICS)) && !(playerStatus->animFlags & 1) && !(playerStatus->currentButtons & D_CBUTTONS) && !is_ability_active(ABILITY_SLOW_GO)) { @@ -493,6 +509,7 @@ void check_input_spin(void) { s32 actionState = playerStatus->actionState; s32 btnPressed = playerStatus->pressedButtons & Z_TRIG; + // TODO if (actionState != 0x21) { if (actionState < 0x22) { if (actionState < 3) { @@ -526,9 +543,9 @@ void func_800E63A4(s32 arg0) { PlayerStatus* playerStatus = &gPlayerStatus; if (arg0 != 0) { - set_action_state(0x19); + set_action_state(ACTION_STATE_SNEAKY_PARASOL); } else { - playerStatus->animFlags &= ~0x2000; + playerStatus->animFlags &= ~PLAYER_ANIM_FLAG_IN_DISGUISE; gGameStatusPtr->peachFlags &= ~0x2; playerStatus->peachDisguise = 0; npc_free_by_index(D_8010C96C); @@ -552,17 +569,17 @@ void func_800E6428(void) { if (*temp_8010C92C == 0) { GameStatus** gameStatus = &gGameStatusPtr; if ((*gameStatus)->peachFlags & 2) { - playerStatus->animFlags |= 0x2000; + playerStatus->animFlags |= PLAYER_ANIM_FLAG_IN_DISGUISE; (*gameStatus)->peachFlags |= 2; disguiseNpc = make_disguise_npc((*gameStatus)->peachDisguise); if (disguiseNpc != NULL) { - disguiseNpc->flags &= ~0x40000; + disguiseNpc->flags &= ~NPC_FLAG_40000; } } } } else if (gGameStatusPtr->peachFlags & 4 && playerStatus2->pressedButtons & B_BUTTON) { - set_action_state(0x19); + set_action_state(ACTION_STATE_SNEAKY_PARASOL); } } } @@ -573,8 +590,8 @@ void func_800E6500(void) { if (D_8010C96C >= 0) { Npc* npc = get_npc_by_index(D_8010C96C); - if (npc->flags & 0x40000) { - npc->unk_34 = playerStatus->spriteFacingAngle; + if (npc->flags & NPC_FLAG_40000) { + npc->renderYaw = playerStatus->spriteFacingAngle; } else { npc->yaw = playerStatus->targetYaw; } diff --git a/src/E20110.c b/src/E20110.c index 2d4eade45b..37bf89fe84 100644 --- a/src/E20110.c +++ b/src/E20110.c @@ -23,5 +23,5 @@ void func_802B79C8_E20AD8(void) { gPlayerStatusPtr->unk_C8 = NULL; gPlayerStatusPtr->animFlags &= ~0x10; func_800EF3D4(0); - reset_parter_tether_distance(); + reset_partner_tether_distance(); } diff --git a/src/E23260.c b/src/E23260.c deleted file mode 100644 index 13e2b55c5c..0000000000 --- a/src/E23260.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E23260", func_802B6000_E23260); - -INCLUDE_ASM(s32, "E23260", func_802B61E4_E23444); diff --git a/src/E236E0.c b/src/E236E0.c deleted file mode 100644 index ea5592b891..0000000000 --- a/src/E236E0.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E236E0", func_802B6000_E236E0); - -INCLUDE_ASM(s32, "E236E0", func_802B6288_E23968); - -INCLUDE_ASM(s32, "E236E0", func_802B6550_E23C30); - -INCLUDE_ASM(s32, "E236E0", func_802B65E8_E23CC8); - -INCLUDE_ASM(s32, "E236E0", func_802B6738_E23E18); diff --git a/src/E24040.c b/src/E24040.c deleted file mode 100644 index a779920d0f..0000000000 --- a/src/E24040.c +++ /dev/null @@ -1,15 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E24040", func_802B6000_E24040); - -INCLUDE_ASM(s32, "E24040", func_802B60B4_E240F4); - -INCLUDE_ASM(s32, "E24040", func_802B6198_E241D8); - -INCLUDE_ASM(s32, "E24040", func_802B6294_E242D4); - -INCLUDE_ASM(s32, "E24040", func_802B6348_E24388); - -INCLUDE_ASM(s32, "E24040", func_802B647C_E244BC); - -INCLUDE_ASM(s32, "E24040", func_802B6508_E24548); diff --git a/src/E245D0.c b/src/E245D0.c deleted file mode 100644 index 01fb607c7e..0000000000 --- a/src/E245D0.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E245D0", func_802B6000_E245D0); - -INCLUDE_ASM(s32, "E245D0", func_802B6198_E24768); - -INCLUDE_ASM(s32, "E245D0", func_802B6230_E24800); diff --git a/src/E24920.c b/src/E24920.c deleted file mode 100644 index 9982640010..0000000000 --- a/src/E24920.c +++ /dev/null @@ -1,9 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E24920", func_802B6000_E24920); - -INCLUDE_ASM(s32, "E24920", func_802B61C0_E24AE0); - -INCLUDE_ASM(s32, "E24920", func_802B62CC_E24BEC); - -INCLUDE_ASM(s32, "E24920", func_802B644C_E24D6C); diff --git a/src/E24ED0.c b/src/E24ED0.c deleted file mode 100644 index 543859b716..0000000000 --- a/src/E24ED0.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E24ED0", func_802B6000_E24ED0); - -INCLUDE_ASM(s32, "E24ED0", func_802B6048_E24F18); - -INCLUDE_ASM(s32, "E24ED0", func_802B62A4_E25174); - -INCLUDE_ASM(s32, "E24ED0", func_802B66A8_E25578); - -INCLUDE_ASM(s32, "E24ED0", func_802B6820_E256F0); diff --git a/src/E25D60.c b/src/E25D60.c deleted file mode 100644 index 88412e5676..0000000000 --- a/src/E25D60.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E25D60", func_802B6000_E25D60); diff --git a/src/E26710.c b/src/E26710.c deleted file mode 100644 index 7419c81d6f..0000000000 --- a/src/E26710.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E26710", func_802B6000_E26710); - -INCLUDE_ASM(s32, "E26710", func_802B65F8_E26D08); diff --git a/src/E26DE0.c b/src/E26DE0.c deleted file mode 100644 index c002120462..0000000000 --- a/src/E26DE0.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E26DE0", func_802B6000_E26DE0); - -INCLUDE_ASM(s32, "E26DE0", func_802B6648_E27428); diff --git a/src/E27510.c b/src/E27510.c deleted file mode 100644 index 385a66a541..0000000000 --- a/src/E27510.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E27510", func_802B6000_E27510); - -INCLUDE_ASM(s32, "E27510", func_802B6060_E27570); diff --git a/src/E27C90.c b/src/E27C90.c deleted file mode 100644 index 1b5bfcd7fb..0000000000 --- a/src/E27C90.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E27C90", func_802B6000_E27C90); diff --git a/src/E27F40.c b/src/E27F40.c deleted file mode 100644 index 02c9c1eda2..0000000000 --- a/src/E27F40.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E27F40", func_802B6000_E27F40); diff --git a/src/E287F0.c b/src/E287F0.c deleted file mode 100644 index 2d5d577017..0000000000 --- a/src/E287F0.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E287F0", func_802B6000_E287F0); diff --git a/src/E28A30.c b/src/E28A30.c deleted file mode 100644 index 6a2801a8a4..0000000000 --- a/src/E28A30.c +++ /dev/null @@ -1,15 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E28A30", func_802B6000_E28A30); - -INCLUDE_ASM(s32, "E28A30", func_802B609C_E28ACC); - -INCLUDE_ASM(s32, "E28A30", func_802B6350_E28D80); - -INCLUDE_ASM(s32, "E28A30", func_802B63D4_E28E04); - -INCLUDE_ASM(s32, "E28A30", func_802B6478_E28EA8); - -INCLUDE_ASM(s32, "E28A30", func_802B6508_E28F38); - -INCLUDE_ASM(s32, "E28A30", func_802B6638_E29068); diff --git a/src/E291A0.c b/src/E291A0.c deleted file mode 100644 index ccc822d596..0000000000 --- a/src/E291A0.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E291A0", func_802B6000_E291A0); diff --git a/src/E29470.c b/src/E29470.c deleted file mode 100644 index 3f040395d9..0000000000 --- a/src/E29470.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E29470", func_802B6000_E29470); - -INCLUDE_ASM(s32, "E29470", func_802B60A4_E29514); diff --git a/src/E2A340.c b/src/E2A340.c deleted file mode 100644 index a3433ab6ba..0000000000 --- a/src/E2A340.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E2A340", func_802B6000_E2A340); diff --git a/src/E2A6B0.c b/src/E2A6B0.c deleted file mode 100644 index 46c6fec415..0000000000 --- a/src/E2A6B0.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "E2A6B0", func_802B6000_E2A6B0); - -INCLUDE_ASM(s32, "E2A6B0", func_802B6120_E2A7D0); - -INCLUDE_ASM(s32, "E2A6B0", func_802B6CF0_E2B3A0); diff --git a/src/b72b0_len_15ed0.c b/src/b72b0_len_15ed0.c index 11f25f9dc9..cdd3b6be8d 100644 --- a/src/b72b0_len_15ed0.c +++ b/src/b72b0_len_15ed0.c @@ -238,7 +238,7 @@ void func_80122D7C(s32 idx, u32* arg1) { } } -EntityModel* func_80122DDC(s32 listIndex) { +EntityModel* get_entity_model(s32 listIndex) { return (*gCurrentEntityModelList)[listIndex & ~0x800]; } diff --git a/src/f2470_len_27f0.c b/src/f2470_len_27f0.c index 9f17b24577..8e80c3ef71 100644 --- a/src/f2470_len_27f0.c +++ b/src/f2470_len_27f0.c @@ -99,7 +99,7 @@ ApiStatus func_802CDE68(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } - npc->unk_50 = var1; + npc->rotationVerticalPivotOffset = var1; return ApiStatus_DONE2; } @@ -316,7 +316,7 @@ ApiStatus SetNpcSprite(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } - set_npc_sprite(npc, arg1, 0); + set_npc_sprite(npc, arg1, NULL); return ApiStatus_DONE2; } diff --git a/src/npc.c b/src/npc.c index 27ba29133e..d9faf61496 100644 --- a/src/npc.c +++ b/src/npc.c @@ -111,24 +111,24 @@ void disable_npc_shadow(Npc* npc) { } } -void set_npc_sprite(Npc* npc, s32 anim, s32 arg2) { +void set_npc_sprite(Npc* npc, s32 anim, s32** extraAnimList) { s32 flagsTemp; - ASSERT((npc->flags & 0x1000000) || func_802DE5E8(npc->unk_24) == 0); + ASSERT((npc->flags & NPC_FLAG_1000000) || func_802DE5E8(npc->spriteInstanceID) == 0); - npc->unk_B0 = arg2; + npc->extraAnimList = extraAnimList; - if (!(npc->flags & 0x1000000)) { - npc->unk_24 = func_802DE0EC(anim, arg2); - ASSERT(npc->unk_24 >= 0); + if (!(npc->flags & NPC_FLAG_1000000)) { + npc->spriteInstanceID = func_802DE0EC(anim, extraAnimList); + ASSERT(npc->spriteInstanceID >= 0); } flagsTemp = npc->flags; npc->currentAnim = anim; if (!(flagsTemp & 0x40000000)) { - if (!(flagsTemp & 0x1000000)) { - func_802DE2AC(npc->unk_24, anim, npc->animationSpeed); + if (!(flagsTemp & NPC_FLAG_1000000)) { + func_802DE2AC(npc->spriteInstanceID, anim, npc->animationSpeed); } } } @@ -277,7 +277,7 @@ Npc* npc_find_near(f32 x, f32 y, f32 z, f32 radius) { for (i = 0; i < ARRAY_COUNT(*gCurrentNpcListPtr); i++) { Npc* npc = (*gCurrentNpcListPtr)[i]; - if (npc != NULL && npc->flags != 0 && !(npc->flags & NPC_FLAG_SIMPLE_XZ_HITBOX)) { + if (npc != NULL && npc->flags != 0 && !(npc->flags & NPC_FLAG_PARTICLE)) { if (!(npc->flags & (NPC_FLAG_80000000 | NPC_FLAG_4))) { f32 distance = fabsf(dist2D(npc->pos.x, npc->pos.z, x, z)); @@ -303,7 +303,7 @@ Npc* npc_find_near_simple(f32 x, f32 y, f32 z, f32 radius) { for (i = 0; i < ARRAY_COUNT(*gCurrentNpcListPtr); i++) { Npc* npc = (*gCurrentNpcListPtr)[i]; - if (npc != NULL && npc->flags != 0 && (npc->flags & NPC_FLAG_SIMPLE_XZ_HITBOX)) { + if (npc != NULL && npc->flags != 0 && (npc->flags & NPC_FLAG_PARTICLE)) { if (!(npc->flags & (NPC_FLAG_80000000 | NPC_FLAG_4))) { f32 distance = fabsf(dist2D(npc->pos.x, npc->pos.z, x, z)); diff --git a/src/npc.h b/src/npc.h index ea0a51bbcb..9a0a1d2008 100644 --- a/src/npc.h +++ b/src/npc.h @@ -144,8 +144,8 @@ s32 func_8003CFA8(); /// Finds the closest NPC to a given point within a radius. Ignores Y position. /// -/// NPCs with NPC_FLAG_SIMPLE_XZ_HITBOX set are ignored. -/// See also npc_find_near_simple(), which requires that NPC_FLAG_SIMPLE_XZ_HITBOX be set. +/// NPCs with NPC_FLAG_PARTICLE set are ignored. +/// See also npc_find_near_simple(), which requires that NPC_FLAG_PARTICLE be set. /// /// @param x X position /// @param y Y position (unused) @@ -157,8 +157,8 @@ Npc* npc_find_near(f32 x, f32 y, f32 z, f32 radius); /// Finds the closest simple-hitbox NPC to a given point within a radius. Ignores Y position. /// -/// Only NPCs with NPC_FLAG_SIMPLE_XZ_HITBOX set are considered. -/// See also npc_find_near(), which requires that NPC_FLAG_SIMPLE_XZ_HITBOX be unset. +/// Only NPCs with NPC_FLAG_PARTICLE set are considered. +/// See also npc_find_near(), which requires that NPC_FLAG_PARTICLE be unset. /// /// @param x X position /// @param y Y position (unused) diff --git a/src/world/action/16.c b/src/world/action/16.c new file mode 100644 index 0000000000..b9a7395f23 --- /dev/null +++ b/src/world/action/16.c @@ -0,0 +1,72 @@ +#include "common.h" + +void sin_cos_rad(f32, f32*, f32*); +f32 func_800E34D8(void); +f32 func_800E3514(f32 length, s32* hitColliderID); // player_check_collision_below +s32 get_collider_type_by_id(s32 colliderID); + +extern f32 D_802B6240; // bss? angle to lastGoodPosition + +// Float problems near func_800E0088; almost matching otherwise +#ifndef NON_MATCHING +INCLUDE_ASM(void, "world/action/16", func_802B6000_E287F0, void); +#else +void func_802B6000_E287F0(void) { + f32 dx; + f32 dy; + f32 speed; + f32 angleRad; + + if (gPlayerStatus.flags & 0x80000000) { + Camera* cameras = gCameras; + + gPlayerStatus.flags &= ~0x80000000; + + func_800DFF78(0x10017); + + cameras[0].moveFlags |= 1; + + gPlayerStatus.fallState = 0; + gPlayerStatus.gravityIntegrator[0] = 18.3473f; + gPlayerStatus.gravityIntegrator[1] = -3.738f; + gPlayerStatus.gravityIntegrator[2] = 0.8059f; + gPlayerStatus.gravityIntegrator[3] = -0.0987f; + gPlayerStatus.flags |= 8; + + D_802B6240 = atan2(gPlayerStatus.position.x, gPlayerStatus.position.z, gPlayerStatus.lastGoodPosition.x, gPlayerStatus.lastGoodPosition.z); + gPlayerStatus.currentSpeed = func_800E0088(gPlayerStatus.lastGoodPosition.x, gPlayerStatus.lastGoodPosition.z) / 18.0f; + } + + angleRad = (D_802B6240 * TAU) / 360.0f; + sin_cos_rad(angleRad, &dx, &dy); + + speed = gPlayerStatus.currentSpeed; + + if (gPlayerStatus.flags & 0x40000) { + speed *= 0.5f; + } + + gPlayerStatus.position.x += speed * dx; + gPlayerStatus.position.z -= speed * dy; + + if (gPlayerStatus.fallState == 0) { + integrate_gravity(); + + gPlayerStatus.position.y += gPlayerStatus.gravityIntegrator[0]; + + if (gPlayerStatus.gravityIntegrator[0] < 0.0f) { + gPlayerStatus.fallState = 1; // Now start checking for floor + gPlayerStatus.flags |= 4; + } + } else { + s32 colliderID; + + gPlayerStatus.position.y = func_800E3514(func_800E34D8(), &colliderID); + + if (colliderID >= 0) { + colliderID = get_collider_type_by_id(colliderID); // what + set_action_state(ACTION_STATE_LAND); + } + } +} +#endif diff --git a/src/world/action/18.c b/src/world/action/18.c new file mode 100644 index 0000000000..9853bfe582 --- /dev/null +++ b/src/world/action/18.c @@ -0,0 +1,7 @@ +#include "common.h" + +INCLUDE_ASM(s32, "world/action/18", func_802B6000_E245D0); + +INCLUDE_ASM(s32, "world/action/18", func_802B6198_E24768); + +INCLUDE_ASM(s32, "world/action/18", func_802B6230_E24800); diff --git a/src/world/action/encounter.c b/src/world/action/encounter.c new file mode 100644 index 0000000000..e1c60934f8 --- /dev/null +++ b/src/world/action/encounter.c @@ -0,0 +1,15 @@ +#include "common.h" + +INCLUDE_ASM(s32, "world/action/encounter", func_802B6000_E28A30); + +INCLUDE_ASM(s32, "world/action/encounter", func_802B609C_E28ACC); + +INCLUDE_ASM(s32, "world/action/encounter", func_802B6350_E28D80); + +INCLUDE_ASM(s32, "world/action/encounter", func_802B63D4_E28E04); + +INCLUDE_ASM(s32, "world/action/encounter", func_802B6478_E28EA8); + +INCLUDE_ASM(s32, "world/action/encounter", func_802B6508_E28F38); + +INCLUDE_ASM(void, "world/action/encounter", func_802B6638_E29068, void); diff --git a/src/world/action/hammer.c b/src/world/action/hammer.c new file mode 100644 index 0000000000..bc7629eb0c --- /dev/null +++ b/src/world/action/hammer.c @@ -0,0 +1,11 @@ +#include "common.h" + +INCLUDE_ASM(s32, "world/action/hammer", func_802B6000_E24ED0); + +INCLUDE_ASM(s32, "world/action/hammer", func_802B6048_E24F18); + +INCLUDE_ASM(s32, "world/action/hammer", func_802B62A4_E25174); + +INCLUDE_ASM(void, "world/action/hammer", func_802B66A8_E25578, void); + +INCLUDE_ASM(s32, "world/action/hammer", func_802B6820_E256F0); diff --git a/src/world/action/hit_fire.c b/src/world/action/hit_fire.c new file mode 100644 index 0000000000..8686a3bab7 --- /dev/null +++ b/src/world/action/hit_fire.c @@ -0,0 +1,3 @@ +#include "common.h" + +INCLUDE_ASM(void, "world/action/hit_fire", func_802B6000_E27C90, void); diff --git a/src/world/action/hit_lava.c b/src/world/action/hit_lava.c new file mode 100644 index 0000000000..3f24507b28 --- /dev/null +++ b/src/world/action/hit_lava.c @@ -0,0 +1,3 @@ +#include "common.h" + +INCLUDE_ASM(s32, "world/action/hit_lava", func_802B6000_E27F40); diff --git a/src/world/action/idle.c b/src/world/action/idle.c new file mode 100644 index 0000000000..94611d40af --- /dev/null +++ b/src/world/action/idle.c @@ -0,0 +1,160 @@ +#include "common.h" +#include "../actions.h" + +void input_to_move_vector(f32* angle, f32* magnitude); +s32 check_input_jump(void); +s32 check_input_hammer(void); + +NpcAnimID world_action_idle_peachAnims[] = { + 0x000A0001, // Idle + + // Cooking: + 0x000A0007, 0x000A0009, 0x000A000B, 0x000A000D, 0x000A000F, 0x000A0011, 0x000A0013, + 0x000A0015, 0x000A0017, 0x000A0019, 0x000A001B, 0x000A001D, 0x000A001F, 0x000A0021, 0x000A0023, + 0x000A0025, 0x000A0027, 0x000A0029, 0x00000000, +}; + +void world_action_idle_update(void) { + PlayerStatus* playerStatus = &gPlayerStatus; + PlayerData* playerData = &gPlayerData; + s32 wasMoving = FALSE; + + if (playerStatus->animFlags & PLAYER_ANIM_FLAG_PEACH_PHYSICS) { + func_802B61E4_E23444(); + return; + } + + playerStatus->framesOnGround++; + + if (playerStatus->flags & 0x80000000) { + NpcAnimID anim; + + playerStatus->flags &= ~0x8008000E; + wasMoving = TRUE; + playerStatus->fallState = 0; + playerStatus->framesOnGround = 0; + playerStatus->decorationList = 0; + playerStatus->unk_C2 = 0; + playerStatus->currentSpeed = 0.0f; + playerStatus->unk_8C = 0; + + if (playerStatus->animFlags & PLAYER_ANIM_FLAG_8BIT_MARIO) { + anim = 0x90002; + } else if (!(playerStatus->animFlags & PLAYER_ANIM_FLAG_HOLDING_ITEM)) { + anim = 0x10002; + } else if ((s8)playerStatus->prevActionState == ACTION_STATE_IDLE) { + anim = 0x60005; + } else { + anim = 0x60007; + } + func_800DFEFC(anim); + } + + if (playerStatus->animFlags & PLAYER_ANIM_FLAG_GET_STAR_SPIRIT) { + set_action_state(ACTION_STATE_GET_STAR_SPIRIT); + } else { + f32 angle; + f32 magnitude; + + input_to_move_vector(&angle, &magnitude); + func_800E5150(); + + if (check_input_jump()) { + if (magnitude != 0.0f || playerStatus->targetYaw != angle) { + playerStatus->targetYaw = angle; + } + } else if (wasMoving || !check_input_hammer()) { + if (magnitude == 0.0f) { + playerData->idleFrameCounter++; + } else { + playerStatus->framesOnGround = 0; + set_action_state(ACTION_STATE_WALK); + if (magnitude != 0.0f) { + playerStatus->targetYaw = angle; + playerStatus->animFlags &= ~0x80000000; + } + } + } + } +} + +#ifndef NON_MATCHING +INCLUDE_ASM(void, "world/action/idle", func_802B61E4_E23444, void); +#else +void func_802B61E4_E23444(void) { + PlayerStatus* playerStatus = &gPlayerStatus; + PlayerData* playerData = &gPlayerData; + + if (playerStatus->flags & 0x80000000) { + playerStatus->flags &= ~0x80000000; + playerStatus->fallState = 0; + playerStatus->framesOnGround = 0; + playerStatus->decorationList = 0; + playerStatus->unk_C2 = 0; + playerStatus->currentSpeed = 0.0f; + playerStatus->flags &= ~0xE; + + if (!(playerStatus->animFlags & PLAYER_ANIM_FLAG_IN_DISGUISE)) { + if (!(gGameStatusPtr->peachFlags & 0x10)) { + func_800DFEFC(world_action_idle_peachAnims[gGameStatusPtr->peachAnimIdx]); + } else { + func_800DFEFC(world_actions_peachDisguises[playerStatus->peachDisguise].idle); + } + } else { + func_800DFEFC(0xC000E); + } + } + + if (!(playerStatus->animFlags & 0x2000)) { + switch (playerStatus->fallState) { + case 0: + if (((playerStatus->flags & 0x3000) == 0) && (playerStatus->unk_C4 == 0)) { + if (playerStatus->framesOnGround > 1800) { + playerStatus->fallState++; + func_800DFEFC(0xC0003); + return; + } + playerStatus->framesOnGround++; + } + break; + case 1: + if (playerStatus->unk_BC != 0) { + playerStatus->fallState++; + playerStatus->framesOnGround = 0; + func_800DFEFC(0xA0001); + } + break; + case 2: { + playerStatus->framesOnGround++; + if (playerStatus->framesOnGround > 200) { + playerStatus->fallState++; + func_800DFEFC(0xC0003); + } + break; + } + case 3: + if ((playerStatus->flags & 0x3000) != 0) { + func_800DFEFC(0xA0001); + playerStatus->fallState = 0; + } else if (playerStatus->unk_BC != 0) { + func_800DFEFC(0xC0004); + } + break; + } + } + + { + f32 angle; + f32 magnitude; + + input_to_move_vector(&angle, &magnitude); + func_800E5150(); + + if (magnitude != 0.0f) { + playerStatus->framesOnGround = 0; + playerStatus->targetYaw = angle; + set_action_state(ACTION_STATE_WALK); + } + } +} +#endif diff --git a/src/world/action/jump.c b/src/world/action/jump.c new file mode 100644 index 0000000000..59c9ea6bf2 --- /dev/null +++ b/src/world/action/jump.c @@ -0,0 +1,15 @@ +#include "common.h" + +INCLUDE_ASM(void, "world/action/jump", func_802B6000_E24040, void); + +INCLUDE_ASM(void, "world/action/jump", func_802B60B4_E240F4, void); + +INCLUDE_ASM(void, "world/action/jump", func_802B6198_E241D8, void); + +INCLUDE_ASM(void, "world/action/jump", func_802B6294_E242D4, void); + +INCLUDE_ASM(void, "world/action/jump", func_802B6348_E24388, void); + +INCLUDE_ASM(void, "world/action/jump", func_802B647C_E244BC, void); + +INCLUDE_ASM(void, "world/action/jump", func_802B6508_E24548, void); diff --git a/src/world/action/land.c b/src/world/action/land.c new file mode 100644 index 0000000000..d1c1ded14f --- /dev/null +++ b/src/world/action/land.c @@ -0,0 +1,9 @@ +#include "common.h" + +INCLUDE_ASM(void, "world/action/land", func_802B6000_E24920, void); + +INCLUDE_ASM(void, "world/action/land", func_802B61C0_E24AE0, void); + +INCLUDE_ASM(void, "world/action/land", func_802B62CC_E24BEC, void); + +INCLUDE_ASM(void, "world/action/land", func_802B644C_E24D6C, void); diff --git a/src/world/action/slide.c b/src/world/action/slide.c new file mode 100644 index 0000000000..6fb67e914a --- /dev/null +++ b/src/world/action/slide.c @@ -0,0 +1,5 @@ +#include "common.h" + +INCLUDE_ASM(s32, "world/action/slide", func_802B6000_E27510); + +INCLUDE_ASM(void, "world/action/slide", func_802B6060_E27570, void); diff --git a/src/world/action/sneaky_parasol.c b/src/world/action/sneaky_parasol.c new file mode 100644 index 0000000000..0bb402f4b9 --- /dev/null +++ b/src/world/action/sneaky_parasol.c @@ -0,0 +1,7 @@ +#include "common.h" + +INCLUDE_ASM(s32, "world/action/sneaky_parasol", func_802B6000_E2A6B0); + +INCLUDE_ASM(s32, "world/action/sneaky_parasol", func_802B6120_E2A7D0); + +INCLUDE_ASM(s32, "world/action/sneaky_parasol", func_802B6CF0_E2B3A0); diff --git a/src/world/action/spin.c b/src/world/action/spin.c new file mode 100644 index 0000000000..3e51787aa8 --- /dev/null +++ b/src/world/action/spin.c @@ -0,0 +1,3 @@ +#include "common.h" + +INCLUDE_ASM(s32, "world/action/spin", func_802B6000_E25D60); diff --git a/src/world/action/super_boots.c b/src/world/action/super_boots.c new file mode 100644 index 0000000000..aaeef6fc8c --- /dev/null +++ b/src/world/action/super_boots.c @@ -0,0 +1,5 @@ +#include "common.h" + +INCLUDE_ASM(void, "world/action/super_boots", func_802B6000_E26DE0, void); + +INCLUDE_ASM(void, "world/action/super_boots", func_802B6648_E27428, void); diff --git a/src/world/action/ultra_boots.c b/src/world/action/ultra_boots.c new file mode 100644 index 0000000000..0df2c27ae9 --- /dev/null +++ b/src/world/action/ultra_boots.c @@ -0,0 +1,5 @@ +#include "common.h" + +INCLUDE_ASM(void, "world/action/ultra_boots", func_802B6000_E26710, void); + +INCLUDE_ASM(void, "world/action/ultra_boots", func_802B65F8_E26D08, void); diff --git a/src/world/action/use_munchlesia.c b/src/world/action/use_munchlesia.c new file mode 100644 index 0000000000..66a5141630 --- /dev/null +++ b/src/world/action/use_munchlesia.c @@ -0,0 +1,3 @@ +#include "common.h" + +INCLUDE_ASM(s32, "world/action/use_munchlesia", func_802B6000_E291A0); diff --git a/src/world/action/use_spinning_flower.c b/src/world/action/use_spinning_flower.c new file mode 100644 index 0000000000..82a50da31c --- /dev/null +++ b/src/world/action/use_spinning_flower.c @@ -0,0 +1,5 @@ +#include "common.h" + +INCLUDE_ASM(s32, "world/action/use_spinning_flower", func_802B6000_E29470); + +INCLUDE_ASM(s32, "world/action/use_spinning_flower", func_802B60A4_E29514); diff --git a/src/world/action/use_tweester.c b/src/world/action/use_tweester.c new file mode 100644 index 0000000000..f4a4c39067 --- /dev/null +++ b/src/world/action/use_tweester.c @@ -0,0 +1,3 @@ +#include "common.h" + +INCLUDE_ASM(s32, "world/action/use_tweester", func_802B6000_E2A340); diff --git a/src/world/action/walk.c b/src/world/action/walk.c new file mode 100644 index 0000000000..7e16056bf7 --- /dev/null +++ b/src/world/action/walk.c @@ -0,0 +1,13 @@ +#include "common.h" + +// walk +INCLUDE_ASM(void, "world/action/walk", func_802B6000_E236E0, void); + +// run +INCLUDE_ASM(void, "world/action/walk", func_802B6288_E23968, void); + +INCLUDE_ASM(void, "world/action/walk", func_802B6550_E23C30, void); + +INCLUDE_ASM(void, "world/action/walk", func_802B65E8_E23CC8, void); + +INCLUDE_ASM(void, "world/action/walk", func_802B6738_E23E18, void); diff --git a/src/world/actions.c b/src/world/actions.c index 52b6e4a272..8dcb86cbbb 100644 --- a/src/world/actions.c +++ b/src/world/actions.c @@ -1,24 +1,26 @@ #include "common.h" #include "ld_addrs.h" +#include "actions.h" -s32 func_802B6000_E24920(); -s32 func_802B6288_E23968(); -s32 func_802B60B4_E240F4(); -s32 func_802B6198_E241D8(); -s32 func_802B6294_E242D4(); -s32 func_802B6060_E27570(); -s32 func_802B6348_E24388(); -s32 func_802B61C0_E24AE0(); -s32 func_802B6638_E29068(); -s32 func_802B66A8_E25578(); -s32 func_802B6350_E28D80(); -s32 func_802B6508_E28F38(); -s32 func_802B6230_E24800(); -s32 func_802B6120_E2A7D0(); -s32 func_802B63D4_E28E04(); -s32 func_802B6478_E28EA8(); -s32 func_802B60A4_E29514(); -s32 func_802B609C_E28ACC(); +void world_action_idle_update(void); +void func_802B6000_E24920(void); +void func_802B6288_E23968(void); +void func_802B60B4_E240F4(void); +void func_802B6198_E241D8(void); +void func_802B6294_E242D4(void); +void func_802B6348_E24388(void); +void func_802B61C0_E24AE0(void); +void func_802B6638_E29068(void); +void func_802B6060_E27570(void); +void func_802B66A8_E25578(void); +void func_802B6350_E28D80(void); +void func_802B6508_E28F38(void); +void func_802B6230_E24800(void); +void func_802B6120_E2A7D0(void); +void func_802B63D4_E28E04(void); +void func_802B6478_E28EA8(void); +void func_802B60A4_E29514(void); +void func_802B609C_E28ACC(void); f32 D_800F7B40 = 0.0f; s32 D_800F7B44 = 0; @@ -30,51 +32,56 @@ f32 D_800F7B60[] = { 0.154342994094f, -0.350080013275f, -0.182262003422f, 0.0115 f32 D_800F7B70[] = { 2.0, 4.0, 32.0, -32.0 }; s16 D_800F7B80 = 0; s32 D_800F7B84[] = { 0, 0, 0}; -s32 D_800F7B90 = 0; +f32 D_800F7B90 = 0.0; s32 D_800F7B94[] = { 0x00390000, 0x00390002, 0x00390003, 0x00390004, 0x00390005, 0x00390008, 0x00390007, 0x00390013, 0x00390014, 0xFFFFFFFF, 0x005A0000, 0x005A0002, 0x005A0003, 0x005A0004, 0x005A0006, 0x005A0007, 0x005A0009, 0x005A000A, 0x005A000B, 0x005A001A, 0xFFFFFFFF, 0x00580000, 0x00580001, 0x00580002, 0x00580004, 0x00580005, 0x00580006, 0x00580007, 0x00580008, 0x00580009, 0x00580012, 0x00580014, 0x0058001B, 0xFFFFFFFF }; -s32 D_800F7C1C[] = { 0x00580001, 0x00580004, 0x00580006, 0x00580008, 0x00580000 }; -s32 D_800F7C30[] = { 0x0058001B, 0x00580001, 0x00580004, 0x00580006, 0x00580008, 0x00580000, 0x0058001B, 0x005A0003, 0x005A0006, 0x005A0009, 0x005A000B, 0x005A0000, 0x005A001A, 0x00390002, 0x00390003, 0x00390004, 0x00390005, 0x00390000, 0x00390014 }; -void* D_800F7C7C[] = { &D_800F7BE8, &D_800F7BE8, &D_800F7BBC, &D_800F7B94 }; -s32 D_800F7C8C[] = { - // TODO: struct for dma table - // TODO: ld addrs - (s32) &func_802B6000_E24920, &E23260_ROM_START, &E23260_ROM_END, 0x01000000, - (s32) &func_802B6000_E24920, 0x00E236E0, 0x00E24040, 0x01000000, - (s32) &func_802B6288_E23968, 0x00E236E0, 0x00E24040, 0x01000000, - (s32) &func_802B60B4_E240F4, 0x00E24040, 0x00E245D0, 0x01000000, - (s32) &func_802B60B4_E240F4, 0x00E24040, 0x00E245D0, 0x01000000, - (s32) &func_802B60B4_E240F4, 0x00E24040, 0x00E245D0, 0x00000000, - (s32) &func_802B60B4_E240F4, 0x00E24040, 0x00E245D0, 0x00000000, - (s32) &func_802B6198_E241D8, 0x00E24040, 0x00E245D0, 0x00000000, - (s32) &func_802B6294_E242D4, 0x00E24040, 0x00E245D0, 0x01000000, - (s32) &func_802B6348_E24388, 0x00E24040, 0x00E245D0, 0x01000000, - (s32) &func_802B6000_E24920, 0x00E24920, 0x00E24ED0, 0x01000000, - (s32) &func_802B61C0_E24AE0, 0x00E24920, 0x00E24ED0, 0x01000000, - (s32) &func_802B6638_E29068, 0x00E28A30, 0x00E291A0, 0x01000000, - (s32) &func_802B6000_E24920, 0x00E26DE0, 0x00E27510, 0x00000000, - (s32) &func_802B6000_E24920, 0x00E26DE0, 0x00E27510, 0x00000000, - (s32) &func_802B6000_E24920, 0x00E26710, 0x00E26DE0, 0x00000000, - (s32) &func_802B6000_E24920, 0x00E26710, 0x00E26DE0, 0x00000000, - (s32) &func_802B6060_E27570, 0x00E27510, 0x00E27C90, 0x00000000, - (s32) &func_802B66A8_E25578, 0x00E24ED0, 0x00E25D60, 0x00000000, - (s32) &func_802B6350_E28D80, 0x00E28A30, 0x00E291A0, 0x01000000, - (s32) &func_802B6508_E28F38, 0x00E28A30, 0x00E291A0, 0x00000000, - (s32) &func_802B6000_E24920, 0x00E27C90, 0x00E27F40, 0x00000000, - (s32) &func_802B6000_E24920, 0x00E287F0, 0x00E28A30, 0x00000000, - (s32) &func_802B6000_E24920, 0x00E27F40, 0x00E287F0, 0x00000000, - (s32) &func_802B6230_E24800, 0x00E245D0, 0x00E24920, 0x01000000, - (s32) &func_802B6120_E2A7D0, 0x00E2A6B0, 0x00E2B530, 0x01000000, - (s32) &func_802B6000_E24920, 0x00E25D60, 0x00E26710, 0x00000000, - (s32) &func_802B63D4_E28E04, 0x00E28A30, 0x00E291A0, 0x00000000, - (s32) &func_802B6478_E28EA8, 0x00E28A30, 0x00E291A0, 0x00000000, - (s32) &func_802B60A4_E29514, 0x00E29470, 0x00E2A340, 0x00000000, - (s32) &func_802B6000_E24920, 0x00E291A0, 0x00E29470, 0x00000000, - (s32) &func_802B6000_E24920, 0x00E2A340, 0x00E2A6B0, 0x00000000, - (s32) &func_802B6350_E28D80, 0x00E28A30, 0x00E291A0, 0x01000000, - (s32) &func_802B6000_E24920, 0x00E28A30, 0x00E291A0, 0x00000000, - (s32) &func_802B6000_E24920, 0x00E245D0, 0x00E24920, 0x01000000, - (s32) &func_802B609C_E28ACC, 0x00E28A30, 0x00E291A0, 0x00000000, - (s32) &func_802B6350_E28D80, 0x00E28A30, 0x00E291A0, 0x00000000, - (s32) &func_802B6350_E28D80, 0x00E236E0, 0x00E24040, 0x00000000, - (s32) &func_802B6350_E28D80, 0x00E28A30, 0x00E291A0, 0x01000000, + +DisguiseAnims world_actions_peachDisguises[] = { + {0x00580001, 0x00580004, 0x00580006, 0x00580008, 0x00580000, 0x0058001B}, + {0x00580001, 0x00580004, 0x00580006, 0x00580008, 0x00580000, 0x0058001B}, + {0x005A0003, 0x005A0006, 0x005A0009, 0x005A000B, 0x005A0000, 0x005A001A}, + {0x00390002, 0x00390003, 0x00390004, 0x00390005, 0x00390000, 0x00390014}, +}; + +void* D_800F7C7C[] = { &D_800F7BE8, &D_800F7BE8, &D_800F7BBC, &D_800F7B94 }; + +Action D_800F7C8C[39] = { + { world_action_idle_update, world_action_idle_ROM_START, world_action_idle_ROM_END, TRUE }, + { func_802B6000_E24920, world_action_walk_ROM_START, world_action_walk_ROM_END, TRUE }, + { func_802B6288_E23968, world_action_walk_ROM_START, world_action_walk_ROM_END, TRUE }, + { func_802B60B4_E240F4, world_action_jump_ROM_START, world_action_jump_ROM_END, TRUE }, + { func_802B60B4_E240F4, world_action_jump_ROM_START, world_action_jump_ROM_END, TRUE }, + { func_802B60B4_E240F4, world_action_jump_ROM_START, world_action_jump_ROM_END, FALSE }, + { func_802B60B4_E240F4, world_action_jump_ROM_START, world_action_jump_ROM_END, FALSE }, + { func_802B6198_E241D8, world_action_jump_ROM_START, world_action_jump_ROM_END, FALSE }, + { func_802B6294_E242D4, world_action_jump_ROM_START, world_action_jump_ROM_END, TRUE }, + { func_802B6348_E24388, world_action_jump_ROM_START, world_action_jump_ROM_END, TRUE }, + { func_802B6000_E24920, world_action_land_ROM_START, world_action_land_ROM_END, TRUE }, + { func_802B61C0_E24AE0, world_action_land_ROM_START, world_action_land_ROM_END, TRUE }, + { func_802B6638_E29068, world_action_encounter_ROM_START, world_action_encounter_ROM_END, TRUE }, + { func_802B6000_E24920, world_action_super_boots_ROM_START, world_action_super_boots_ROM_END, FALSE }, + { func_802B6000_E24920, world_action_super_boots_ROM_START, world_action_super_boots_ROM_END, FALSE }, + { func_802B6000_E24920, world_action_ultra_boots_ROM_START, world_action_ultra_boots_ROM_END, FALSE }, + { func_802B6000_E24920, world_action_ultra_boots_ROM_START, world_action_ultra_boots_ROM_END, FALSE }, + { func_802B6060_E27570, world_action_slide_ROM_START, world_action_slide_ROM_END, FALSE }, + { func_802B66A8_E25578, world_action_hammer_ROM_START, world_action_hammer_ROM_END, FALSE }, + { func_802B6350_E28D80, world_action_encounter_ROM_START, world_action_encounter_ROM_END, TRUE }, + { func_802B6508_E28F38, world_action_encounter_ROM_START, world_action_encounter_ROM_END, FALSE }, + { func_802B6000_E24920, world_action_hit_fire_ROM_START, world_action_hit_fire_ROM_END, FALSE }, + { func_802B6000_E24920, world_action_16_ROM_START, world_action_16_ROM_END, FALSE }, + { func_802B6000_E24920, world_action_hit_lava_ROM_START, world_action_hit_lava_ROM_END, FALSE }, + { func_802B6230_E24800, world_action_18_ROM_START, world_action_18_ROM_END, TRUE }, + { func_802B6120_E2A7D0, world_action_sneaky_parasol_ROM_START, world_action_sneaky_parasol_ROM_END, TRUE }, + { func_802B6000_E24920, world_action_spin_ROM_START, world_action_spin_ROM_END, FALSE }, + { func_802B63D4_E28E04, world_action_encounter_ROM_START, world_action_encounter_ROM_END, FALSE }, + { func_802B6478_E28EA8, world_action_encounter_ROM_START, world_action_encounter_ROM_END, FALSE }, + { func_802B60A4_E29514, world_action_use_spinning_flower_ROM_START, world_action_use_spinning_flower_ROM_END, FALSE }, + { func_802B6000_E24920, world_action_use_munchlesia_ROM_START, world_action_use_munchlesia_ROM_END, FALSE }, + { func_802B6000_E24920, world_action_use_tweester_ROM_START, world_action_use_tweester_ROM_END, FALSE }, + { func_802B6350_E28D80, world_action_encounter_ROM_START, world_action_encounter_ROM_END, TRUE }, + { func_802B6000_E24920, world_action_encounter_ROM_START, world_action_encounter_ROM_END, FALSE }, + { func_802B6000_E24920, world_action_18_ROM_START, world_action_18_ROM_END, TRUE }, + { func_802B609C_E28ACC, world_action_encounter_ROM_START, world_action_encounter_ROM_END, FALSE }, + { func_802B6350_E28D80, world_action_encounter_ROM_START, world_action_encounter_ROM_END, FALSE }, + { func_802B6350_E28D80, world_action_walk_ROM_START, world_action_walk_ROM_END, FALSE }, + { func_802B6350_E28D80, world_action_encounter_ROM_START, world_action_encounter_ROM_END, TRUE }, }; diff --git a/src/world/actions.h b/src/world/actions.h new file mode 100644 index 0000000000..6324dc04fc --- /dev/null +++ b/src/world/actions.h @@ -0,0 +1,27 @@ +#ifndef _WORLD_ACTIONS_H_ +#define _WORLD_ACTIONS_H_ + +#include "common.h" + +typedef struct Action { + /* 0x00 */ void (*update)(void); + /* 0x04 */ void* dmaStart; + /* 0x08 */ void* dmaEnd; + /* 0x0C */ s8 flag; +} Action; // size = 0x10 + +typedef struct DisguiseAnims { + /* 0x00 */ NpcAnimID idle; + /* 0x04 */ NpcAnimID unk4; + /* 0x08 */ NpcAnimID unk8; + /* 0x0C */ NpcAnimID unkC; + /* 0x10 */ NpcAnimID unk10; + /* 0x10 */ NpcAnimID unk14; +} DisguiseAnims; // size = 0x18 + +extern f32 D_800F7B90; +extern Action D_800F7C8C[39]; + +extern DisguiseAnims world_actions_peachDisguises[]; + +#endif diff --git a/src/world/area_arn/arn_02/events.c b/src/world/area_arn/arn_02/events.c index 307762c4d7..24c3aeaa24 100644 --- a/src/world/area_arn/arn_02/events.c +++ b/src/world/area_arn/arn_02/events.c @@ -218,8 +218,8 @@ s32 N(func_80240000_BDD1B0)(ScriptInstance* script, NpcAISettings* aiSettings, E } playerStatus = &gPlayerStatusPtr; - if (fabsf(get_clamped_angle_diff(phi_f20, - atan2(npc->pos.x, npc->pos.z, + if (fabsf(get_clamped_angle_diff(phi_f20, + atan2(npc->pos.x, npc->pos.z, (*playerStatus)->position.x, (*playerStatus)->position.z))) > 75.0) { ret = FALSE; } @@ -324,9 +324,9 @@ void N(func_80240834_BDD9E4)(ScriptInstance* script, NpcAISettings* aiSettings, npc_move_heading(npc, npc->moveSpeed, npc->yaw); phi_s1 = 0; - if (is_point_within_region(enemy->territory->wander.detectShape, - enemy->territory->wander.detect.x, enemy->territory->wander.detect.z, - npc->pos.x, npc->pos.z, enemy->territory->wander.detectSizeX, + if (is_point_within_region(enemy->territory->wander.detectShape, + enemy->territory->wander.detect.x, enemy->territory->wander.detect.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.detectSizeX, enemy->territory->wander.detectSizeZ)) { phi_s1 = 1; } @@ -335,7 +335,7 @@ void N(func_80240834_BDD9E4)(ScriptInstance* script, NpcAISettings* aiSettings, posY = npc->pos.y; posZ = npc->pos.z; - if (func_800DDC44(npc->unk_80, &posX, &posY, &posZ, + if (func_800DDC44(npc->unk_80, &posX, &posY, &posZ, 1.0f, npc->yaw, npc->collisionHeight, npc->collisionRadius)) { phi_s1 = 1; } @@ -377,7 +377,7 @@ void N(func_80240A30_BDDBE0)(ScriptInstance* script, NpcAISettings* aiSettings, } else if (dist2D(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z) <= npc->moveSpeed) { npc->duration = 10; script->functionTemp[0].s = 50; - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); npc_move_heading(npc, npc->moveSpeed, npc->yaw); } @@ -419,7 +419,7 @@ s32 N(func_80240C90_BDDE40)(ScriptInstance *script, s32 isInitialCall) { } } - if (enemy->unk_B0 & 4) { + if (enemy->unk_B0 & 4) { if (enemy->unk_B4 != 0) { return ApiStatus_BLOCK; } diff --git a/src/world/area_arn/arn_03/events.c b/src/world/area_arn/arn_03/events.c index bfbd9df1b9..c116d60c73 100644 --- a/src/world/area_arn/arn_03/events.c +++ b/src/world/area_arn/arn_03/events.c @@ -684,22 +684,22 @@ Script N(idle_80243D28) = SCRIPT({ Script N(init_80243E90) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_80243D28)); - SetNpcFlagBits(NPC_SELF, NPC_FLAG_10, FALSE); + SetNpcFlagBits(NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE); }); Script N(init_80243ECC) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_80243D28)); - SetNpcFlagBits(NPC_SELF, NPC_FLAG_10, FALSE); + SetNpcFlagBits(NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE); }); Script N(init_80243F08) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_80243D28)); - SetNpcFlagBits(NPC_SELF, NPC_FLAG_10, FALSE); + SetNpcFlagBits(NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE); }); Script N(init_80243F44) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_80243D28)); - SetNpcFlagBits(NPC_SELF, NPC_FLAG_10, FALSE); + SetNpcFlagBits(NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE); }); StaticNpc N(npcGroup_80243F80)[] = { @@ -707,7 +707,7 @@ StaticNpc N(npcGroup_80243F80)[] = { .id = 5, .settings = &N(npcSettings_80241C3C), .pos = { 36.0f, 277.0f, 140.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, .init = &N(init_80243E90), .yaw = 90, .dropFlags = 0x80, @@ -736,7 +736,7 @@ StaticNpc N(npcGroup_80243F80)[] = { .id = 6, .settings = &N(npcSettings_80241C3C), .pos = { 180.0f, 285.0f, 182.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, .init = &N(init_80243ECC), .yaw = 90, .dropFlags = 0x80, @@ -765,7 +765,7 @@ StaticNpc N(npcGroup_80243F80)[] = { .id = 7, .settings = &N(npcSettings_80241C3C), .pos = { 349.0f, 286.0f, 152.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, .init = &N(init_80243F08), .yaw = 90, .dropFlags = 0x80, @@ -794,7 +794,7 @@ StaticNpc N(npcGroup_80243F80)[] = { .id = 8, .settings = &N(npcSettings_80241C3C), .pos = { 490.0f, 324.0f, 128.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, .init = &N(init_80243F44), .yaw = 90, .dropFlags = 0x80, @@ -907,13 +907,13 @@ void N(func_80240158_BDEEE8)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[1].s--; } - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { if (npc->moveSpeed < 4.0) { func_8003D660(npc, 0); } else { func_8003D660(npc, 1); } - + x = (*(enemy->territory->patrol.points + script->functionTemp[2].s)).x; z = (*(enemy->territory->patrol.points + script->functionTemp[2].s)).z; npc->yaw = atan2(npc->pos.x, npc->pos.z, x, z); @@ -921,7 +921,7 @@ void N(func_80240158_BDEEE8)(ScriptInstance* script, NpcAISettings* aiSettings, if (dist2D(npc->pos.x, npc->pos.z, x, z) <= npc->moveSpeed) { script->functionTemp[0].s = 2; script->functionTemp[1].s = (rand_int(1000) % 3) + 2; - if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || + if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || (aiSettings->waitTime <= 0) || (script->functionTemp[1].s == 0)) { script->functionTemp[0].s = 4; } @@ -948,7 +948,7 @@ void N(func_802404C0_BDF250)(ScriptInstance* script, NpcAISettings* aiSettings, } else { script->functionTemp[0].s = 10; } - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration == 0) { script->functionTemp[1].s--; @@ -1258,7 +1258,7 @@ ApiStatus N(func_802415F4_BE0384)(ScriptInstance* script, s32 isInitialCall) { ApiStatus N(func_80241648_BE03D8)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - + N(D_80241CD0_BE0A60) = get_variable(script, *args); N(D_80241CCC_BE0A5C) = 1; return ApiStatus_DONE2; @@ -1289,4 +1289,4 @@ ApiStatus func_80241680_BE0410(ScriptInstance* script, s32 isInitialCall) { #else INCLUDE_ASM(s32, "world/area_arn/arn_03/BDED90", arn_03_func_80241680_BE0410, ScriptInstance* script, s32 isInitialCall); #endif - + diff --git a/src/world/area_arn/arn_04/events.c b/src/world/area_arn/arn_04/events.c index da9c1d93eb..407cd4fe5c 100644 --- a/src/world/area_arn/arn_04/events.c +++ b/src/world/area_arn/arn_04/events.c @@ -284,7 +284,7 @@ void N(func_80240000_BE37B0)(ScriptInstance* script, NpcAISettings* aiSettings, f32 posZ; s32 i; s32 j; - + script->functionTemp[1].s = 0; max = 32767.0f; posX = npc->pos.x; @@ -332,13 +332,13 @@ void N(func_80240158_BE3908)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[1].s--; } - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { if (npc->moveSpeed < 4.0) { func_8003D660(npc, 0); } else { func_8003D660(npc, 1); } - + x = (*(enemy->territory->patrol.points + script->functionTemp[2].s)).x; z = (*(enemy->territory->patrol.points + script->functionTemp[2].s)).z; npc->yaw = atan2(npc->pos.x, npc->pos.z, x, z); @@ -346,7 +346,7 @@ void N(func_80240158_BE3908)(ScriptInstance* script, NpcAISettings* aiSettings, if (dist2D(npc->pos.x, npc->pos.z, x, z) <= npc->moveSpeed) { script->functionTemp[0].s = 2; script->functionTemp[1].s = (rand_int(1000) % 3) + 2; - if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || + if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || (aiSettings->waitTime <= 0) || (script->functionTemp[1].s == 0)) { script->functionTemp[0].s = 4; } @@ -373,7 +373,7 @@ void N(func_802404C0_BE3C70)(ScriptInstance* script, NpcAISettings* aiSettings, } else { script->functionTemp[0].s = 10; } - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration == 0) { script->functionTemp[1].s--; @@ -542,9 +542,9 @@ void N(func_80240E90_BE4640)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { @@ -671,9 +671,9 @@ void N(func_80241040_BE47F0)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->varTable[9]--; } - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { posW = dist2D(enemy->territory->wander.point.x, enemy->territory->wander.point.z, npc->pos.x, npc->pos.z); if (npc->moveSpeed < posW) { @@ -683,7 +683,7 @@ void N(func_80241040_BE47F0)(ScriptInstance* script, NpcAISettings* aiSettings, } if (enemy->territory->wander.wanderSizeX | enemy->territory->wander.wanderSizeZ | phi_s4) { - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc_move_heading(npc, npc->moveSpeed, npc->yaw); } else { return; @@ -759,7 +759,7 @@ void N(func_80241728_BE4ED8)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->varTable[9]--; } - if ((npc->unk_8C == 0) && (npc->duration <= 0)) { + if ((npc->turnAroundYawAdjustment == 0) && (npc->duration <= 0)) { script->functionTemp[1].s--; if (script->functionTemp[1].s > 0) { if (!(enemy->npcSettings->unk_2A & 0x10)) { @@ -812,8 +812,8 @@ void N(func_80241CE8_BE5498)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->unk_07 = 0; if (!(npc->flags & 8)) { posX = npc->pos.x; - posY = npc->pos.y; - posZ = npc->pos.z; + posY = npc->pos.y; + posZ = npc->pos.z; posW = 1000.0f; phi_v0 = func_800DCB7C(npc->unk_80, &posX, &posY, &posZ, &posW); } else { @@ -856,8 +856,8 @@ void N(func_80241CE8_BE5498)(ScriptInstance* script, NpcAISettings* aiSettings, } posX = npc->pos.x; - posY = npc->pos.y + npc->collisionHeight; - posZ = npc->pos.z; + posY = npc->pos.y + npc->collisionHeight; + posZ = npc->pos.z; posW = (fabsf(npc->jumpVelocity) + npc->collisionHeight) + 10.0; if (func_800DCB7C(npc->unk_80, &posX, &posY, &posZ, &posW)) { if (posW <= (npc->collisionHeight + fabsf(npc->jumpVelocity))) { @@ -982,8 +982,8 @@ s32 N(func_80242388_BE5B38)(ScriptInstance* script, NpcAISettings *aiSettings, E } playerStatus = &gPlayerStatusPtr; - if (fabsf(get_clamped_angle_diff(phi_f20, - atan2(npc->pos.x, npc->pos.z, + if (fabsf(get_clamped_angle_diff(phi_f20, + atan2(npc->pos.x, npc->pos.z, (*playerStatus)->position.x, (*playerStatus)->position.z))) > 75.0) { ret = FALSE; } @@ -1088,9 +1088,9 @@ void N(func_80242BBC_BE636C)(ScriptInstance* script, NpcAISettings* aiSettings, npc_move_heading(npc, npc->moveSpeed, npc->yaw); phi_s1 = 0; - if (is_point_within_region(enemy->territory->wander.detectShape, - enemy->territory->wander.detect.x, enemy->territory->wander.detect.z, - npc->pos.x, npc->pos.z, enemy->territory->wander.detectSizeX, + if (is_point_within_region(enemy->territory->wander.detectShape, + enemy->territory->wander.detect.x, enemy->territory->wander.detect.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.detectSizeX, enemy->territory->wander.detectSizeZ)) { phi_s1 = 1; } @@ -1099,7 +1099,7 @@ void N(func_80242BBC_BE636C)(ScriptInstance* script, NpcAISettings* aiSettings, posY = npc->pos.y; posZ = npc->pos.z; - if (func_800DDC44(npc->unk_80, &posX, &posY, &posZ, + if (func_800DDC44(npc->unk_80, &posX, &posY, &posZ, 1.0f, npc->yaw, npc->collisionHeight, npc->collisionRadius)) { phi_s1 = 1; } @@ -1141,7 +1141,7 @@ void N(func_80242DB8_BE6568)(ScriptInstance* script, NpcAISettings* aiSettings, } else if (dist2D(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z) <= npc->moveSpeed) { npc->duration = 10; script->functionTemp[0].s = 50; - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); npc_move_heading(npc, npc->moveSpeed, npc->yaw); } @@ -1180,14 +1180,14 @@ ApiStatus N(func_80243018_BE67C8)(ScriptInstance* script, s32 isInitialCall) { if (!enemy->territory->wander.isFlying) { npc->flags |= 0x200; npc->flags &= ~0x8; - + } else { npc->flags &= ~0x200; npc->flags |= 0x8; } } - if (enemy->unk_B0 & 4) { + if (enemy->unk_B0 & 4) { if (enemy->unk_B4 != 0) { return ApiStatus_BLOCK; } diff --git a/src/world/area_arn/arn_05/events.c b/src/world/area_arn/arn_05/events.c index cdccd37cbe..ed4c8f685f 100644 --- a/src/world/area_arn/arn_05/events.c +++ b/src/world/area_arn/arn_05/events.c @@ -317,7 +317,7 @@ StaticNpc N(npcGroup_8024223C)[] = { .id = NPC_BOO0, .settings = &N(npcSettings_8024172C), .pos = { 55.0f, 195.0f, 160.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_80241FB8), .yaw = 270, .dropFlags = 0x80, @@ -348,7 +348,7 @@ StaticNpc N(npcGroup_8024223C)[] = { .id = NPC_BOO1, .settings = &N(npcSettings_80241758), .pos = { 160.0f, 191.0f, 250.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_80242008), .yaw = 270, .dropFlags = 0x80, @@ -378,7 +378,7 @@ StaticNpc N(npcGroup_8024223C)[] = { .id = NPC_BOO2, .settings = &N(npcSettings_80241758), .pos = { 390.0f, 190.0f, 255.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_8024202C), .yaw = 270, .dropFlags = 0x80, @@ -408,7 +408,7 @@ StaticNpc N(npcGroup_8024223C)[] = { .id = NPC_BOO3, .settings = &N(npcSettings_80241758), .pos = { 503.0f, 206.0f, 210.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_8024212C), .yaw = 270, .dropFlags = 0x80, @@ -438,7 +438,7 @@ StaticNpc N(npcGroup_8024223C)[] = { .id = NPC_BOO4, .settings = &N(npcSettings_8024172C), .pos = { 350.0f, 185.0f, 197.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_802421EC), .yaw = 270, .dropFlags = 0x80, @@ -580,7 +580,7 @@ Script N(80242C50) = SCRIPT({ SetPanTarget(0, 426, 190, 194); PanToTarget(0, 0, 1); WaitForCam(0, 1.0); - SetNpcFlagBits(NPC_WORLD_TUBBA, NPC_FLAG_200, TRUE); + SetNpcFlagBits(NPC_WORLD_TUBBA, NPC_FLAG_GRAVITY, TRUE); SetNpcSpeed(NPC_WORLD_TUBBA, 2.5); SetNpcPos(NPC_WORLD_TUBBA, 675, 200, 180); NpcFaceNpc(NPC_BOO0, NPC_WORLD_TUBBA, 1); @@ -704,7 +704,7 @@ Script N(80242C50) = SCRIPT({ NpcMoveTo(NPC_WORLD_TUBBA, 550, 196, 0); SetNpcAnimation(NPC_WORLD_TUBBA, NPC_ANIM(world_tubba, Palette_00, Anim_6)); SetNpcPos(NPC_WORLD_TUBBA, 0, -1000, 0); - SetNpcFlagBits(NPC_WORLD_TUBBA, NPC_FLAG_200, FALSE); + SetNpcFlagBits(NPC_WORLD_TUBBA, NPC_FLAG_GRAVITY, FALSE); NpcFacePlayer(NPC_BOO0, 3); SetNpcPos(NPC_BOO0, 55, 195, 160); SetNpcPos(NPC_BOO1, 160, 191, 250); @@ -783,7 +783,7 @@ StaticNpc N(npcGroup_802443AC) = { .id = NPC_WORLD_TUBBA, .settings = &N(npcSettings_802416B0), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_80244358), .yaw = 270, .dropFlags = 0x80, @@ -857,7 +857,7 @@ StaticNpc N(npcGroup_802447E4)[] = { .id = NPC_BOO5, .settings = &N(npcSettings_80241758), .pos = { 36.0f, 277.0f, 140.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, .init = &N(init_80244704), .yaw = 90, .dropFlags = 0x80, @@ -886,7 +886,7 @@ StaticNpc N(npcGroup_802447E4)[] = { .id = NPC_BOO6, .settings = &N(npcSettings_80241758), .pos = { 200.0f, 275.0f, 182.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, .init = &N(init_8024473C), .yaw = 90, .dropFlags = 0x80, @@ -915,7 +915,7 @@ StaticNpc N(npcGroup_802447E4)[] = { .id = NPC_BOO7, .settings = &N(npcSettings_80241758), .pos = { 379.0f, 300.0f, 192.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, .init = &N(init_80244774), .yaw = 90, .dropFlags = 0x80, @@ -944,7 +944,7 @@ StaticNpc N(npcGroup_802447E4)[] = { .id = NPC_BOO8, .settings = &N(npcSettings_80241758), .pos = { 525.0f, 286.0f, 178.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000, .init = &N(init_802447AC), .yaw = 90, .dropFlags = 0x80, @@ -1049,13 +1049,13 @@ void N(func_80240158_BE7D38)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[1].s--; } - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { if (npc->moveSpeed < 4.0) { func_8003D660(npc, 0); } else { func_8003D660(npc, 1); } - + x = script->functionTemp[2].s[enemy->territory->patrol.points].x; z = script->functionTemp[2].s[enemy->territory->patrol.points].z; npc->yaw = atan2(npc->pos.x, npc->pos.z, x, z); @@ -1063,7 +1063,7 @@ void N(func_80240158_BE7D38)(ScriptInstance* script, NpcAISettings* aiSettings, if (dist2D(npc->pos.x, npc->pos.z, x, z) <= npc->moveSpeed) { script->functionTemp[0].s = 2; script->functionTemp[1].s = (rand_int(1000) % 3) + 2; - if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || + if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || (aiSettings->waitTime <= 0) || (script->functionTemp[1].s == 0)) { script->functionTemp[0].s = 4; } @@ -1090,7 +1090,7 @@ void N(func_802404C0_BE80A0)(ScriptInstance* script, NpcAISettings* aiSettings, } else { script->functionTemp[0].s = 10; } - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration == 0) { script->functionTemp[1].s--; diff --git a/src/world/area_arn/arn_07/events.c b/src/world/area_arn/arn_07/events.c index 44211a5c27..f4abd5a3c3 100644 --- a/src/world/area_arn/arn_07/events.c +++ b/src/world/area_arn/arn_07/events.c @@ -691,7 +691,7 @@ StaticNpc N(npcGroup_80245D0C)[] = { .id = NPC_WORLD_TUBBA, .settings = &N(npcSettings_80243CF0), .pos = { 309.0f, 0.0f, 11.0f }, - .flags = NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_40000 | NPC_FLAG_200000, + .flags = NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_40000 | NPC_FLAG_200000, .init = &N(init_80245090), .yaw = 270, .dropFlags = 0x80, @@ -721,7 +721,7 @@ StaticNpc N(npcGroup_80245D0C)[] = { .id = NPC_TUBBAS_HEART, .settings = &N(npcSettings_80243CC4), .pos = { -10.0f, 50.0f, -170.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_40000 | NPC_FLAG_200000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_40000 | NPC_FLAG_200000, .init = &N(init_80245058), .yaw = 90, .dropFlags = 0x80, @@ -753,7 +753,7 @@ StaticNpc N(npcGroup_802460EC)[] = { .id = NPC_BOO0, .settings = &N(npcSettings_80243D1C), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_200000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_200000, .init = &N(init_80245104), .yaw = 270, .dropFlags = 0x80, @@ -783,7 +783,7 @@ StaticNpc N(npcGroup_802460EC)[] = { .id = NPC_BOO1, .settings = &N(npcSettings_80243D1C), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_200000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_200000, .init = &N(init_80245104), .yaw = 270, .dropFlags = 0x80, @@ -813,7 +813,7 @@ StaticNpc N(npcGroup_802460EC)[] = { .id = NPC_BOO2, .settings = &N(npcSettings_80243D1C), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_200000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_200000, .init = &N(init_80245104), .yaw = 270, .dropFlags = 0x80, @@ -843,7 +843,7 @@ StaticNpc N(npcGroup_802460EC)[] = { .id = NPC_BOO3, .settings = &N(npcSettings_80243D1C), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_200000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_200000, .init = &N(init_80245104), .yaw = 270, .dropFlags = 0x80, @@ -873,7 +873,7 @@ StaticNpc N(npcGroup_802460EC)[] = { .id = NPC_BOO4, .settings = &N(npcSettings_80243D1C), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_200000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_200000, .init = &N(init_80245104), .yaw = 270, .dropFlags = 0x80, @@ -903,7 +903,7 @@ StaticNpc N(npcGroup_802460EC)[] = { .id = NPC_BOO5, .settings = &N(npcSettings_80243D1C), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_200000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_200000, .init = &N(init_80245104), .yaw = 270, .dropFlags = 0x80, @@ -935,7 +935,7 @@ StaticNpc N(npcGroup_80246C8C) = { .id = NPC_WORLD_BOW, .settings = &N(npcSettings_80243D1C), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_200000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_200000, .init = &N(init_80245164), .yaw = 0, .dropFlags = 0x80, @@ -965,7 +965,7 @@ StaticNpc N(npcGroup_80246E7C) = { .id = NPC_BOOTLER, .settings = &N(npcSettings_80243D1C), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_200000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_200000, .init = &N(init_8024519C), .yaw = 0, .dropFlags = 0x80, @@ -1004,7 +1004,7 @@ StaticNpc N(npcGroup_802470BC) = { .id = NPC_PARAGOOMBA0, .settings = &N(npcSettings_80243C78), .pos = { -216.0f, 60.0f, -10.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_8024706C), .yaw = 90, .dropFlags = 0x80, @@ -1041,7 +1041,7 @@ StaticNpc N(npcGroup_802472AC) = { .id = NPC_PARAGOOMBA1, .settings = &N(npcSettings_80243C78), .pos = { 0.0f, 60.0f, 150.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_8024706C), .yaw = 270, .dropFlags = 0x80, @@ -1078,7 +1078,7 @@ StaticNpc N(npcGroup_8024749C) = { .id = NPC_PARAGOOMBA2, .settings = &N(npcSettings_80243C78), .pos = { 260.0f, 60.0f, 30.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_8024706C), .yaw = 90, .dropFlags = 0x80, @@ -1115,7 +1115,7 @@ StaticNpc N(npcGroup_8024768C) = { .id = NPC_WORLD_SKOLAR, .settings = &N(npcSettings_80243D48), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_80245C9C), .yaw = 0, .dropFlags = 0x80, @@ -1166,9 +1166,9 @@ void N(func_80240950_BED740)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { @@ -1239,8 +1239,8 @@ void N(func_80240B00_BED8F0)(ScriptInstance* script, NpcAISettings* aiSettings, posZ = npc->pos.z; posW = 1000.0f; func_800DCB7C(npc->unk_80, &posX, &posY, &posZ, &posW); - phi_f4 = posY; - phi_f4 += temp_f26; + phi_f4 = posY; + phi_f4 += temp_f26; d = temp_f20 + ((phi_f4 - temp_f20) * 0.09); test = d; npc->pos.y = test; @@ -1275,7 +1275,7 @@ void N(func_80240B00_BED8F0)(ScriptInstance* script, NpcAISettings* aiSettings, if (aiSettings->unk_14 >= 0) { if (script->functionTemp[1].s <= 0) { script->functionTemp[1].s = aiSettings->unk_14; - if ((gPlayerStatusPtr->position.y < ((npc->pos.y + npc->collisionHeight) + 10.0)) && + if ((gPlayerStatusPtr->position.y < ((npc->pos.y + npc->collisionHeight) + 10.0)) && func_800490B4(territory, enemy, aiSettings->alertRadius, aiSettings->unk_10.f, 0)) { fx_emote(0, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 12, &var); npc->moveToPos.y = npc->pos.y; @@ -1294,9 +1294,9 @@ void N(func_80240B00_BED8F0)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->varTable[9]--; } - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { posW = dist2D(enemy->territory->wander.point.x, enemy->territory->wander.point.z, npc->pos.x, npc->pos.z); if (npc->moveSpeed < posW) { @@ -1306,7 +1306,7 @@ void N(func_80240B00_BED8F0)(ScriptInstance* script, NpcAISettings* aiSettings, } if (enemy->territory->wander.wanderSizeX | enemy->territory->wander.wanderSizeZ | phi_s4) { - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc_move_heading(npc, npc->moveSpeed, npc->yaw); } else { return; @@ -1382,7 +1382,7 @@ void N(func_802411E8_BEDFD8)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->varTable[9]--; } - if ((npc->unk_8C == 0) && (npc->duration <= 0)) { + if ((npc->turnAroundYawAdjustment == 0) && (npc->duration <= 0)) { script->functionTemp[1].s--; if (script->functionTemp[1].s > 0) { if (!(enemy->npcSettings->unk_2A & 0x10)) { @@ -1435,8 +1435,8 @@ void N(func_802417A8_BEE598)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->unk_07 = 0; if (!(npc->flags & 8)) { posX = npc->pos.x; - posY = npc->pos.y; - posZ = npc->pos.z; + posY = npc->pos.y; + posZ = npc->pos.z; posW = 1000.0f; phi_v0 = func_800DCB7C(npc->unk_80, &posX, &posY, &posZ, &posW); } else { @@ -1479,8 +1479,8 @@ void N(func_802417A8_BEE598)(ScriptInstance* script, NpcAISettings* aiSettings, } posX = npc->pos.x; - posY = npc->pos.y + npc->collisionHeight; - posZ = npc->pos.z; + posY = npc->pos.y + npc->collisionHeight; + posZ = npc->pos.z; posW = (fabsf(npc->jumpVelocity) + npc->collisionHeight) + 10.0; if (func_800DCB7C(npc->unk_80, &posX, &posY, &posZ, &posW)) { if (posW <= (npc->collisionHeight + fabsf(npc->jumpVelocity))) { diff --git a/src/world/area_arn/arn_08/BF47A0.c b/src/world/area_arn/arn_08/BF47A0.c index 495fb1243c..b665606a47 100644 --- a/src/world/area_arn/arn_08/BF47A0.c +++ b/src/world/area_arn/arn_08/BF47A0.c @@ -3,7 +3,7 @@ ApiStatus N(func_80240000_BF47A0)(ScriptInstance *script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; f32 temp_f20; - f32 var; + s32 colliderID; if (isInitialCall) { script->functionTemp[0].s = 0; @@ -11,7 +11,7 @@ ApiStatus N(func_80240000_BF47A0)(ScriptInstance *script, s32 isInitialCall) { } temp_f20 = func_800E34D8(); - playerStatus->position.y = func_800E3514(temp_f20, &var); + playerStatus->position.y = func_800E3514(temp_f20, &colliderID); script->functionTemp[0].s += fabsf(temp_f20); do {} while(0); return (script->functionTemp[0].s > 50) * ApiStatus_DONE2; diff --git a/src/world/area_arn/arn_08/events.c b/src/world/area_arn/arn_08/events.c index 57916440ea..36a393f71e 100644 --- a/src/world/area_arn/arn_08/events.c +++ b/src/world/area_arn/arn_08/events.c @@ -344,7 +344,7 @@ StaticNpc N(npcGroup_80241448) = { .id = NPC_TUBBAS_HEART, .settings = &N(npcSettings_80241220), .pos = { -23.0f, 75.0f, 31.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_80241288), .yaw = 270, .dropFlags = 0x80, @@ -374,7 +374,7 @@ StaticNpc N(npcGroup_80241638) = { .id = NPC_YAKKEY, .settings = &N(npcSettings_8024124C), .pos = { 38.0f, 0.0f, 97.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_802413E8), .yaw = 270, .dropFlags = 0x80, @@ -436,9 +436,9 @@ ApiStatus N(func_802400F4_BF4894)(ScriptInstance *script, s32 isInitialCall) { if (!(playerStatus->position.y > -10.0f)) { f32 temp_f20 = func_800E34D8(); - s32 var; + s32 colliderID; - playerStatus->position.y = func_800E3514(temp_f20, &var); + playerStatus->position.y = func_800E3514(temp_f20, &colliderID); script->functionTemp[0].s += fabsf(temp_f20); return (script->functionTemp[0].s > 50) * ApiStatus_DONE2; diff --git a/src/world/area_arn/arn_09/events.c b/src/world/area_arn/arn_09/events.c index ab651156fc..78b6c67255 100644 --- a/src/world/area_arn/arn_09/events.c +++ b/src/world/area_arn/arn_09/events.c @@ -145,7 +145,7 @@ StaticNpc N(npcGroup_80240784) = { .id = 0, .settings = &N(npcSettings_802405D0), .pos = { 0.0f, 25.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_80240730), .yaw = 270, .dropFlags = 0x80, @@ -182,7 +182,7 @@ ApiStatus N(func_80240000_BF6060)(ScriptInstance *script, s32 isInitialCall) { if (entity == NULL) { return ApiStatus_BLOCK; } - + play_model_animation(entity->virtualModelIndex, &D_000001E4); return ApiStatus_DONE2; } diff --git a/src/world/area_arn/arn_10/events.c b/src/world/area_arn/arn_10/events.c index 64206c2a7d..ed12518e1e 100644 --- a/src/world/area_arn/arn_10/events.c +++ b/src/world/area_arn/arn_10/events.c @@ -163,7 +163,7 @@ StaticNpc N(npcGroup_802407D8) = { .id = 0, .settings = &N(npcSettings_80240450), .pos = { 80.0f, 50.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_80240720), .yaw = 270, .dropFlags = 0x80, @@ -192,7 +192,7 @@ StaticNpc N(npcGroup_802407D8) = { StaticNpc N(npcGroup_802409C8) = { .id = 1, .settings = &N(npcSettings_802404CC), - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_8024076C), .yaw = 270, .dropFlags = 0x80, diff --git a/src/world/area_arn/arn_11/events.c b/src/world/area_arn/arn_11/events.c index c898f0f2d8..2f0c37e20c 100644 --- a/src/world/area_arn/arn_11/events.c +++ b/src/world/area_arn/arn_11/events.c @@ -255,7 +255,7 @@ StaticNpc N(npcGroup_80240EEC) = { .id = NPC_TUBBAS_HEART, .settings = &N(npcSettings_802406A0), .pos = { 119.0f, 60.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_40000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_40000, .init = &N(init_80240E70), .yaw = 270, .dropFlags = 0x80, diff --git a/src/world/area_arn/arn_12/events.c b/src/world/area_arn/arn_12/events.c index 6a5e7f49dd..7c6a19d8ea 100644 --- a/src/world/area_arn/arn_12/events.c +++ b/src/world/area_arn/arn_12/events.c @@ -163,7 +163,7 @@ StaticNpc N(npcGroup_802407DC) = { .id = 0, .settings = &N(npcSettings_80240440), .pos = { 80.0f, 50.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_80240710), .yaw = 270, .dropFlags = 0x80, @@ -192,7 +192,7 @@ StaticNpc N(npcGroup_802407DC) = { StaticNpc N(npcGroup_802409CC) = { .id = 1, .settings = &N(npcSettings_802404BC), - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_8024075C), .yaw = 270, .dropFlags = 0x80, diff --git a/src/world/area_arn/arn_13/events.c b/src/world/area_arn/arn_13/events.c index 25eec5b9cd..4fecb1c37a 100644 --- a/src/world/area_arn/arn_13/events.c +++ b/src/world/area_arn/arn_13/events.c @@ -164,7 +164,7 @@ StaticNpc N(npcGroup_802407EC) = { .id = 0, .settings = &N(npcSettings_80240450), .pos = { 80.0f, 50.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_80240720), .yaw = 270, .dropFlags = 0x80, @@ -193,7 +193,7 @@ StaticNpc N(npcGroup_802407EC) = { StaticNpc N(npcGroup_802409DC) = { .id = 1, .settings = &N(npcSettings_802404CC), - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_8024076C), .yaw = 270, .dropFlags = 0x80, diff --git a/src/world/area_dgb/dgb_00/BFA100.c b/src/world/area_dgb/dgb_00/BFA100.c index d8b86c7f2f..6e79e67e16 100644 --- a/src/world/area_dgb/dgb_00/BFA100.c +++ b/src/world/area_dgb/dgb_00/BFA100.c @@ -415,7 +415,7 @@ StaticNpc N(npcGroup_80241FE4) = { .id = NPC_BOO0, .settings = &N(npcSettings_80240640), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_400000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_400000, .init = &N(init_80241F70), .yaw = 90, .dropFlags = 0x80, @@ -446,7 +446,7 @@ StaticNpc N(npcGroup_802421D4) = { .id = NPC_BOO1, .settings = &N(npcSettings_80240640), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS, .init = &N(init_80241F94), .yaw = 90, .dropFlags = 0x80, @@ -476,7 +476,7 @@ StaticNpc N(npcGroup_802423C4) = { .id = NPC_BOO2, .settings = &N(npcSettings_80240640), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS, .init = &N(init_80241FA4), .yaw = 90, .dropFlags = 0x80, @@ -506,7 +506,7 @@ StaticNpc N(npcGroup_802425B4) = { .id = NPC_BOO3, .settings = &N(npcSettings_80240640), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS, .init = &N(init_80241FB4), .yaw = 90, .dropFlags = 0x80, @@ -536,7 +536,7 @@ StaticNpc N(npcGroup_802427A4) = { .id = NPC_BOO4, .settings = &N(npcSettings_80240640), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS, .init = &N(init_80241FC4), .yaw = 90, .dropFlags = 0x80, @@ -566,7 +566,7 @@ StaticNpc N(npcGroup_80242994) = { .id = NPC_BOO5, .settings = &N(npcSettings_80240640), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS, .init = &N(init_80241FD4), .yaw = 90, .dropFlags = 0x80, @@ -674,13 +674,13 @@ Script N(80242B84) = SCRIPT({ GetCurrentPartnerID(SI_VAR(0)); match SI_VAR(0) { == 1 { - SetNpcFlagBits(NPC_PARTNER, NPC_FLAG_200, TRUE); + SetNpcFlagBits(NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE); } == 2 { - SetNpcFlagBits(NPC_PARTNER, NPC_FLAG_200, TRUE); + SetNpcFlagBits(NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE); } == 3 { - SetNpcFlagBits(NPC_PARTNER, NPC_FLAG_200, TRUE); + SetNpcFlagBits(NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE); } } DisablePartnerAI(0); @@ -748,7 +748,7 @@ StaticNpc N(npcGroup_802434FC) = { .id = NPC_SENTINEL, .settings = &N(npcSettings_8024066C), .pos = { 0.0f, 0.0f, -1000.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_200 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_400000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_400000, .init = &N(init_802434EC), .yaw = 90, .dropFlags = 0x80, diff --git a/src/world/area_dgb/dgb_01/BFD9A0.c b/src/world/area_dgb/dgb_01/BFD9A0.c index 5cf507629e..ae6430c2bb 100644 --- a/src/world/area_dgb/dgb_01/BFD9A0.c +++ b/src/world/area_dgb/dgb_01/BFD9A0.c @@ -471,7 +471,7 @@ f32 N(D_80244CD0_C02550)[] = { Script N(80244CE8) = SCRIPT({ SetSelfEnemyFlagBits(((0x00100000 | 0x01000000 | 0x02000000 | 0x04000000 | 0x08000000 | 0x10000000 | 0x20000000)), TRUE); - SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT)), TRUE); + SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT)), TRUE); }); NpcAISettings N(npcAISettings_80244D24) = { @@ -492,9 +492,9 @@ void N(func_80240120_BFD9A0)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { @@ -602,7 +602,7 @@ void N(func_802402D0_BFDB50)(ScriptInstance* script, NpcAISettings* aiSettings, if (aiSettings->unk_14 >= 0) { if (script->functionTemp[1].s <= 0) { script->functionTemp[1].s = aiSettings->unk_14; - if ((gPlayerStatusPtr->position.y < ((npc->pos.y + npc->collisionHeight) + 10.0)) && + if ((gPlayerStatusPtr->position.y < ((npc->pos.y + npc->collisionHeight) + 10.0)) && func_800490B4(territory, enemy, aiSettings->alertRadius, aiSettings->unk_10.f, 0)) { fx_emote(0, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 12, &var); npc->moveToPos.y = npc->pos.y; @@ -621,9 +621,9 @@ void N(func_802402D0_BFDB50)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->varTable[9]--; } - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { posW = dist2D(enemy->territory->wander.point.x, enemy->territory->wander.point.z, npc->pos.x, npc->pos.z); if (npc->moveSpeed < posW) { @@ -633,7 +633,7 @@ void N(func_802402D0_BFDB50)(ScriptInstance* script, NpcAISettings* aiSettings, } if (enemy->territory->wander.wanderSizeX | enemy->territory->wander.wanderSizeZ | phi_s4) { - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc_move_heading(npc, npc->moveSpeed, npc->yaw); } else { return; @@ -709,7 +709,7 @@ void N(func_802409B8_BFE238)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->varTable[9]--; } - if ((npc->unk_8C == 0) && (npc->duration <= 0)) { + if ((npc->turnAroundYawAdjustment == 0) && (npc->duration <= 0)) { script->functionTemp[1].s--; if (script->functionTemp[1].s > 0) { if (!(enemy->npcSettings->unk_2A & 0x10)) { @@ -762,8 +762,8 @@ void N(func_80240F78_BFE7F8)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->unk_07 = 0; if (!(npc->flags & 8)) { posX = npc->pos.x; - posY = npc->pos.y; - posZ = npc->pos.z; + posY = npc->pos.y; + posZ = npc->pos.z; posW = 1000.0f; phi_v0 = func_800DCB7C(npc->unk_80, &posX, &posY, &posZ, &posW); } else { @@ -806,8 +806,8 @@ void N(func_80240F78_BFE7F8)(ScriptInstance* script, NpcAISettings* aiSettings, } posX = npc->pos.x; - posY = npc->pos.y + npc->collisionHeight; - posZ = npc->pos.z; + posY = npc->pos.y + npc->collisionHeight; + posZ = npc->pos.z; posW = (fabsf(npc->jumpVelocity) + npc->collisionHeight) + 10.0; if (func_800DCB7C(npc->unk_80, &posX, &posY, &posZ, &posW)) { if (posW <= (npc->collisionHeight + fabsf(npc->jumpVelocity))) { @@ -1008,8 +1008,8 @@ void N(func_80241954_BFF1D4)(ScriptInstance *script, NpcAISettings *aiSettings, npc->rotation.y -= 360.0; } temp_f8_2 = 255.0f - (cosine((s32)npc->rotation.y % 180) * 56.0f); - func_802DE894(npc->unk_24, 6, temp_f8_2, temp_f8_2, temp_f8_2, 255, 0); - + func_802DE894(npc->spriteInstanceID, 6, temp_f8_2, temp_f8_2, temp_f8_2, 255, 0); + posX = (*playerStatus)->position.x; posY = (*playerStatus)->position.y; posZ = (*playerStatus)->position.z; @@ -1037,7 +1037,7 @@ void N(func_80241BF0_BFF470)(ScriptInstance *script, NpcAISettings *aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); enemy->varTable[0] &= ~0x100; - func_802DE894(npc->unk_24, 0, 0, 0, 0, 0, 0); + func_802DE894(npc->spriteInstanceID, 0, 0, 0, 0, 0, 0); if (enemy->varTable[0] & 0x1000) { sfx_stop_sound(0x80000011); enemy->varTable[0] &= ~0x1000; @@ -1142,7 +1142,7 @@ void N(func_80241F98_BFF818)(ScriptInstance *script, NpcAISettings *aiSettings, } script->functionTemp[1].s--; - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); npc_move_heading(npc, npc->moveSpeed, npc->yaw); posW = dist2D(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); @@ -1178,7 +1178,7 @@ ApiStatus N(func_802422B0_BFFB30)(ScriptInstance *script, s32 isInitialCall) { switch (script->functionTemp[0].s) { case 0: N(func_80240120_BFD9A0)(script, aiSettings, territoryPtr); - func_802DE894(npc->unk_24, 0, 0, 0, 0, 0, 0); + func_802DE894(npc->spriteInstanceID, 0, 0, 0, 0, 0, 0); case 1: N(func_802402D0_BFDB50)(script, aiSettings, territoryPtr); if (script->functionTemp[0].s == 12) { @@ -1488,13 +1488,13 @@ void N(func_80242684_BFFF04)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[1].s--; } - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { if (npc->moveSpeed < 4.0) { func_8003D660(npc, 0); } else { func_8003D660(npc, 1); } - + x = script->functionTemp[2].s[enemy->territory->patrol.points].x; z = script->functionTemp[2].s[enemy->territory->patrol.points].z; npc->yaw = atan2(npc->pos.x, npc->pos.z, x, z); @@ -1502,7 +1502,7 @@ void N(func_80242684_BFFF04)(ScriptInstance* script, NpcAISettings* aiSettings, if (dist2D(npc->pos.x, npc->pos.z, x, z) <= npc->moveSpeed) { script->functionTemp[0].s = 2; script->functionTemp[1].s = (rand_int(1000) % 3) + 2; - if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || + if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || (aiSettings->waitTime <= 0) || (script->functionTemp[1].s == 0)) { script->functionTemp[0].s = 4; } @@ -1529,7 +1529,7 @@ void N(func_802429EC_C0026C)(ScriptInstance* script, NpcAISettings* aiSettings, } else { script->functionTemp[0].s = 10; } - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration == 0) { script->functionTemp[1].s--; @@ -1609,7 +1609,7 @@ void N(func_80243000_C00880)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[1].s = 0; script->functionTemp[0].s = 1; } - + ApiStatus N(func_802430C0_C00940)(ScriptInstance *script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); @@ -1846,7 +1846,7 @@ StaticNpc N(npcGroup_80246090) = { .id = NPC_SENTINEL0, .settings = &N(npcSettings_8024526C), .pos = { -180.0f, 100.0f, 230.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_80245D80), .yaw = 90, .dropFlags = 0x80, @@ -1877,7 +1877,7 @@ StaticNpc N(npcGroup_80246280) = { .id = NPC_SENTINEL1, .settings = &N(npcSettings_8024526C), .pos = { 180.0f, 100.0f, 230.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_80245E44), .yaw = 270, .dropFlags = 0x80, @@ -1908,7 +1908,7 @@ StaticNpc N(npcGroup_80246470) = { .id = NPC_SENTINEL2, .settings = &N(npcSettings_8024526C), .pos = { -180.0f, 100.0f, -230.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_80245F08), .yaw = 90, .dropFlags = 0x80, @@ -1939,7 +1939,7 @@ StaticNpc N(npcGroup_80246660) = { .id = NPC_SENTINEL3, .settings = &N(npcSettings_8024526C), .pos = { 180.0f, 100.0f, -230.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_80245FCC), .yaw = 270, .dropFlags = 0x80, diff --git a/src/world/area_dgb/dgb_02/C2EBA0.c b/src/world/area_dgb/dgb_02/C2EBA0.c index da34b3dfde..1ba510e3b3 100644 --- a/src/world/area_dgb/dgb_02/C2EBA0.c +++ b/src/world/area_dgb/dgb_02/C2EBA0.c @@ -275,7 +275,7 @@ StaticNpc N(npcGroup_80241E08)[] = { .id = NPC_WORLD_CLUBBA0, .settings = &N(npcSettings_80241C3C), .pos = { -200.0f, 0.0f, 180.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .yaw = 270, .dropFlags = 0x80, .itemDropChance = 5, @@ -312,7 +312,7 @@ StaticNpc N(npcGroup_80241E08)[] = { .id = NPC_WORLD_CLUBBA1, .settings = &N(npcSettings_80241DDC), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -344,7 +344,7 @@ StaticNpc N(npcGroup_802421E8)[] = { .id = NPC_WORLD_CLUBBA2, .settings = &N(npcSettings_80241D08), .pos = { 375.0f, 0.0f, 100.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .yaw = 270, .dropFlags = 0x80, .itemDropChance = 5, @@ -380,7 +380,7 @@ StaticNpc N(npcGroup_802421E8)[] = { .id = NPC_WORLD_CLUBBA3, .settings = &N(npcSettings_80241DDC), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -492,17 +492,17 @@ ApiStatus N(update_starpoints_display_C2EF5C)(ScriptInstance *script, s32 isInit } posX = npc2->pos.x; posZ = npc2->pos.z; - add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->unk_34); - + add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->renderYaw); + npc->pos.x = posX; enemy->unk_10.x = npc->pos.x; npc->pos.y = npc2->pos.y + enemy->varTable[0]; enemy->unk_10.y = npc->pos.y; - + npc->pos.z = posZ; enemy->unk_10.z = npc->pos.z; - + npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z); enemy->flags &= 0xE0EFFFFF; npc->duration = 0; @@ -525,7 +525,7 @@ ApiStatus N(update_starpoints_display_C2EF5C)(ScriptInstance *script, s32 isInit enemy->unk_07 = func; script->functionTemp[0].s = 0; } - break; + break; } return ApiStatus_BLOCK; @@ -642,10 +642,10 @@ void N(func_80240958_C2F4F8)(ScriptInstance *script, NpcAISettings *aiSettings, f32 posX, posZ; if (func_800490B4(territory, enemy, 80.0f, 0.0f, 0)) { - if ((gPlayerStatusPtr->actionState == 2) || (gPlayerStatusPtr->actionState == 26) || - (gPlayerStatusPtr->actionState == 3) || (gPlayerStatusPtr->actionState == 14) || - (gPlayerStatusPtr->actionState == 16) || (gPlayerStatusPtr->actionState == 11) || - (gPlayerStatusPtr->actionState == 10) || (gPlayerStatusPtr->actionState == 18) || + if ((gPlayerStatusPtr->actionState == 2) || (gPlayerStatusPtr->actionState == 26) || + (gPlayerStatusPtr->actionState == 3) || (gPlayerStatusPtr->actionState == 14) || + (gPlayerStatusPtr->actionState == 16) || (gPlayerStatusPtr->actionState == 11) || + (gPlayerStatusPtr->actionState == 10) || (gPlayerStatusPtr->actionState == 18) || (gPlayerStatusPtr->actionState == 19) || (gPlayerStatusPtr->actionState == 37)) { phi_s2 = TRUE; } @@ -657,7 +657,7 @@ void N(func_80240958_C2F4F8)(ScriptInstance *script, NpcAISettings *aiSettings, } } - if (((playerData->currentPartner == 1) && (D_8010EBB0.unk_00 != 0)) || + if (((playerData->currentPartner == 1) && (D_8010EBB0.unk_00 != 0)) || ((playerData->currentPartner == 3) && (D_8010EBB0.unk_00 == 2))) { posX = npc->pos.x; posZ = npc->pos.z; @@ -771,7 +771,7 @@ void N(func_80240F00_C2FAA0)(ScriptInstance *script, NpcAISettings *aiSettings, npc->duration = 15; enemy->varTable[7] = 50; script->functionTemp[0].s = 3; - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { var = npc->yaw; func_8004A784(npc, 5.0f, &var, 0, 0, 0); npc->yaw = var; @@ -784,7 +784,7 @@ void N(func_80241078_C2FC18)(ScriptInstance *script, NpcAISettings *aiSettings, Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration <= 0) { npc->duration = 0; diff --git a/src/world/area_dgb/dgb_03/C31730.c b/src/world/area_dgb/dgb_03/C31730.c index 998cc7bc38..92be5a8a9d 100644 --- a/src/world/area_dgb/dgb_03/C31730.c +++ b/src/world/area_dgb/dgb_03/C31730.c @@ -531,7 +531,7 @@ StaticNpc N(npcGroup_80243DE8)[] = { .id = NPC_WORLD_CLUBBA0, .settings = &N(npcSettings_80243AFC), .pos = { 180.0f, 0.0f, -122.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .yaw = 270, .dropFlags = 0x80, .itemDropChance = 5, @@ -567,7 +567,7 @@ StaticNpc N(npcGroup_80243DE8)[] = { .id = NPC_WORLD_CLUBBA1, .settings = &N(npcSettings_80243D68), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -599,7 +599,7 @@ StaticNpc N(npcGroup_802441C8)[] = { .id = NPC_WORLD_CLUBBA2, .settings = &N(npcSettings_80243BC8), .pos = { -272.0f, 0.0f, -135.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .yaw = 270, .dropFlags = 0x80, .itemDropChance = 5, @@ -635,7 +635,7 @@ StaticNpc N(npcGroup_802441C8)[] = { .id = NPC_WORLD_CLUBBA3, .settings = &N(npcSettings_80243D68), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -667,7 +667,7 @@ StaticNpc N(npcGroup_802445A8)[] = { .id = NPC_WORLD_CLUBBA4, .settings = &N(npcSettings_80243C94), .pos = { -326.0f, 210.0f, 80.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_80243D94), .yaw = 90, .dropFlags = 0x80, @@ -704,7 +704,7 @@ StaticNpc N(npcGroup_802445A8)[] = { .id = NPC_WORLD_CLUBBA5, .settings = &N(npcSettings_80243D68), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -817,17 +817,17 @@ ApiStatus N(func_8024060C_C31AEC)(ScriptInstance *script, s32 isInitialCall) { } posX = npc2->pos.x; posZ = npc2->pos.z; - add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->unk_34); - + add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->renderYaw); + npc->pos.x = posX; enemy->unk_10.x = npc->pos.x; npc->pos.y = npc2->pos.y + enemy->varTable[0]; enemy->unk_10.y = npc->pos.y; - + npc->pos.z = posZ; enemy->unk_10.z = npc->pos.z; - + npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z); enemy->flags &= 0xE0EFFFFF; npc->duration = 0; @@ -850,7 +850,7 @@ ApiStatus N(func_8024060C_C31AEC)(ScriptInstance *script, s32 isInitialCall) { enemy->unk_07 = func; script->functionTemp[0].s = 0; } - break; + break; } return ApiStatus_BLOCK; @@ -999,13 +999,13 @@ void N(func_80240C78_C32158)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[1].s--; } - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { if (npc->moveSpeed < 4.0) { func_8003D660(npc, 0); } else { func_8003D660(npc, 1); } - + x = script->functionTemp[2].s[enemy->territory->patrol.points].x; z = script->functionTemp[2].s[enemy->territory->patrol.points].z; npc->yaw = atan2(npc->pos.x, npc->pos.z, x, z); @@ -1013,7 +1013,7 @@ void N(func_80240C78_C32158)(ScriptInstance* script, NpcAISettings* aiSettings, if (dist2D(npc->pos.x, npc->pos.z, x, z) <= npc->moveSpeed) { script->functionTemp[0].s = 2; script->functionTemp[1].s = (rand_int(1000) % 3) + 2; - if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || + if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || (aiSettings->waitTime <= 0) || (script->functionTemp[1].s == 0)) { script->functionTemp[0].s = 4; } @@ -1040,7 +1040,7 @@ void N(func_80240FE0_C324C0)(ScriptInstance* script, NpcAISettings* aiSettings, } else { script->functionTemp[0].s = 10; } - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration == 0) { script->functionTemp[1].s--; @@ -1320,10 +1320,10 @@ void N(func_80241D04_C331E4)(ScriptInstance *script, NpcAISettings *aiSettings, f32 posX, posZ; if (func_800490B4(territory, enemy, 80.0f, 0.0f, 0)) { - if ((gPlayerStatusPtr->actionState == 2) || (gPlayerStatusPtr->actionState == 26) || - (gPlayerStatusPtr->actionState == 3) || (gPlayerStatusPtr->actionState == 14) || - (gPlayerStatusPtr->actionState == 16) || (gPlayerStatusPtr->actionState == 11) || - (gPlayerStatusPtr->actionState == 10) || (gPlayerStatusPtr->actionState == 18) || + if ((gPlayerStatusPtr->actionState == 2) || (gPlayerStatusPtr->actionState == 26) || + (gPlayerStatusPtr->actionState == 3) || (gPlayerStatusPtr->actionState == 14) || + (gPlayerStatusPtr->actionState == 16) || (gPlayerStatusPtr->actionState == 11) || + (gPlayerStatusPtr->actionState == 10) || (gPlayerStatusPtr->actionState == 18) || (gPlayerStatusPtr->actionState == 19) || (gPlayerStatusPtr->actionState == 37)) { phi_s2 = TRUE; } @@ -1335,7 +1335,7 @@ void N(func_80241D04_C331E4)(ScriptInstance *script, NpcAISettings *aiSettings, } } - if (((playerData->currentPartner == 1) && (D_8010EBB0.unk_00 != 0)) || + if (((playerData->currentPartner == 1) && (D_8010EBB0.unk_00 != 0)) || ((playerData->currentPartner == 3) && (D_8010EBB0.unk_00 == 2))) { posX = npc->pos.x; posZ = npc->pos.z; @@ -1449,7 +1449,7 @@ void N(func_802422AC_C3378C)(ScriptInstance *script, NpcAISettings *aiSettings, npc->duration = 15; enemy->varTable[7] = 50; script->functionTemp[0].s = 3; - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { var = npc->yaw; func_8004A784(npc, 5.0f, &var, 0, 0, 0); npc->yaw = var; @@ -1462,7 +1462,7 @@ void N(func_80242424_C33904)(ScriptInstance *script, NpcAISettings *aiSettings, Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration <= 0) { npc->duration = 0; diff --git a/src/world/area_dgb/dgb_04/C36530.c b/src/world/area_dgb/dgb_04/C36530.c index 2fe7647856..087efbdbc5 100644 --- a/src/world/area_dgb/dgb_04/C36530.c +++ b/src/world/area_dgb/dgb_04/C36530.c @@ -114,7 +114,7 @@ f32 N(D_80243560_C39A90)[] = { Script N(80243578) = SCRIPT({ SetSelfEnemyFlagBits(((0x00100000 | 0x01000000 | 0x02000000 | 0x04000000 | 0x08000000 | 0x10000000 | 0x20000000)), TRUE); - SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT)), TRUE); + SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT)), TRUE); }); NpcAISettings N(npcAISettings_802435B4) = { @@ -225,7 +225,7 @@ StaticNpc N(npcGroup_80243B28) = { .id = NPC_SENTINEL, .settings = &N(npcSettings_80243AFC), .pos = { 70.0f, -220.0f, 186.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .yaw = 90, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -262,14 +262,14 @@ s32 N(D_80243D30_C3A260)[] = { }; s16 N(D_80243D38_C3A268)[] = { - 0x0001, 0x0002, 0x0003, 0x0004, + 0x0001, 0x0002, 0x0003, 0x0004, 0x0009, 0x0006, 0x0007, 0x0008 }; s32 N(D_80243D48_C3A278)[8][2] = { - {0x001D00E0, 0x001D00E1 }, {0x001D00E2, 0x001D00E3 }, - {0x001D00E4, 0x001D00E5 }, {0x001D00E6, 0x001D00E7 }, - {0x001D00E8, 0x001D00E9 }, {0x001D00EA, 0x001D00EB }, + {0x001D00E0, 0x001D00E1 }, {0x001D00E2, 0x001D00E3 }, + {0x001D00E4, 0x001D00E5 }, {0x001D00E6, 0x001D00E7 }, + {0x001D00E8, 0x001D00E9 }, {0x001D00EA, 0x001D00EB }, {0x001D00EC, 0x001D00ED }, {0x001D00EE, 0x001D00EF } }; @@ -401,9 +401,9 @@ void N(func_80240000_C36530)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { @@ -511,7 +511,7 @@ void N(func_802401B0_C366E0)(ScriptInstance* script, NpcAISettings* aiSettings, if (aiSettings->unk_14 >= 0) { if (script->functionTemp[1].s <= 0) { script->functionTemp[1].s = aiSettings->unk_14; - if ((gPlayerStatusPtr->position.y < ((npc->pos.y + npc->collisionHeight) + 10.0)) && + if ((gPlayerStatusPtr->position.y < ((npc->pos.y + npc->collisionHeight) + 10.0)) && func_800490B4(territory, enemy, aiSettings->alertRadius, aiSettings->unk_10.f, 0)) { fx_emote(0, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 12, &var); npc->moveToPos.y = npc->pos.y; @@ -530,9 +530,9 @@ void N(func_802401B0_C366E0)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->varTable[9]--; } - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { posW = dist2D(enemy->territory->wander.point.x, enemy->territory->wander.point.z, npc->pos.x, npc->pos.z); if (npc->moveSpeed < posW) { @@ -542,7 +542,7 @@ void N(func_802401B0_C366E0)(ScriptInstance* script, NpcAISettings* aiSettings, } if (enemy->territory->wander.wanderSizeX | enemy->territory->wander.wanderSizeZ | phi_s4) { - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc_move_heading(npc, npc->moveSpeed, npc->yaw); } else { return; @@ -618,7 +618,7 @@ void N(func_80240898_C36DC8)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->varTable[9]--; } - if ((npc->unk_8C == 0) && (npc->duration <= 0)) { + if ((npc->turnAroundYawAdjustment == 0) && (npc->duration <= 0)) { script->functionTemp[1].s--; if (script->functionTemp[1].s > 0) { if (!(enemy->npcSettings->unk_2A & 0x10)) { @@ -671,8 +671,8 @@ void N(func_80240E58_C37388)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->unk_07 = 0; if (!(npc->flags & 8)) { posX = npc->pos.x; - posY = npc->pos.y; - posZ = npc->pos.z; + posY = npc->pos.y; + posZ = npc->pos.z; posW = 1000.0f; phi_v0 = func_800DCB7C(npc->unk_80, &posX, &posY, &posZ, &posW); } else { @@ -715,8 +715,8 @@ void N(func_80240E58_C37388)(ScriptInstance* script, NpcAISettings* aiSettings, } posX = npc->pos.x; - posY = npc->pos.y + npc->collisionHeight; - posZ = npc->pos.z; + posY = npc->pos.y + npc->collisionHeight; + posZ = npc->pos.z; posW = (fabsf(npc->jumpVelocity) + npc->collisionHeight) + 10.0; if (func_800DCB7C(npc->unk_80, &posX, &posY, &posZ, &posW)) { if (posW <= (npc->collisionHeight + fabsf(npc->jumpVelocity))) { @@ -907,8 +907,8 @@ void N(func_802417F8_C37D28)(ScriptInstance *script, NpcAISettings *aiSettings, npc->rotation.y -= 360.0; } temp_f8_2 = 255.0f - (cosine((s32)npc->rotation.y % 180) * 56.0f); - func_802DE894(npc->unk_24, 6, temp_f8_2, temp_f8_2, temp_f8_2, 255, 0); - + func_802DE894(npc->spriteInstanceID, 6, temp_f8_2, temp_f8_2, temp_f8_2, 255, 0); + posX = (*playerStatus)->position.x; posY = (*playerStatus)->position.y; posZ = (*playerStatus)->position.z; @@ -936,7 +936,7 @@ void N(func_80241A94_C37FC4)(ScriptInstance *script, NpcAISettings *aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); enemy->varTable[0] &= ~0x100; - func_802DE894(npc->unk_24, 0, 0, 0, 0, 0, 0); + func_802DE894(npc->spriteInstanceID, 0, 0, 0, 0, 0, 0); if (enemy->varTable[0] & 0x1000) { sfx_stop_sound(0x80000011); enemy->varTable[0] &= ~0x1000; @@ -1041,7 +1041,7 @@ void N(func_80241E3C_C3836C)(ScriptInstance *script, NpcAISettings *aiSettings, } script->functionTemp[1].s--; - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); npc_move_heading(npc, npc->moveSpeed, npc->yaw); posW = dist2D(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); @@ -1077,7 +1077,7 @@ ApiStatus N(func_80242154_C38684)(ScriptInstance *script, s32 isInitialCall) { switch (script->functionTemp[0].s) { case 0: N(func_80240000_C36530)(script, aiSettings, territoryPtr); - func_802DE894(npc->unk_24, 0, 0, 0, 0, 0, 0); + func_802DE894(npc->spriteInstanceID, 0, 0, 0, 0, 0, 0); case 1: N(func_802401B0_C366E0)(script, aiSettings, territoryPtr); if (script->functionTemp[0].s == 12) { @@ -1321,7 +1321,7 @@ ApiStatus N(func_80242914_C38E44)(ScriptInstance *script, s32 isInitialCall) { Entity* entity = get_entity_by_index(get_variable(script, *script->ptrReadPos)); func_80070BB0(4, entity->position.x, entity->position.y + 12.5f, entity->position.z, 1.0f, 0x4B); - + return ApiStatus_DONE2; } diff --git a/src/world/area_dgb/dgb_05/C3AA10.c b/src/world/area_dgb/dgb_05/C3AA10.c index ac311d8065..d3b4c776d0 100644 --- a/src/world/area_dgb/dgb_05/C3AA10.c +++ b/src/world/area_dgb/dgb_05/C3AA10.c @@ -233,7 +233,7 @@ StaticNpc N(npcGroup_80241B4C)[] = { .id = NPC_WORLD_CLUBBA1, .settings = &N(npcSettings_80241B20), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -301,7 +301,7 @@ StaticNpc N(npcGroup_80241F2C)[] = { .id = NPC_WORLD_CLUBBA3, .settings = &N(npcSettings_80241B20), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -427,17 +427,17 @@ ApiStatus N(func_8024041C_C3AE2C)(ScriptInstance *script, s32 isInitialCall) { } posX = npc2->pos.x; posZ = npc2->pos.z; - add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->unk_34); - + add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->renderYaw); + npc->pos.x = posX; enemy->unk_10.x = npc->pos.x; npc->pos.y = npc2->pos.y + enemy->varTable[0]; enemy->unk_10.y = npc->pos.y; - + npc->pos.z = posZ; enemy->unk_10.z = npc->pos.z; - + npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z); enemy->flags &= 0xE0EFFFFF; npc->duration = 0; @@ -460,7 +460,7 @@ ApiStatus N(func_8024041C_C3AE2C)(ScriptInstance *script, s32 isInitialCall) { enemy->unk_07 = func; script->functionTemp[0].s = 0; } - break; + break; } return ApiStatus_BLOCK; @@ -492,10 +492,10 @@ void N(func_80240704_C3B114)(ScriptInstance *script, NpcAISettings *aiSettings, f32 posX, posZ; if (func_800490B4(territory, enemy, 80.0f, 0.0f, 0)) { - if ((gPlayerStatusPtr->actionState == 2) || (gPlayerStatusPtr->actionState == 26) || - (gPlayerStatusPtr->actionState == 3) || (gPlayerStatusPtr->actionState == 14) || - (gPlayerStatusPtr->actionState == 16) || (gPlayerStatusPtr->actionState == 11) || - (gPlayerStatusPtr->actionState == 10) || (gPlayerStatusPtr->actionState == 18) || + if ((gPlayerStatusPtr->actionState == 2) || (gPlayerStatusPtr->actionState == 26) || + (gPlayerStatusPtr->actionState == 3) || (gPlayerStatusPtr->actionState == 14) || + (gPlayerStatusPtr->actionState == 16) || (gPlayerStatusPtr->actionState == 11) || + (gPlayerStatusPtr->actionState == 10) || (gPlayerStatusPtr->actionState == 18) || (gPlayerStatusPtr->actionState == 19) || (gPlayerStatusPtr->actionState == 37)) { phi_s2 = TRUE; } @@ -507,7 +507,7 @@ void N(func_80240704_C3B114)(ScriptInstance *script, NpcAISettings *aiSettings, } } - if (((playerData->currentPartner == 1) && (D_8010EBB0.unk_00 != 0)) || + if (((playerData->currentPartner == 1) && (D_8010EBB0.unk_00 != 0)) || ((playerData->currentPartner == 3) && (D_8010EBB0.unk_00 == 2))) { posX = npc->pos.x; posZ = npc->pos.z; @@ -621,7 +621,7 @@ void N(func_80240CAC_C3B6BC)(ScriptInstance *script, NpcAISettings *aiSettings, npc->duration = 15; enemy->varTable[7] = 50; script->functionTemp[0].s = 3; - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { var = npc->yaw; func_8004A784(npc, 5.0f, &var, 0, 0, 0); npc->yaw = var; @@ -634,7 +634,7 @@ void N(func_80240E24_C3B834)(ScriptInstance *script, NpcAISettings *aiSettings, Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration <= 0) { npc->duration = 0; diff --git a/src/world/area_dgb/dgb_07/C3DBF0.c b/src/world/area_dgb/dgb_07/C3DBF0.c index e0ecbd7990..aec52e7d18 100644 --- a/src/world/area_dgb/dgb_07/C3DBF0.c +++ b/src/world/area_dgb/dgb_07/C3DBF0.c @@ -184,7 +184,7 @@ StaticNpc N(npcGroup_80241A7C)[] = { .id = NPC_WORLD_CLUBBA0, .settings = &N(npcSettings_8024197C), .pos = { -500.0f, 0.0f, -240.0f }, - .flags = NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_NO_Y_MOVEMENT, .yaw = 270, .dropFlags = 0x80, .itemDropChance = 5, @@ -221,7 +221,7 @@ StaticNpc N(npcGroup_80241A7C)[] = { .id = NPC_WORLD_CLUBBA1, .settings = &N(npcSettings_80241A50), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -336,17 +336,17 @@ ApiStatus N(update_starpoints_display_C3DFAC)(ScriptInstance *script, s32 isInit } posX = npc2->pos.x; posZ = npc2->pos.z; - add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->unk_34); - + add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->renderYaw); + npc->pos.x = posX; enemy->unk_10.x = npc->pos.x; npc->pos.y = npc2->pos.y + enemy->varTable[0]; enemy->unk_10.y = npc->pos.y; - + npc->pos.z = posZ; enemy->unk_10.z = npc->pos.z; - + npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z); enemy->flags &= 0xE0EFFFFF; npc->duration = 0; @@ -369,7 +369,7 @@ ApiStatus N(update_starpoints_display_C3DFAC)(ScriptInstance *script, s32 isInit enemy->unk_07 = func; script->functionTemp[0].s = 0; } - break; + break; } return ApiStatus_BLOCK; @@ -401,10 +401,10 @@ void N(func_802406A4_C3E294)(ScriptInstance *script, NpcAISettings *aiSettings, f32 posX, posZ; if (func_800490B4(territory, enemy, 80.0f, 0.0f, 0)) { - if ((gPlayerStatusPtr->actionState == 2) || (gPlayerStatusPtr->actionState == 26) || - (gPlayerStatusPtr->actionState == 3) || (gPlayerStatusPtr->actionState == 14) || - (gPlayerStatusPtr->actionState == 16) || (gPlayerStatusPtr->actionState == 11) || - (gPlayerStatusPtr->actionState == 10) || (gPlayerStatusPtr->actionState == 18) || + if ((gPlayerStatusPtr->actionState == 2) || (gPlayerStatusPtr->actionState == 26) || + (gPlayerStatusPtr->actionState == 3) || (gPlayerStatusPtr->actionState == 14) || + (gPlayerStatusPtr->actionState == 16) || (gPlayerStatusPtr->actionState == 11) || + (gPlayerStatusPtr->actionState == 10) || (gPlayerStatusPtr->actionState == 18) || (gPlayerStatusPtr->actionState == 19) || (gPlayerStatusPtr->actionState == 37)) { phi_s2 = TRUE; } @@ -416,7 +416,7 @@ void N(func_802406A4_C3E294)(ScriptInstance *script, NpcAISettings *aiSettings, } } - if (((playerData->currentPartner == 1) && (D_8010EBB0.unk_00 != 0)) || + if (((playerData->currentPartner == 1) && (D_8010EBB0.unk_00 != 0)) || ((playerData->currentPartner == 3) && (D_8010EBB0.unk_00 == 2))) { posX = npc->pos.x; posZ = npc->pos.z; @@ -530,7 +530,7 @@ void N(func_80240C4C_C3E83C)(ScriptInstance *script, NpcAISettings *aiSettings, npc->duration = 15; enemy->varTable[7] = 50; script->functionTemp[0].s = 3; - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { var = npc->yaw; func_8004A784(npc, 5.0f, &var, 0, 0, 0); npc->yaw = var; @@ -543,7 +543,7 @@ void N(func_80240DC4_C3E9B4)(ScriptInstance *script, NpcAISettings *aiSettings, Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration <= 0) { npc->duration = 0; diff --git a/src/world/area_dgb/dgb_08/C3FDB0.c b/src/world/area_dgb/dgb_08/C3FDB0.c index b6e34310fb..cdf86e3c80 100644 --- a/src/world/area_dgb/dgb_08/C3FDB0.c +++ b/src/world/area_dgb/dgb_08/C3FDB0.c @@ -261,7 +261,7 @@ f32 N(D_80244460_C44210)[] = { Script N(80244478) = SCRIPT({ SetSelfEnemyFlagBits(((0x00100000 | 0x01000000 | 0x02000000 | 0x04000000 | 0x08000000 | 0x10000000 | 0x20000000)), TRUE); - SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT)), TRUE); + SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT)), TRUE); }); NpcAISettings N(npcAISettings_802444B4) = { @@ -566,7 +566,7 @@ StaticNpc N(npcGroup_80245290)[] = { .id = NPC_WORLD_CLUBBA1, .settings = &N(npcSettings_80244434), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -635,7 +635,7 @@ StaticNpc N(npcGroup_80245670)[] = { .id = NPC_WORLD_CLUBBA3, .settings = &N(npcSettings_80244434), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -704,7 +704,7 @@ StaticNpc N(npcGroup_80245A50)[] = { .id = NPC_WORLD_CLUBBA5, .settings = &N(npcSettings_80244434), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -849,7 +849,7 @@ StaticNpc N(npcGroup_80246528) = { .id = NPC_WORLD_CLUBBA6, .settings = &N(npcSettings_80244A28), .pos = { 426.0f, 0.0f, 38.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_200000 | NPC_FLAG_400000, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_200000 | NPC_FLAG_400000, .init = &N(init_802464C4), .yaw = 270, .dropFlags = 0x80, @@ -1012,13 +1012,13 @@ void N(func_80240158_C3FF08)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[1].s--; } - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { if (npc->moveSpeed < 4.0) { func_8003D660(npc, 0); } else { func_8003D660(npc, 1); } - + x = script->functionTemp[2].s[enemy->territory->patrol.points].x; z = script->functionTemp[2].s[enemy->territory->patrol.points].z; npc->yaw = atan2(npc->pos.x, npc->pos.z, x, z); @@ -1026,7 +1026,7 @@ void N(func_80240158_C3FF08)(ScriptInstance* script, NpcAISettings* aiSettings, if (dist2D(npc->pos.x, npc->pos.z, x, z) <= npc->moveSpeed) { script->functionTemp[0].s = 2; script->functionTemp[1].s = (rand_int(1000) % 3) + 2; - if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || + if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || (aiSettings->waitTime <= 0) || (script->functionTemp[1].s == 0)) { script->functionTemp[0].s = 4; } @@ -1053,7 +1053,7 @@ void N(func_802404C0_C40270)(ScriptInstance* script, NpcAISettings* aiSettings, } else { script->functionTemp[0].s = 10; } - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration == 0) { script->functionTemp[1].s--; @@ -1298,17 +1298,17 @@ ApiStatus N(func_8024124C_C40FFC)(ScriptInstance *script, s32 isInitialCall) { } posX = npc2->pos.x; posZ = npc2->pos.z; - add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->unk_34); - + add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->renderYaw); + npc->pos.x = posX; enemy->unk_10.x = npc->pos.x; npc->pos.y = npc2->pos.y + enemy->varTable[0]; enemy->unk_10.y = npc->pos.y; - + npc->pos.z = posZ; enemy->unk_10.z = npc->pos.z; - + npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z); enemy->flags &= 0xE0EFFFFF; npc->duration = 0; @@ -1331,7 +1331,7 @@ ApiStatus N(func_8024124C_C40FFC)(ScriptInstance *script, s32 isInitialCall) { enemy->unk_07 = func; script->functionTemp[0].s = 0; } - break; + break; } return ApiStatus_BLOCK; @@ -1427,9 +1427,9 @@ void N(func_80241760_C41510)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { @@ -1537,7 +1537,7 @@ void N(func_80241910_C416C0)(ScriptInstance* script, NpcAISettings* aiSettings, if (aiSettings->unk_14 >= 0) { if (script->functionTemp[1].s <= 0) { script->functionTemp[1].s = aiSettings->unk_14; - if ((gPlayerStatusPtr->position.y < ((npc->pos.y + npc->collisionHeight) + 10.0)) && + if ((gPlayerStatusPtr->position.y < ((npc->pos.y + npc->collisionHeight) + 10.0)) && func_800490B4(territory, enemy, aiSettings->alertRadius, aiSettings->unk_10.f, 0)) { fx_emote(0, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 12, &var); npc->moveToPos.y = npc->pos.y; @@ -1556,9 +1556,9 @@ void N(func_80241910_C416C0)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->varTable[9]--; } - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { posW = dist2D(enemy->territory->wander.point.x, enemy->territory->wander.point.z, npc->pos.x, npc->pos.z); if (npc->moveSpeed < posW) { @@ -1568,7 +1568,7 @@ void N(func_80241910_C416C0)(ScriptInstance* script, NpcAISettings* aiSettings, } if (enemy->territory->wander.wanderSizeX | enemy->territory->wander.wanderSizeZ | phi_s4) { - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc_move_heading(npc, npc->moveSpeed, npc->yaw); } else { return; @@ -1644,7 +1644,7 @@ void N(func_80241FF8_C41DA8)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->varTable[9]--; } - if ((npc->unk_8C == 0) && (npc->duration <= 0)) { + if ((npc->turnAroundYawAdjustment == 0) && (npc->duration <= 0)) { script->functionTemp[1].s--; if (script->functionTemp[1].s > 0) { if (!(enemy->npcSettings->unk_2A & 0x10)) { @@ -1697,8 +1697,8 @@ void N(func_802425B8_C42368)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->unk_07 = 0; if (!(npc->flags & 8)) { posX = npc->pos.x; - posY = npc->pos.y; - posZ = npc->pos.z; + posY = npc->pos.y; + posZ = npc->pos.z; posW = 1000.0f; phi_v0 = func_800DCB7C(npc->unk_80, &posX, &posY, &posZ, &posW); } else { @@ -1741,8 +1741,8 @@ void N(func_802425B8_C42368)(ScriptInstance* script, NpcAISettings* aiSettings, } posX = npc->pos.x; - posY = npc->pos.y + npc->collisionHeight; - posZ = npc->pos.z; + posY = npc->pos.y + npc->collisionHeight; + posZ = npc->pos.z; posW = (fabsf(npc->jumpVelocity) + npc->collisionHeight) + 10.0; if (func_800DCB7C(npc->unk_80, &posX, &posY, &posZ, &posW)) { if (posW <= (npc->collisionHeight + fabsf(npc->jumpVelocity))) { @@ -1942,8 +1942,8 @@ void N(func_80242F94_C42D44)(ScriptInstance *script, NpcAISettings *aiSettings, npc->rotation.y -= 360.0; } temp_f8_2 = 255.0f - (cosine((s32)npc->rotation.y % 180) * 56.0f); - func_802DE894(npc->unk_24, 6, temp_f8_2, temp_f8_2, temp_f8_2, 255, 0); - + func_802DE894(npc->spriteInstanceID, 6, temp_f8_2, temp_f8_2, temp_f8_2, 255, 0); + posX = (*playerStatus)->position.x; posY = (*playerStatus)->position.y; posZ = (*playerStatus)->position.z; @@ -1971,7 +1971,7 @@ void N(func_80243230_C42FE0)(ScriptInstance *script, NpcAISettings *aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); enemy->varTable[0] &= ~0x100; - func_802DE894(npc->unk_24, 0, 0, 0, 0, 0, 0); + func_802DE894(npc->spriteInstanceID, 0, 0, 0, 0, 0, 0); if (enemy->varTable[0] & 0x1000) { sfx_stop_sound(0x80000011); enemy->varTable[0] &= ~0x1000; @@ -2076,7 +2076,7 @@ void N(func_802435D8_C43388)(ScriptInstance *script, NpcAISettings *aiSettings, } script->functionTemp[1].s--; - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); npc_move_heading(npc, npc->moveSpeed, npc->yaw); posW = dist2D(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); @@ -2112,7 +2112,7 @@ ApiStatus N(func_802438F0_C436A0)(ScriptInstance *script, s32 isInitialCall) { switch (script->functionTemp[0].s) { case 0: N(func_80241760_C41510)(script, npcAISettings, territoryPtr); - func_802DE894(npc->unk_24, 0, 0, 0, 0, 0, 0); + func_802DE894(npc->spriteInstanceID, 0, 0, 0, 0, 0, 0); case 1: N(func_80241910_C416C0)(script, npcAISettings, territoryPtr); if (script->functionTemp[0].s == 12) { diff --git a/src/world/area_dgb/dgb_09/C46BE0.c b/src/world/area_dgb/dgb_09/C46BE0.c index bc1b6f951c..4a69d62a03 100644 --- a/src/world/area_dgb/dgb_09/C46BE0.c +++ b/src/world/area_dgb/dgb_09/C46BE0.c @@ -307,7 +307,7 @@ f32 N(D_80244358_C4AF38)[] = { Script N(80244370) = SCRIPT({ SetSelfEnemyFlagBits(((0x00100000 | 0x01000000 | 0x02000000 | 0x04000000 | 0x08000000 | 0x10000000 | 0x20000000)), TRUE); - SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT)), TRUE); + SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT)), TRUE); }); NpcAISettings N(npcAISettings_802443AC) = { @@ -419,7 +419,7 @@ StaticNpc N(npcGroup_80244920)[] = { .id = NPC_WORLD_CLUBBA0, .settings = &N(npcSettings_8024418C), .pos = { -350.0f, 0.0f, 180.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .yaw = 270, .dropFlags = 0x80, .itemDropChance = 5, @@ -456,7 +456,7 @@ StaticNpc N(npcGroup_80244920)[] = { .id = NPC_WORLD_CLUBBA1, .settings = &N(npcSettings_8024432C), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -496,7 +496,7 @@ StaticNpc N(npcGroup_80244D6C)[] = { .id = NPC_WORLD_CLUBBA2, .settings = &N(npcSettings_80244258), .pos = { 310.0f, 0.0f, 88.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_80244D00), .yaw = 270, .dropFlags = 0x80, @@ -534,7 +534,7 @@ StaticNpc N(npcGroup_80244D6C)[] = { .id = NPC_WORLD_CLUBBA3, .settings = &N(npcSettings_8024432C), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -677,17 +677,17 @@ ApiStatus N(update_starpoints_display_C46F9C)(ScriptInstance *script, s32 isInit } posX = npc2->pos.x; posZ = npc2->pos.z; - add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->unk_34); - + add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->renderYaw); + npc->pos.x = posX; enemy->unk_10.x = npc->pos.x; npc->pos.y = npc2->pos.y + enemy->varTable[0]; enemy->unk_10.y = npc->pos.y; - + npc->pos.z = posZ; enemy->unk_10.z = npc->pos.z; - + npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z); enemy->flags &= 0xE0EFFFFF; npc->duration = 0; @@ -710,7 +710,7 @@ ApiStatus N(update_starpoints_display_C46F9C)(ScriptInstance *script, s32 isInit enemy->unk_07 = func; script->functionTemp[0].s = 0; } - break; + break; } return ApiStatus_BLOCK; @@ -827,10 +827,10 @@ void N(func_80240958_C47538)(ScriptInstance *script, NpcAISettings *aiSettings, f32 posX, posZ; if (func_800490B4(territory, enemy, 80.0f, 0.0f, 0)) { - if ((gPlayerStatusPtr->actionState == 2) || (gPlayerStatusPtr->actionState == 26) || - (gPlayerStatusPtr->actionState == 3) || (gPlayerStatusPtr->actionState == 14) || - (gPlayerStatusPtr->actionState == 16) || (gPlayerStatusPtr->actionState == 11) || - (gPlayerStatusPtr->actionState == 10) || (gPlayerStatusPtr->actionState == 18) || + if ((gPlayerStatusPtr->actionState == 2) || (gPlayerStatusPtr->actionState == 26) || + (gPlayerStatusPtr->actionState == 3) || (gPlayerStatusPtr->actionState == 14) || + (gPlayerStatusPtr->actionState == 16) || (gPlayerStatusPtr->actionState == 11) || + (gPlayerStatusPtr->actionState == 10) || (gPlayerStatusPtr->actionState == 18) || (gPlayerStatusPtr->actionState == 19) || (gPlayerStatusPtr->actionState == 37)) { phi_s2 = TRUE; } @@ -842,7 +842,7 @@ void N(func_80240958_C47538)(ScriptInstance *script, NpcAISettings *aiSettings, } } - if (((playerData->currentPartner == 1) && (D_8010EBB0.unk_00 != 0)) || + if (((playerData->currentPartner == 1) && (D_8010EBB0.unk_00 != 0)) || ((playerData->currentPartner == 3) && (D_8010EBB0.unk_00 == 2))) { posX = npc->pos.x; posZ = npc->pos.z; @@ -956,7 +956,7 @@ void N(func_80240F00_C47AE0)(ScriptInstance *script, NpcAISettings *aiSettings, npc->duration = 15; enemy->varTable[7] = 50; script->functionTemp[0].s = 3; - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { var = npc->yaw; func_8004A784(npc, 5.0f, &var, 0, 0, 0); npc->yaw = var; @@ -969,7 +969,7 @@ void N(func_80241078_C47C58)(ScriptInstance *script, NpcAISettings *aiSettings, Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration <= 0) { npc->duration = 0; @@ -1087,9 +1087,9 @@ void N(func_80241424_C48004)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { @@ -1197,7 +1197,7 @@ void N(func_802415D4_C481B4)(ScriptInstance* script, NpcAISettings* aiSettings, if (aiSettings->unk_14 >= 0) { if (script->functionTemp[1].s <= 0) { script->functionTemp[1].s = aiSettings->unk_14; - if ((gPlayerStatusPtr->position.y < ((npc->pos.y + npc->collisionHeight) + 10.0)) && + if ((gPlayerStatusPtr->position.y < ((npc->pos.y + npc->collisionHeight) + 10.0)) && func_800490B4(territory, enemy, aiSettings->alertRadius, aiSettings->unk_10.f, 0)) { fx_emote(0, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 12, &var); npc->moveToPos.y = npc->pos.y; @@ -1216,9 +1216,9 @@ void N(func_802415D4_C481B4)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->varTable[9]--; } - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { posW = dist2D(enemy->territory->wander.point.x, enemy->territory->wander.point.z, npc->pos.x, npc->pos.z); if (npc->moveSpeed < posW) { @@ -1228,7 +1228,7 @@ void N(func_802415D4_C481B4)(ScriptInstance* script, NpcAISettings* aiSettings, } if (enemy->territory->wander.wanderSizeX | enemy->territory->wander.wanderSizeZ | phi_s4) { - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc_move_heading(npc, npc->moveSpeed, npc->yaw); } else { return; @@ -1304,7 +1304,7 @@ void N(func_80241CBC_C4889C)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->varTable[9]--; } - if ((npc->unk_8C == 0) && (npc->duration <= 0)) { + if ((npc->turnAroundYawAdjustment == 0) && (npc->duration <= 0)) { script->functionTemp[1].s--; if (script->functionTemp[1].s > 0) { if (!(enemy->npcSettings->unk_2A & 0x10)) { @@ -1357,8 +1357,8 @@ void N(func_8024227C_C48E5C)(ScriptInstance* script, NpcAISettings* aiSettings, enemy->unk_07 = 0; if (!(npc->flags & 8)) { posX = npc->pos.x; - posY = npc->pos.y; - posZ = npc->pos.z; + posY = npc->pos.y; + posZ = npc->pos.z; posW = 1000.0f; phi_v0 = func_800DCB7C(npc->unk_80, &posX, &posY, &posZ, &posW); } else { @@ -1401,8 +1401,8 @@ void N(func_8024227C_C48E5C)(ScriptInstance* script, NpcAISettings* aiSettings, } posX = npc->pos.x; - posY = npc->pos.y + npc->collisionHeight; - posZ = npc->pos.z; + posY = npc->pos.y + npc->collisionHeight; + posZ = npc->pos.z; posW = (fabsf(npc->jumpVelocity) + npc->collisionHeight) + 10.0; if (func_800DCB7C(npc->unk_80, &posX, &posY, &posZ, &posW)) { if (posW <= (npc->collisionHeight + fabsf(npc->jumpVelocity))) { @@ -1594,8 +1594,8 @@ void N(func_80242C1C_C497FC)(ScriptInstance *script, NpcAISettings *aiSettings, npc->rotation.y -= 360.0; } temp_f8_2 = 255.0f - (cosine((s32)npc->rotation.y % 180) * 56.0f); - func_802DE894(npc->unk_24, 6, temp_f8_2, temp_f8_2, temp_f8_2, 255, 0); - + func_802DE894(npc->spriteInstanceID, 6, temp_f8_2, temp_f8_2, temp_f8_2, 255, 0); + posX = (*playerStatus)->position.x; posY = (*playerStatus)->position.y; posZ = (*playerStatus)->position.z; @@ -1623,7 +1623,7 @@ void N(func_80242EB8_C49A98)(ScriptInstance *script, NpcAISettings *aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); enemy->varTable[0] &= ~0x100; - func_802DE894(npc->unk_24, 0, 0, 0, 0, 0, 0); + func_802DE894(npc->spriteInstanceID, 0, 0, 0, 0, 0, 0); if (enemy->varTable[0] & 0x1000) { sfx_stop_sound(0x80000011); enemy->varTable[0] &= ~0x1000; @@ -1728,7 +1728,7 @@ void N(func_80243260_C49E40)(ScriptInstance *script, NpcAISettings *aiSettings, } script->functionTemp[1].s--; - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); npc_move_heading(npc, npc->moveSpeed, npc->yaw); posW = dist2D(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); @@ -1764,7 +1764,7 @@ ApiStatus N(func_80243578_C4A158)(ScriptInstance *script, s32 isInitialCall) { switch (script->functionTemp[0].s) { case 0: N(func_80241424_C48004)(script, aiSettings, territoryPtr); - func_802DE894(npc->unk_24, 0, 0, 0, 0, 0, 0); + func_802DE894(npc->spriteInstanceID, 0, 0, 0, 0, 0, 0); case 1: N(func_802415D4_C481B4)(script, aiSettings, territoryPtr); if (script->functionTemp[0].s == 12) { diff --git a/src/world/area_dgb/dgb_15/C4F510.c b/src/world/area_dgb/dgb_15/C4F510.c index beaf1a7a7d..a435912a97 100644 --- a/src/world/area_dgb/dgb_15/C4F510.c +++ b/src/world/area_dgb/dgb_15/C4F510.c @@ -329,7 +329,7 @@ NpcAISettings N(npcAISettings_8024271C) = { Script N(npcAI_8024274C) = SCRIPT({ spawn N(80242184); - SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_200)), TRUE); + SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_GRAVITY)), TRUE); SetNpcAnimation(NPC_WORLD_TUBBA, NPC_ANIM(world_tubba, Palette_00, Anim_C)); spawn N(802424E8); N(func_80241464_C50974)(N(npcAISettings_8024271C)); @@ -362,7 +362,7 @@ StaticNpc N(npcGroup_802428C0) = { .id = NPC_WORLD_TUBBA, .settings = &N(npcSettings_8024212C), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_40000 | NPC_FLAG_200000 | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_40000 | NPC_FLAG_200000 | NPC_FLAG_NO_DROPS, .init = &N(init_802427EC), .yaw = 270, .dropFlags = 0x80, @@ -523,17 +523,17 @@ ApiStatus N(update_starpoints_display_C4F8CC)(ScriptInstance *script, s32 isInit } posX = npc2->pos.x; posZ = npc2->pos.z; - add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->unk_34); - + add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->renderYaw); + npc->pos.x = posX; enemy->unk_10.x = npc->pos.x; npc->pos.y = npc2->pos.y + enemy->varTable[0]; enemy->unk_10.y = npc->pos.y; - + npc->pos.z = posZ; enemy->unk_10.z = npc->pos.z; - + npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z); enemy->flags &= 0xE0EFFFFF; npc->duration = 0; @@ -556,7 +556,7 @@ ApiStatus N(update_starpoints_display_C4F8CC)(ScriptInstance *script, s32 isInit enemy->unk_07 = func; script->functionTemp[0].s = 0; } - break; + break; } return ApiStatus_BLOCK; @@ -705,13 +705,13 @@ void N(func_80240A28_C4FF38)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[1].s--; } - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { if (npc->moveSpeed < 4.0) { func_8003D660(npc, 0); } else { func_8003D660(npc, 1); } - + x = script->functionTemp[2].s[enemy->territory->patrol.points].x; z = script->functionTemp[2].s[enemy->territory->patrol.points].z; npc->yaw = atan2(npc->pos.x, npc->pos.z, x, z); @@ -719,7 +719,7 @@ void N(func_80240A28_C4FF38)(ScriptInstance* script, NpcAISettings* aiSettings, if (dist2D(npc->pos.x, npc->pos.z, x, z) <= npc->moveSpeed) { script->functionTemp[0].s = 2; script->functionTemp[1].s = (rand_int(1000) % 3) + 2; - if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || + if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || (aiSettings->waitTime <= 0) || (script->functionTemp[1].s == 0)) { script->functionTemp[0].s = 4; } @@ -746,7 +746,7 @@ void N(func_80240D90_C502A0)(ScriptInstance* script, NpcAISettings* aiSettings, } else { script->functionTemp[0].s = 10; } - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration == 0) { script->functionTemp[1].s--; diff --git a/src/world/area_dgb/dgb_16/C52540.c b/src/world/area_dgb/dgb_16/C52540.c index 9393ede7ed..d9fa448153 100644 --- a/src/world/area_dgb/dgb_16/C52540.c +++ b/src/world/area_dgb/dgb_16/C52540.c @@ -200,7 +200,7 @@ StaticNpc N(npcGroup_80241A4C)[] = { .id = NPC_WORLD_CLUBBA0, .settings = &N(npcSettings_8024194C), .pos = { -70.0f, 0.0f, -100.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .yaw = 270, .dropFlags = 0x80, .itemDropChance = 5, @@ -237,7 +237,7 @@ StaticNpc N(npcGroup_80241A4C)[] = { .id = NPC_WORLD_CLUBBA1, .settings = &N(npcSettings_80241A20), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -269,7 +269,7 @@ StaticNpc N(npcGroup_80241E2C)[] = { .id = NPC_WORLD_CLUBBA2, .settings = &N(npcSettings_8024194C), .pos = { 0.0f, 0.0f, -235.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .yaw = 90, .dropFlags = 0x80, .itemDropChance = 5, @@ -305,7 +305,7 @@ StaticNpc N(npcGroup_80241E2C)[] = { .id = NPC_WORLD_CLUBBA3, .settings = &N(npcSettings_80241A20), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -337,7 +337,7 @@ StaticNpc N(npcGroup_8024220C)[] = { .id = NPC_WORLD_CLUBBA4, .settings = &N(npcSettings_8024194C), .pos = { 70.0f, 0.0f, -100.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .yaw = 90, .dropFlags = 0x80, .itemDropChance = 5, @@ -373,7 +373,7 @@ StaticNpc N(npcGroup_8024220C)[] = { .id = NPC_WORLD_CLUBBA5, .settings = &N(npcSettings_80241A20), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -405,7 +405,7 @@ StaticNpc N(npcGroup_802425EC)[] = { .id = NPC_WORLD_CLUBBA6, .settings = &N(npcSettings_8024194C), .pos = { 140.0f, 0.0f, -235.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .yaw = 270, .dropFlags = 0x80, .itemDropChance = 5, @@ -441,7 +441,7 @@ StaticNpc N(npcGroup_802425EC)[] = { .id = NPC_WORLD_CLUBBA7, .settings = &N(npcSettings_80241A20), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -473,7 +473,7 @@ StaticNpc N(npcGroup_802429CC)[] = { .id = NPC_WORLD_CLUBBA8, .settings = &N(npcSettings_8024194C), .pos = { 210.0f, 0.0f, -100.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .yaw = 270, .dropFlags = 0x80, .itemDropChance = 5, @@ -509,7 +509,7 @@ StaticNpc N(npcGroup_802429CC)[] = { .id = NPC_WORLD_CLUBBA9, .settings = &N(npcSettings_80241A20), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -541,7 +541,7 @@ StaticNpc N(npcGroup_80242DAC)[] = { .id = NPC_WORLD_CLUBBA10, .settings = &N(npcSettings_8024194C), .pos = { 280.0f, 0.0f, -235.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT, .yaw = 90, .dropFlags = 0x80, .itemDropChance = 5, @@ -577,7 +577,7 @@ StaticNpc N(npcGroup_80242DAC)[] = { .id = NPC_WORLD_CLUBBA11, .settings = &N(npcSettings_80241A20), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_DROPS, .yaw = 0, .dropFlags = 0x80, .heartDrops = NO_DROPS, @@ -693,17 +693,17 @@ ApiStatus N(update_starpoints_display_C528FC)(ScriptInstance *script, s32 isInit } posX = npc2->pos.x; posZ = npc2->pos.z; - add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->unk_34); - + add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->renderYaw); + npc->pos.x = posX; enemy->unk_10.x = npc->pos.x; npc->pos.y = npc2->pos.y + enemy->varTable[0]; enemy->unk_10.y = npc->pos.y; - + npc->pos.z = posZ; enemy->unk_10.z = npc->pos.z; - + npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z); enemy->flags &= 0xE0EFFFFF; npc->duration = 0; @@ -726,7 +726,7 @@ ApiStatus N(update_starpoints_display_C528FC)(ScriptInstance *script, s32 isInit enemy->unk_07 = func; script->functionTemp[0].s = 0; } - break; + break; } return ApiStatus_BLOCK; @@ -758,10 +758,10 @@ void N(func_802406A4_C52BE4)(ScriptInstance *script, NpcAISettings *aiSettings, f32 posX, posZ; if (func_800490B4(territory, enemy, 80.0f, 0.0f, 0)) { - if ((gPlayerStatusPtr->actionState == 2) || (gPlayerStatusPtr->actionState == 26) || - (gPlayerStatusPtr->actionState == 3) || (gPlayerStatusPtr->actionState == 14) || - (gPlayerStatusPtr->actionState == 16) || (gPlayerStatusPtr->actionState == 11) || - (gPlayerStatusPtr->actionState == 10) || (gPlayerStatusPtr->actionState == 18) || + if ((gPlayerStatusPtr->actionState == 2) || (gPlayerStatusPtr->actionState == 26) || + (gPlayerStatusPtr->actionState == 3) || (gPlayerStatusPtr->actionState == 14) || + (gPlayerStatusPtr->actionState == 16) || (gPlayerStatusPtr->actionState == 11) || + (gPlayerStatusPtr->actionState == 10) || (gPlayerStatusPtr->actionState == 18) || (gPlayerStatusPtr->actionState == 19) || (gPlayerStatusPtr->actionState == 37)) { phi_s2 = TRUE; } @@ -773,7 +773,7 @@ void N(func_802406A4_C52BE4)(ScriptInstance *script, NpcAISettings *aiSettings, } } - if (((playerData->currentPartner == 1) && (D_8010EBB0.unk_00 != 0)) || + if (((playerData->currentPartner == 1) && (D_8010EBB0.unk_00 != 0)) || ((playerData->currentPartner == 3) && (D_8010EBB0.unk_00 == 2))) { posX = npc->pos.x; posZ = npc->pos.z; @@ -887,7 +887,7 @@ void N(func_80240C4C_C5318C)(ScriptInstance *script, NpcAISettings *aiSettings, npc->duration = 15; enemy->varTable[7] = 50; script->functionTemp[0].s = 3; - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { var = npc->yaw; func_8004A784(npc, 5.0f, &var, 0, 0, 0); npc->yaw = var; @@ -900,7 +900,7 @@ void N(func_80240DC4_C53304)(ScriptInstance *script, NpcAISettings *aiSettings, Enemy* enemy = script->owner1.enemy; Npc *npc = get_npc_unsafe(enemy->npcID); - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration <= 0) { npc->duration = 0; diff --git a/src/world/area_dgb/dgb_18/C55F40.c b/src/world/area_dgb/dgb_18/C55F40.c index 8944f79dca..471f69a0e2 100644 --- a/src/world/area_dgb/dgb_18/C55F40.c +++ b/src/world/area_dgb/dgb_18/C55F40.c @@ -571,7 +571,7 @@ StaticNpc N(npcGroup_802432D4) = { .id = NPC_WORLD_TUBBA, .settings = &N(npcSettings_802415FC), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_40000 | NPC_FLAG_200000 | NPC_FLAG_NO_DROPS, + .flags = NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_40000 | NPC_FLAG_200000 | NPC_FLAG_NO_DROPS, .init = &N(init_80242924), .yaw = 270, .dropFlags = 0x80, @@ -602,7 +602,7 @@ StaticNpc N(npcGroup_802434C4) = { .id = NPC_YAKKEY, .settings = &N(npcSettings_80241628), .pos = { 0.0f, -1000.0f, 0.0f }, - .flags = NPC_FLAG_PASSIVE | NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_PASSIVE | NPC_FLAG_NO_Y_MOVEMENT, .init = &N(init_8024329C), .yaw = 270, .dropFlags = 0x80, @@ -742,13 +742,13 @@ void N(func_80240158_C56098)(ScriptInstance* script, NpcAISettings* aiSettings, script->functionTemp[1].s--; } - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { if (npc->moveSpeed < 4.0) { func_8003D660(npc, 0); } else { func_8003D660(npc, 1); } - + x = script->functionTemp[2].s[enemy->territory->patrol.points].x; z = script->functionTemp[2].s[enemy->territory->patrol.points].z; npc->yaw = atan2(npc->pos.x, npc->pos.z, x, z); @@ -756,7 +756,7 @@ void N(func_80240158_C56098)(ScriptInstance* script, NpcAISettings* aiSettings, if (dist2D(npc->pos.x, npc->pos.z, x, z) <= npc->moveSpeed) { script->functionTemp[0].s = 2; script->functionTemp[1].s = (rand_int(1000) % 3) + 2; - if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || + if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || (aiSettings->waitTime <= 0) || (script->functionTemp[1].s == 0)) { script->functionTemp[0].s = 4; } @@ -783,7 +783,7 @@ void N(func_802404C0_C56400)(ScriptInstance* script, NpcAISettings* aiSettings, } else { script->functionTemp[0].s = 10; } - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration == 0) { script->functionTemp[1].s--; diff --git a/src/world/area_dro/dro_01/95B7E0.c b/src/world/area_dro/dro_01/95B7E0.c index dea37dbe7f..a007ffbfae 100644 --- a/src/world/area_dro/dro_01/95B7E0.c +++ b/src/world/area_dro/dro_01/95B7E0.c @@ -270,7 +270,7 @@ INCLUDE_ASM(s32, "world/area_dro/dro_01/95B7E0", func_80242784_95D984); /* ApiStatus N(func_80242784_95D984)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - + D_80241CD0_BE0A60 = get_variable(script, *args); D_80241CCC_BE0A5C = 1; return ApiStatus_DONE2; diff --git a/src/world/area_flo/flo_09/CB5320.c b/src/world/area_flo/flo_09/CB5320.c index bd1e63308c..f73a25dedb 100644 --- a/src/world/area_flo/flo_09/CB5320.c +++ b/src/world/area_flo/flo_09/CB5320.c @@ -7,9 +7,9 @@ void N(func_80240320_CB5320)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_flo/flo_13/CC3850.c b/src/world/area_flo/flo_13/CC3850.c index 9515408a6c..944992fec4 100644 --- a/src/world/area_flo/flo_13/CC3850.c +++ b/src/world/area_flo/flo_13/CC3850.c @@ -9,9 +9,9 @@ void N(func_802401C4_CC39D4)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_flo/flo_14/CCBE20.c b/src/world/area_flo/flo_14/CCBE20.c index 38eb86ae55..96199c885e 100644 --- a/src/world/area_flo/flo_14/CCBE20.c +++ b/src/world/area_flo/flo_14/CCBE20.c @@ -7,9 +7,9 @@ void N(func_80240B10_CCBE20)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { @@ -150,7 +150,7 @@ INCLUDE_ASM(s32, "world/area_flo/flo_14/CCBE20", func_80242288_CCD598); /* ApiStatus N(func_80242288_CCD598)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - + D_80241CD0_BE0A60 = get_variable(script, *args); D_80241CCC_BE0A5C = 1; return ApiStatus_DONE2; diff --git a/src/world/area_flo/flo_16/CD2C80.c b/src/world/area_flo/flo_16/CD2C80.c index 45aed5d233..144f226d14 100644 --- a/src/world/area_flo/flo_16/CD2C80.c +++ b/src/world/area_flo/flo_16/CD2C80.c @@ -7,9 +7,9 @@ void N(func_80240E50_CD2C80)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_flo/flo_17/CD7350.c b/src/world/area_flo/flo_17/CD7350.c index dac12b7548..ae0514b679 100644 --- a/src/world/area_flo/flo_17/CD7350.c +++ b/src/world/area_flo/flo_17/CD7350.c @@ -7,9 +7,9 @@ void N(func_80240070_CD7350)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_flo/flo_25/CF2C10.c b/src/world/area_flo/flo_25/CF2C10.c index 52cc2a550e..54711c3276 100644 --- a/src/world/area_flo/flo_25/CF2C10.c +++ b/src/world/area_flo/flo_25/CF2C10.c @@ -7,9 +7,9 @@ void N(func_80240040_CF2C10)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { @@ -219,7 +219,7 @@ INCLUDE_ASM(s32, "world/area_flo/flo_25/CF2C10", func_80241DAC_CF497C); /* ApiStatus N(func_80241DAC_CF497C)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - + D_80241CD0_BE0A60 = get_variable(script, *args); D_80241CCC_BE0A5C = 1; return ApiStatus_DONE2; diff --git a/src/world/area_hos/hos_02/A17210.c b/src/world/area_hos/hos_02/A17210.c index ee8f9e1761..5a586859c0 100644 --- a/src/world/area_hos/hos_02/A17210.c +++ b/src/world/area_hos/hos_02/A17210.c @@ -7,9 +7,9 @@ void N(func_80240FF0_A17210)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index 7a5e8f017a..3958f1e255 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -9,9 +9,9 @@ void N(func_80240CB0_A1BDB0)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_jan/jan_02/B2C8A0.c b/src/world/area_jan/jan_02/B2C8A0.c index cc35ec5ffe..a9c422734e 100644 --- a/src/world/area_jan/jan_02/B2C8A0.c +++ b/src/world/area_jan/jan_02/B2C8A0.c @@ -197,7 +197,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241540_B2D9B0); /* ApiStatus N(func_80241540_B2D9B0)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - + D_80241CD0_BE0A60 = get_variable(script, *args); D_80241CCC_BE0A5C = 1; return ApiStatus_DONE2; diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index bd27605320..b135d484e3 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -235,7 +235,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241A2C_B365FC); /* ApiStatus N(func_80241A2C_B365FC)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - + D_80241CD0_BE0A60 = get_variable(script, *args); D_80241CCC_BE0A5C = 1; return ApiStatus_DONE2; diff --git a/src/world/area_kmr/kmr_03/8C8140.c b/src/world/area_kmr/kmr_03/8C8140.c index f8e1a0782f..6a6f64cb0b 100644 --- a/src/world/area_kmr/kmr_03/8C8140.c +++ b/src/world/area_kmr/kmr_03/8C8140.c @@ -175,7 +175,7 @@ Script N(hit_80240F64) = SCRIPT({ sleep 10; GetNpcPos(NPC_GOOMPA, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetNpcPos(NPC_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); - SetNpcFlagBits(NPC_PARTNER, NPC_FLAG_200, TRUE); + SetNpcFlagBits(NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE); SetNpcPos(NPC_GOOMPA, 0, -1000, 0); SetNpcFlagBits(NPC_GOOMPA, NPC_FLAG_100, FALSE); EnablePartnerAI(); @@ -190,7 +190,7 @@ Script N(init_802411A8) = SCRIPT({ BindNpcHit(-1, N(hit_80240F64)); match STORY_PROGRESS { >= STORY_CH0_GOOMPA_JOINED_PARTY { - SetNpcFlagBits(NPC_SELF, NPC_FLAG_200, FALSE); + SetNpcFlagBits(NPC_SELF, NPC_FLAG_GRAVITY, FALSE); SetNpcFlagBits(NPC_SELF, NPC_FLAG_ENABLE_HIT_SCRIPT, TRUE); SetNpcPos(NPC_SELF, 0, -1000, 0); } diff --git a/src/world/area_kmr/kmr_05/8CE070.c b/src/world/area_kmr/kmr_05/8CE070.c index bd50e711ba..a1173c5b7b 100644 --- a/src/world/area_kmr/kmr_05/8CE070.c +++ b/src/world/area_kmr/kmr_05/8CE070.c @@ -7,9 +7,9 @@ void N(func_80240000_8CE070)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_kmr/kmr_06/8D1510.c b/src/world/area_kmr/kmr_06/8D1510.c index 72d405088d..aa6b77dcef 100644 --- a/src/world/area_kmr/kmr_06/8D1510.c +++ b/src/world/area_kmr/kmr_06/8D1510.c @@ -7,9 +7,9 @@ void N(func_80240000_8D1510)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_kmr/kmr_09/8D5E00.c b/src/world/area_kmr/kmr_09/8D5E00.c index b7af7e9ce0..c03c6d50ad 100644 --- a/src/world/area_kmr/kmr_09/8D5E00.c +++ b/src/world/area_kmr/kmr_09/8D5E00.c @@ -7,9 +7,9 @@ void N(func_80240000_8D5E00)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_kzn/kzn_02/C5AC20.c b/src/world/area_kzn/kzn_02/C5AC20.c index ada4e7d827..9d10789a10 100644 --- a/src/world/area_kzn/kzn_02/C5AC20.c +++ b/src/world/area_kzn/kzn_02/C5AC20.c @@ -7,9 +7,9 @@ void N(func_802404E0_C5AC20)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { @@ -246,7 +246,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80242364_C5CAA4); /* ApiStatus N(func_80242364_C5CAA4)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - + D_80241CD0_BE0A60 = get_variable(script, *args); D_80241CCC_BE0A5C = 1; return ApiStatus_DONE2; diff --git a/src/world/area_kzn/kzn_07/C6EA50.c b/src/world/area_kzn/kzn_07/C6EA50.c index 472c8fcd98..a1c5adfdf0 100644 --- a/src/world/area_kzn/kzn_07/C6EA50.c +++ b/src/world/area_kzn/kzn_07/C6EA50.c @@ -11,9 +11,9 @@ void N(func_80240820_C6EB50)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_kzn/kzn_08/C71ED0.c b/src/world/area_kzn/kzn_08/C71ED0.c index 86828e7ec3..bd36a5e782 100644 --- a/src/world/area_kzn/kzn_08/C71ED0.c +++ b/src/world/area_kzn/kzn_08/C71ED0.c @@ -7,9 +7,9 @@ void N(func_80240A50_C71ED0)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_kzn/kzn_11/C80600.c b/src/world/area_kzn/kzn_11/C80600.c index df1ff44334..71a572bbd2 100644 --- a/src/world/area_kzn/kzn_11/C80600.c +++ b/src/world/area_kzn/kzn_11/C80600.c @@ -7,9 +7,9 @@ void N(func_80240460_C80600)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_mac/mac_00/7ED280.c b/src/world/area_mac/mac_00/7ED280.c index f43a9fb6f5..dff4182bdb 100644 --- a/src/world/area_mac/mac_00/7ED280.c +++ b/src/world/area_mac/mac_00/7ED280.c @@ -228,7 +228,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243798_7EE4A8); /* ApiStatus N(func_80243798_7EE4A8)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - + D_80241CD0_BE0A60 = get_variable(script, *args); D_80241CCC_BE0A5C = 1; return ApiStatus_DONE2; diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index a77b872b77..b63fac90b3 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -320,7 +320,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80243D28_8045A8); /* ApiStatus N(func_80243D28_8045A8)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - + D_80241CD0_BE0A60 = get_variable(script, *args); D_80241CCC_BE0A5C = 1; return ApiStatus_DONE2; @@ -398,11 +398,11 @@ void func_802454B4_805D34(void) { } ApiStatus func_80245504_805D84(ScriptInstance* script, s32 isInitialCall) { - set_parter_tether_distance(20.0f); + set_partner_tether_distance(20.0f); return ApiStatus_DONE2; } ApiStatus func_8024552C_805DAC(ScriptInstance* script, s32 isInitialCall) { - reset_parter_tether_distance(); + reset_partner_tether_distance(); return ApiStatus_DONE2; } diff --git a/src/world/area_mac/mac_02/823BF0.c b/src/world/area_mac/mac_02/823BF0.c index cc37e0d29a..2aa5e10e64 100644 --- a/src/world/area_mac/mac_02/823BF0.c +++ b/src/world/area_mac/mac_02/823BF0.c @@ -270,7 +270,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_80242AD4_825D94); /* ApiStatus N(func_80242AD4_825D94)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - + D_80241CD0_BE0A60 = get_variable(script, *args); D_80241CCC_BE0A5C = 1; return ApiStatus_DONE2; diff --git a/src/world/area_mac/mac_05/852170.c b/src/world/area_mac/mac_05/852170.c index 7a05fc3f7a..7986d9dfea 100644 --- a/src/world/area_mac/mac_05/852170.c +++ b/src/world/area_mac/mac_05/852170.c @@ -278,7 +278,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80242634_8547A4); /* ApiStatus N(func_80242634_8547A4)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - + D_80241CD0_BE0A60 = get_variable(script, *args); D_80241CCC_BE0A5C = 1; return ApiStatus_DONE2; diff --git a/src/world/area_mim/mim_08/BAD940.c b/src/world/area_mim/mim_08/BAD940.c index 43aa493b60..41eed23c1f 100644 --- a/src/world/area_mim/mim_08/BAD940.c +++ b/src/world/area_mim/mim_08/BAD940.c @@ -11,9 +11,9 @@ void N(func_802400A0_BAD9E0)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_nok/nok_02/9D7AA0.c b/src/world/area_nok/nok_02/9D7AA0.c index ea43d866ce..625a7f8022 100644 --- a/src/world/area_nok/nok_02/9D7AA0.c +++ b/src/world/area_nok/nok_02/9D7AA0.c @@ -270,7 +270,7 @@ INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80242C24_9D9C44); /* ApiStatus N(func_80242C24_9D9C44)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - + D_80241CD0_BE0A60 = get_variable(script, *args); D_80241CCC_BE0A5C = 1; return ApiStatus_DONE2; diff --git a/src/world/area_nok/nok_11/9F4A40.c b/src/world/area_nok/nok_11/9F4A40.c index 25be028398..ec028d3573 100644 --- a/src/world/area_nok/nok_11/9F4A40.c +++ b/src/world/area_nok/nok_11/9F4A40.c @@ -17,9 +17,9 @@ void N(func_802407D4_9F5214)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_nok/nok_14/A02A00.c b/src/world/area_nok/nok_14/A02A00.c index c0105b6d17..b82710b8fe 100644 --- a/src/world/area_nok/nok_14/A02A00.c +++ b/src/world/area_nok/nok_14/A02A00.c @@ -17,9 +17,9 @@ void N(func_80240994_A031D4)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_nok/nok_15/A06F00.c b/src/world/area_nok/nok_15/A06F00.c index 165eac508c..15acc60fce 100644 --- a/src/world/area_nok/nok_15/A06F00.c +++ b/src/world/area_nok/nok_15/A06F00.c @@ -29,9 +29,9 @@ void N(func_80240AB4_A079B4)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_omo/omo_04/DAD400.c b/src/world/area_omo/omo_04/DAD400.c index 52d92926fa..e5c67b5926 100644 --- a/src/world/area_omo/omo_04/DAD400.c +++ b/src/world/area_omo/omo_04/DAD400.c @@ -44,9 +44,9 @@ void N(func_802403A0_DAD7A0)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_omo/omo_05/DB22C0.c b/src/world/area_omo/omo_05/DB22C0.c index 1225225410..548f31f07f 100644 --- a/src/world/area_omo/omo_05/DB22C0.c +++ b/src/world/area_omo/omo_05/DB22C0.c @@ -23,9 +23,9 @@ void N(func_80240A54_DB2D14)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { @@ -166,7 +166,7 @@ INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_802421CC_DB448C); /* ApiStatus N(func_802421CC_DB448C)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - + D_80241CD0_BE0A60 = get_variable(script, *args); D_80241CCC_BE0A5C = 1; return ApiStatus_DONE2; diff --git a/src/world/area_omo/omo_07/DBD2B0.c b/src/world/area_omo/omo_07/DBD2B0.c index 797b419f0e..c52610660c 100644 --- a/src/world/area_omo/omo_07/DBD2B0.c +++ b/src/world/area_omo/omo_07/DBD2B0.c @@ -191,9 +191,9 @@ void N(func_80241978_DBEC28)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_omo/omo_17/DEF400.c b/src/world/area_omo/omo_17/DEF400.c index e0a4cbc71c..d899bfad66 100644 --- a/src/world/area_omo/omo_17/DEF400.c +++ b/src/world/area_omo/omo_17/DEF400.c @@ -23,9 +23,9 @@ void N(func_80240FB4_DEFE54)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_sam/sam_06/D203E0.c b/src/world/area_sam/sam_06/D203E0.c index a74312e035..424d5e7c0c 100644 --- a/src/world/area_sam/sam_06/D203E0.c +++ b/src/world/area_sam/sam_06/D203E0.c @@ -7,9 +7,9 @@ void N(func_80240550_D203E0)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { @@ -177,7 +177,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241DE0_D21C70); /* ApiStatus N(func_80241DE0_D21C70)(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - + D_80241CD0_BE0A60 = get_variable(script, *args); D_80241CCC_BE0A5C = 1; return ApiStatus_DONE2; diff --git a/src/world/area_sbk/sbk_00/9292B0.c b/src/world/area_sbk/sbk_00/9292B0.c index 2a4684a356..15c9da1d51 100644 --- a/src/world/area_sbk/sbk_00/9292B0.c +++ b/src/world/area_sbk/sbk_00/9292B0.c @@ -34,7 +34,7 @@ StaticNpc N(npcGroup_80240388) = { .id = 0, .settings = &N(npcSettings_8024035C), .pos = { -40.0f, 0.0f, 160.0f }, - .flags = NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_NO_Y_MOVEMENT, .yaw = 90, .dropFlags = 0x80, .itemDropChance = 15, @@ -71,7 +71,7 @@ StaticNpc N(npcGroup_80240578) = { .id = 1, .settings = &N(npcSettings_8024035C), .pos = { 245.0f, 0.0f, 75.0f }, - .flags = NPC_FLAG_IGNORE_HEIGHT, + .flags = NPC_FLAG_NO_Y_MOVEMENT, .yaw = 270, .dropFlags = 0x80, .itemDropChance = 15, diff --git a/src/world/area_sbk/sbk_01/929AD0.c b/src/world/area_sbk/sbk_01/929AD0.c index 061cc319b6..259df1b214 100644 --- a/src/world/area_sbk/sbk_01/929AD0.c +++ b/src/world/area_sbk/sbk_01/929AD0.c @@ -34,7 +34,7 @@ StaticNpc N(npcGroup_802403F8) = { .id = 0, .settings = &N(npcSettings_802403CC), .pos = { 205.0f, 0.0f, -60.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_PROJECT_SHADOW, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_PROJECT_SHADOW, .yaw = 90, .dropFlags = 0x80, .itemDropChance = 15, @@ -71,7 +71,7 @@ StaticNpc N(npcGroup_802405E8) = { .id = 1, .settings = &N(npcSettings_802403CC), .pos = { -200.0f, 0.0f, 180.0f }, - .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_IGNORE_HEIGHT | NPC_FLAG_NO_PROJECT_SHADOW, + .flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_Y_MOVEMENT | NPC_FLAG_NO_PROJECT_SHADOW, .yaw = 270, .dropFlags = 0x80, .itemDropChance = 15, diff --git a/src/world/area_tik/tik_07/87AC00.c b/src/world/area_tik/tik_07/87AC00.c index bd8327e219..b2fb951864 100644 --- a/src/world/area_tik/tik_07/87AC00.c +++ b/src/world/area_tik/tik_07/87AC00.c @@ -11,9 +11,9 @@ void N(func_802413F0_87AFD0)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_trd/trd_04/9A88A0.c b/src/world/area_trd/trd_04/9A88A0.c index c0ad02a43f..eaa6677e3b 100644 --- a/src/world/area_trd/trd_04/9A88A0.c +++ b/src/world/area_trd/trd_04/9A88A0.c @@ -183,9 +183,9 @@ void N(func_80241E18_9AA208)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/area_trd/trd_07/9B6C90.c b/src/world/area_trd/trd_07/9B6C90.c index b093dd7909..afe14da320 100644 --- a/src/world/area_trd/trd_07/9B6C90.c +++ b/src/world/area_trd/trd_07/9B6C90.c @@ -17,9 +17,9 @@ void N(func_80240AE4_9B7464)(ScriptInstance* script, NpcAISettings* aiSettings, Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = aiSettings->moveTime / 2 + rand_int(aiSettings->moveTime / 2 + 1); - if (is_point_within_region(enemy->territory->wander.wanderShape, - enemy->territory->wander.point.x, enemy->territory->wander.point.z, - npc->pos.x, npc->pos.z, + if (is_point_within_region(enemy->territory->wander.wanderShape, + enemy->territory->wander.point.x, enemy->territory->wander.point.z, + npc->pos.x, npc->pos.z, enemy->territory->wander.wanderSizeX, enemy->territory->wander.wanderSizeZ)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); } else { diff --git a/src/world/common/UnkFunc13.inc.c b/src/world/common/UnkFunc13.inc.c index 48fe029399..cbd19b9b9a 100644 --- a/src/world/common/UnkFunc13.inc.c +++ b/src/world/common/UnkFunc13.inc.c @@ -24,13 +24,13 @@ void N(UnkFunc13)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerrit script->functionTemp[1].s--; } - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { if (npc->moveSpeed < 4.0) { func_8003D660(npc, 0); } else { func_8003D660(npc, 1); } - + x = script->functionTemp[2].s[enemy->territory->patrol.points].x; z = script->functionTemp[2].s[enemy->territory->patrol.points].z; npc->yaw = atan2(npc->pos.x, npc->pos.z, x, z); @@ -38,7 +38,7 @@ void N(UnkFunc13)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerrit if (dist2D(npc->pos.x, npc->pos.z, x, z) <= npc->moveSpeed) { script->functionTemp[0].s = 2; script->functionTemp[1].s = (rand_int(1000) % 3) + 2; - if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || + if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || (aiSettings->waitTime <= 0) || (script->functionTemp[1].s == 0)) { script->functionTemp[0].s = 4; } @@ -47,4 +47,4 @@ void N(UnkFunc13)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerrit } } } -} \ No newline at end of file +} diff --git a/src/world/common/UnkFunc13_copy.inc.c b/src/world/common/UnkFunc13_copy.inc.c index 47fd291c54..173a061129 100644 --- a/src/world/common/UnkFunc13_copy.inc.c +++ b/src/world/common/UnkFunc13_copy.inc.c @@ -24,13 +24,13 @@ void N(UnkFunc13_copy)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyT script->functionTemp[1].s--; } - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { if (npc->moveSpeed < 4.0) { func_8003D660(npc, 0); } else { func_8003D660(npc, 1); } - + x = script->functionTemp[2].s[enemy->territory->patrol.points].x; z = script->functionTemp[2].s[enemy->territory->patrol.points].z; npc->yaw = atan2(npc->pos.x, npc->pos.z, x, z); @@ -38,7 +38,7 @@ void N(UnkFunc13_copy)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyT if (dist2D(npc->pos.x, npc->pos.z, x, z) <= npc->moveSpeed) { script->functionTemp[0].s = 2; script->functionTemp[1].s = (rand_int(1000) % 3) + 2; - if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || + if ((aiSettings->unk_2C <= 0) || (aiSettings->moveTime <= 0) || (aiSettings->waitTime <= 0) || (script->functionTemp[1].s == 0)) { script->functionTemp[0].s = 4; } diff --git a/src/world/common/UnkFunc14.inc.c b/src/world/common/UnkFunc14.inc.c index b41b2e3eb2..fac377c838 100644 --- a/src/world/common/UnkFunc14.inc.c +++ b/src/world/common/UnkFunc14.inc.c @@ -15,7 +15,7 @@ void N(UnkFunc14)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerrit } else { script->functionTemp[0].s = 10; } - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration == 0) { script->functionTemp[1].s--; @@ -29,4 +29,4 @@ void N(UnkFunc14)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerrit } } } -} \ No newline at end of file +} diff --git a/src/world/common/UnkFunc14_copy.inc.c b/src/world/common/UnkFunc14_copy.inc.c index b08a81001b..a64e9f6f1d 100644 --- a/src/world/common/UnkFunc14_copy.inc.c +++ b/src/world/common/UnkFunc14_copy.inc.c @@ -15,7 +15,7 @@ void N(UnkFunc14_copy)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyT } else { script->functionTemp[0].s = 10; } - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { npc->duration--; if (npc->duration == 0) { script->functionTemp[1].s--; diff --git a/src/world/common/UnkFunc4.inc.c b/src/world/common/UnkFunc4.inc.c index 5f4a0a3e1c..1e2ae1f8fd 100644 --- a/src/world/common/UnkFunc4.inc.c +++ b/src/world/common/UnkFunc4.inc.c @@ -53,7 +53,7 @@ void N(UnkFunc4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerrito enemy->varTable[9]--; } - if ((npc->unk_8C == 0) && (npc->duration <= 0)) { + if ((npc->turnAroundYawAdjustment == 0) && (npc->duration <= 0)) { script->functionTemp[1].s--; if (script->functionTemp[1].s > 0) { if (!(enemy->npcSettings->unk_2A & 0x10)) { @@ -64,4 +64,4 @@ void N(UnkFunc4)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerrito script->functionTemp[0].s = 0; } } -} \ No newline at end of file +} diff --git a/src/world/common/UnkFunc7.inc.c b/src/world/common/UnkFunc7.inc.c index c71657d13e..ea1af22732 100644 --- a/src/world/common/UnkFunc7.inc.c +++ b/src/world/common/UnkFunc7.inc.c @@ -34,17 +34,17 @@ ApiStatus N(UnkFunc7)(ScriptInstance *script, s32 isInitialCall) { } posX = npc2->pos.x; posZ = npc2->pos.z; - add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->unk_34); - + add_vec2D_polar(&posX, &posZ, enemy->varTable[1], 270.0f - npc2->renderYaw); + npc->pos.x = posX; enemy->unk_10.x = npc->pos.x; npc->pos.y = npc2->pos.y + enemy->varTable[0]; enemy->unk_10.y = npc->pos.y; - + npc->pos.z = posZ; enemy->unk_10.z = npc->pos.z; - + npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z); enemy->flags &= 0xE0EFFFFF; npc->duration = 0; @@ -67,8 +67,8 @@ ApiStatus N(UnkFunc7)(ScriptInstance *script, s32 isInitialCall) { enemy->unk_07 = func; script->functionTemp[0].s = 0; } - break; + break; } return ApiStatus_BLOCK; -} \ No newline at end of file +} diff --git a/src/world/common/UnkFunc9.inc.c b/src/world/common/UnkFunc9.inc.c index e4b884cffa..815e30f3e9 100644 --- a/src/world/common/UnkFunc9.inc.c +++ b/src/world/common/UnkFunc9.inc.c @@ -12,8 +12,8 @@ void N(UnkFunc9)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerrito } else if (dist2D(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z) <= npc->moveSpeed) { npc->duration = 10; script->functionTemp[0].s = 50; - } else if (npc->unk_8C == 0) { + } else if (npc->turnAroundYawAdjustment == 0) { npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z); npc_move_heading(npc, npc->moveSpeed, npc->yaw); } -} \ No newline at end of file +} diff --git a/src/world/common/UnkNpcAIFunc19.inc.c b/src/world/common/UnkNpcAIFunc19.inc.c index 8a602a8afa..7d54a4cf86 100644 --- a/src/world/common/UnkNpcAIFunc19.inc.c +++ b/src/world/common/UnkNpcAIFunc19.inc.c @@ -9,7 +9,7 @@ void N(UnkNpcAIFunc19)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyT npc->duration--; } - if (npc->unk_8C == 0 && npc->duration <= 0) { + if (npc->turnAroundYawAdjustment == 0 && npc->duration <= 0) { npc->duration = 8; npc->currentAnim = enemy->animList[11]; script->functionTemp[0].s = 51; diff --git a/src/world/common/UnkNpcAIFunc3.inc.c b/src/world/common/UnkNpcAIFunc3.inc.c index ac9c7cbca0..9255e8d0d2 100644 --- a/src/world/common/UnkNpcAIFunc3.inc.c +++ b/src/world/common/UnkNpcAIFunc3.inc.c @@ -5,7 +5,7 @@ void N(UnkNpcAIFunc3)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTe Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); if ((npc->duration <= 0) || (--npc->duration <= 0)) { - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { npc->duration = 0; script->functionTemp[0].s = 14; } diff --git a/src/world/common/UnkNpcAIFunc6.inc.c b/src/world/common/UnkNpcAIFunc6.inc.c index 16b4bdc18a..9f97ae50bf 100644 --- a/src/world/common/UnkNpcAIFunc6.inc.c +++ b/src/world/common/UnkNpcAIFunc6.inc.c @@ -6,7 +6,7 @@ void N(UnkNpcAIFunc6)(ScriptInstance* script) { Npc* npc = get_npc_unsafe(enemy->npcID); enemy->varTable[0] = 1; - if (npc->unk_8C == 0) { + if (npc->turnAroundYawAdjustment == 0) { enemy->varTable[0] = 2; npc->duration = enemy->varTable[1]; npc->currentAnim = enemy->animList[8]; diff --git a/src/world/partners.c b/src/world/partners.c index e095d306db..e5a0fca05b 100644 --- a/src/world/partners.c +++ b/src/world/partners.c @@ -658,11 +658,11 @@ void enable_partner_ai(void) { } } -void set_parter_tether_distance(f32 arg0) { +void set_partner_tether_distance(f32 arg0) { D_8010CFC0 = arg0; } -void reset_parter_tether_distance(void) { +void reset_partner_tether_distance(void) { D_8010CFC0 = 40.0f; } diff --git a/src/world/script_api/7E2AA0.c b/src/world/script_api/7E2AA0.c index 186149630e..b525f972d5 100644 --- a/src/world/script_api/7E2AA0.c +++ b/src/world/script_api/7E2AA0.c @@ -26,13 +26,13 @@ ApiStatus func_80281C20(ScriptInstance* script, s32 isInitialCall) { Bytecode* thisPos = script->ptrReadPos; func_800EF414(get_variable(script, *thisPos++), get_variable(script, *thisPos++)); - set_parter_tether_distance(0.0f); + set_partner_tether_distance(0.0f); return ApiStatus_DONE2; } ApiStatus func_80281C84(ScriptInstance* script, s32 isInitialCall) { func_800EF3E4(); - reset_parter_tether_distance(); + reset_partner_tether_distance(); return ApiStatus_DONE2; } diff --git a/src/world/script_api/7E4690.c b/src/world/script_api/7E4690.c index 320a018fc5..dd13ed3b85 100644 --- a/src/world/script_api/7E4690.c +++ b/src/world/script_api/7E4690.c @@ -72,12 +72,12 @@ INCLUDE_ASM(s32, "world/script_api/7E4690", func_80283908); INCLUDE_ASM(s32, "world/script_api/7E4690", func_80283A50); ApiStatus func_80283B88(ScriptInstance* script, s32 isInitialCall) { - set_parter_tether_distance(20.0f); + set_partner_tether_distance(20.0f); return ApiStatus_DONE2; } ApiStatus func_80283BB0(ScriptInstance* script, s32 isInitialCall) { - reset_parter_tether_distance(); + reset_partner_tether_distance(); return ApiStatus_DONE2; } diff --git a/tools/mv_segment.py b/tools/mv_segment.py new file mode 100755 index 0000000000..aa613e9250 --- /dev/null +++ b/tools/mv_segment.py @@ -0,0 +1,37 @@ +#!/usr/bin/python3 + +import argparse +import os +from pathlib import Path + +parser = argparse.ArgumentParser() +parser.add_argument("src") +parser.add_argument("dest") +args = parser.parse_args() + +# make dirs +Path(f"src/{args.dest}.c").parent.mkdir(parents=True, exist_ok=True) +Path(f"ver/current/asm/nonmatchings/{args.dest}").parent.mkdir(parents=True, exist_ok=True) +Path(f"ver/current/asm/data/{args.dest}").parent.mkdir(parents=True, exist_ok=True) + +if os.path.exists(f"src/{args.src}.c"): + print("moving c file") + os.rename(f"src/{args.src}.c", f"src/{args.dest}.c") + + with open(f"src/{args.dest}.c") as f: + content = f.read() + + with open(f"src/{args.dest}.c", "w") as f: + f.write(content.replace(f'"{args.src}"', f'"{args.dest}"')) + +if os.path.exists(f"ver/current/asm/nonmatchings/{args.src}"): + print("moving asm/nonmatchings files") + os.rename(f"ver/current/asm/nonmatchings/{args.src}", f"ver/current/asm/nonmatchings/{args.dest}") + +if os.path.exists(f"ver/current/asm/data/{args.src}.data.s"): + print("moving data file") + os.rename(f"ver/current/asm/data/{args.src}.data.s", f"ver/current/asm/data/{args.dest}.data.s") + +if os.path.exists(f"ver/current/asm/data/{args.src}.rodata.s"): + print("moving rodata file") + os.rename(f"ver/current/asm/data/{args.src}.rodata.s", f"ver/current/asm/data/{args.dest}.rodata.s") diff --git a/tools/permuter_settings.toml b/tools/permuter_settings.toml new file mode 100644 index 0000000000..8745de1363 --- /dev/null +++ b/tools/permuter_settings.toml @@ -0,0 +1,5 @@ +compiler_command = "cpp -w -Iver/us/build/include -Iinclude -Isrc -DPERMUTER -D _LANGUAGE_C -D _FINALROM -D VERSION=us -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=32 -D SCRIPT(...)={} | iconv --from UTF-8 --to SHIFT-JIS | tools/build/linux/cc1 -O2 -quiet -G 0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -Wuninitialized -Wshadow -o - | tools/build/linux/mips-nintendo-nu64-as -EB -G 0 -" +assembler_command = "mips-linux-gnu-as -march=vr4300 -mabi=32" + +[preserve_macros] +"g[DS]P.*" = "void" diff --git a/ver/us/asm/data/E23690.data.s b/ver/us/asm/data/E23690.data.s deleted file mode 100644 index c83a6cd122..0000000000 --- a/ver/us/asm/data/E23690.data.s +++ /dev/null @@ -1,6 +0,0 @@ -.include "macro.inc" - -.section .data - -glabel D_802B6430_E23690 -.word 0x000A0001, 0x000A0007, 0x000A0009, 0x000A000B, 0x000A000D, 0x000A000F, 0x000A0011, 0x000A0013, 0x000A0015, 0x000A0017, 0x000A0019, 0x000A001B, 0x000A001D, 0x000A001F, 0x000A0021, 0x000A0023, 0x000A0025, 0x000A0027, 0x000A0029, 0x00000000 diff --git a/ver/us/asm/data/E248D0.data.s b/ver/us/asm/data/world/action/18.data.s similarity index 100% rename from ver/us/asm/data/E248D0.data.s rename to ver/us/asm/data/world/action/18.data.s diff --git a/ver/us/asm/data/E25C80.data.s b/ver/us/asm/data/world/action/hammer.data.s similarity index 100% rename from ver/us/asm/data/E25C80.data.s rename to ver/us/asm/data/world/action/hammer.data.s diff --git a/ver/us/asm/data/E2B420.data.s b/ver/us/asm/data/world/action/sneaky_parasol.data.s similarity index 100% rename from ver/us/asm/data/E2B420.data.s rename to ver/us/asm/data/world/action/sneaky_parasol.data.s diff --git a/ver/us/asm/data/E2A690.data.s b/ver/us/asm/data/world/action/use_tweester.data.s similarity index 100% rename from ver/us/asm/data/E2A690.data.s rename to ver/us/asm/data/world/action/use_tweester.data.s diff --git a/ver/us/asm/data/E23FF0.data.s b/ver/us/asm/data/world/action/walk.data.s similarity index 100% rename from ver/us/asm/data/E23FF0.data.s rename to ver/us/asm/data/world/action/walk.data.s diff --git a/ver/us/asm/nonmatchings/182B30/func_80255FE0.s b/ver/us/asm/nonmatchings/182B30/func_80255FE0.s index d4b13457ed..d73a2bb4c9 100644 --- a/ver/us/asm/nonmatchings/182B30/func_80255FE0.s +++ b/ver/us/asm/nonmatchings/182B30/func_80255FE0.s @@ -656,7 +656,7 @@ glabel func_80255FE0 /* 185258 80256978 8E240084 */ lw $a0, 0x84($s1) /* 18525C 8025697C 8E260090 */ lw $a2, 0x90($s1) /* 185260 80256980 0040282D */ daddu $a1, $v0, $zero -/* 185264 80256984 0C0B78AB */ jal func_802DE2AC +/* 185264 80256984 0C0B78AB */ jal spr_update_sprite /* 185268 80256988 AE250088 */ sw $a1, 0x88($s1) .L8025698C: /* 18526C 8025698C 0240202D */ daddu $a0, $s2, $zero @@ -955,7 +955,7 @@ glabel func_80255FE0 /* 185688 80256DA8 8E250088 */ lw $a1, 0x88($s1) /* 18568C 80256DAC 13C50006 */ beq $fp, $a1, .L80256DC8 /* 185690 80256DB0 00000000 */ nop -/* 185694 80256DB4 0C0B78AB */ jal func_802DE2AC +/* 185694 80256DB4 0C0B78AB */ jal spr_update_sprite /* 185698 80256DB8 8E260090 */ lw $a2, 0x90($s1) /* 18569C 80256DBC 0C0B7972 */ jal func_802DE5C8 /* 1856A0 80256DC0 8E240084 */ lw $a0, 0x84($s1) diff --git a/ver/us/asm/nonmatchings/182B30/update_actor_shadow.s b/ver/us/asm/nonmatchings/182B30/update_actor_shadow.s index f174ce3caa..9e7c1f2392 100644 --- a/ver/us/asm/nonmatchings/182B30/update_actor_shadow.s +++ b/ver/us/asm/nonmatchings/182B30/update_actor_shadow.s @@ -95,7 +95,7 @@ glabel update_actor_shadow /* 1843F0 80255B10 04800007 */ bltz $a0, .L80255B30 /* 1843F4 80255B14 00000000 */ nop /* 1843F8 80255B18 8E050088 */ lw $a1, 0x88($s0) -/* 1843FC 80255B1C 0C0B78AB */ jal func_802DE2AC +/* 1843FC 80255B1C 0C0B78AB */ jal spr_update_sprite /* 184400 80255B20 8E060090 */ lw $a2, 0x90($s0) /* 184404 80255B24 0C0B7972 */ jal func_802DE5C8 /* 184408 80255B28 8E040084 */ lw $a0, 0x84($s0) diff --git a/ver/us/asm/nonmatchings/18C790/func_8025E044.s b/ver/us/asm/nonmatchings/18C790/func_8025E044.s index 7b43c8f7b9..d6e2038e79 100644 --- a/ver/us/asm/nonmatchings/18C790/func_8025E044.s +++ b/ver/us/asm/nonmatchings/18C790/func_8025E044.s @@ -11,7 +11,7 @@ glabel func_8025E044 /* 18C93C 8025E05C 0C0B5059 */ jal func_802D4164 /* 18C940 8025E060 3C11FFFF */ lui $s1, 0xffff /* 18C944 8025E064 8C440000 */ lw $a0, ($v0) -/* 18C948 8025E068 0C048B77 */ jal func_80122DDC +/* 18C948 8025E068 0C048B77 */ jal get_entity_model /* 18C94C 8025E06C 3631000F */ ori $s1, $s1, 0xf /* 18C950 8025E070 0040202D */ daddu $a0, $v0, $zero /* 18C954 8025E074 8C820000 */ lw $v0, ($a0) @@ -20,7 +20,7 @@ glabel func_8025E044 /* 18C960 8025E080 AC820000 */ sw $v0, ($a0) /* 18C964 8025E084 0C0B5059 */ jal func_802D4164 /* 18C968 8025E088 8E0400A0 */ lw $a0, 0xa0($s0) -/* 18C96C 8025E08C 0C048B77 */ jal func_80122DDC +/* 18C96C 8025E08C 0C048B77 */ jal get_entity_model /* 18C970 8025E090 8C440000 */ lw $a0, ($v0) /* 18C974 8025E094 0040202D */ daddu $a0, $v0, $zero /* 18C978 8025E098 8C820000 */ lw $v0, ($a0) @@ -29,7 +29,7 @@ glabel func_8025E044 /* 18C984 8025E0A4 AC820000 */ sw $v0, ($a0) /* 18C988 8025E0A8 0C0B5059 */ jal func_802D4164 /* 18C98C 8025E0AC 8E0400A4 */ lw $a0, 0xa4($s0) -/* 18C990 8025E0B0 0C048B77 */ jal func_80122DDC +/* 18C990 8025E0B0 0C048B77 */ jal get_entity_model /* 18C994 8025E0B4 8C440000 */ lw $a0, ($v0) /* 18C998 8025E0B8 0040202D */ daddu $a0, $v0, $zero /* 18C99C 8025E0BC 8C820000 */ lw $v0, ($a0) @@ -38,7 +38,7 @@ glabel func_8025E044 /* 18C9A8 8025E0C8 AC820000 */ sw $v0, ($a0) /* 18C9AC 8025E0CC 0C0B5059 */ jal func_802D4164 /* 18C9B0 8025E0D0 8E0400A8 */ lw $a0, 0xa8($s0) -/* 18C9B4 8025E0D4 0C048B77 */ jal func_80122DDC +/* 18C9B4 8025E0D4 0C048B77 */ jal get_entity_model /* 18C9B8 8025E0D8 8C440000 */ lw $a0, ($v0) /* 18C9BC 8025E0DC 0040202D */ daddu $a0, $v0, $zero /* 18C9C0 8025E0E0 8C830000 */ lw $v1, ($a0) diff --git a/ver/us/asm/nonmatchings/18C790/func_8025E108.s b/ver/us/asm/nonmatchings/18C790/func_8025E108.s index 37d1824d89..1d63f65f02 100644 --- a/ver/us/asm/nonmatchings/18C790/func_8025E108.s +++ b/ver/us/asm/nonmatchings/18C790/func_8025E108.s @@ -6,7 +6,7 @@ glabel func_8025E108 /* 18C9EC 8025E10C AFBF0010 */ sw $ra, 0x10($sp) /* 18C9F0 8025E110 0C0B5059 */ jal func_802D4164 /* 18C9F4 8025E114 8C8400A8 */ lw $a0, 0xa8($a0) -/* 18C9F8 8025E118 0C048B77 */ jal func_80122DDC +/* 18C9F8 8025E118 0C048B77 */ jal get_entity_model /* 18C9FC 8025E11C 8C440000 */ lw $a0, ($v0) /* 18CA00 8025E120 3C05FFFF */ lui $a1, 0xffff /* 18CA04 8025E124 0040202D */ daddu $a0, $v0, $zero diff --git a/ver/us/asm/nonmatchings/190B20/func_80263E08.s b/ver/us/asm/nonmatchings/190B20/func_80263E08.s index 390240fa99..a03f419e93 100644 --- a/ver/us/asm/nonmatchings/190B20/func_80263E08.s +++ b/ver/us/asm/nonmatchings/190B20/func_80263E08.s @@ -39,7 +39,7 @@ glabel func_80263E08 /* 192764 80263E84 00000000 */ nop /* 192768 80263E88 8E040084 */ lw $a0, 0x84($s0) /* 19276C 80263E8C 8E060090 */ lw $a2, 0x90($s0) -/* 192770 80263E90 0C0B78AB */ jal func_802DE2AC +/* 192770 80263E90 0C0B78AB */ jal spr_update_sprite /* 192774 80263E94 AE050088 */ sw $a1, 0x88($s0) /* 192778 80263E98 8E040084 */ lw $a0, 0x84($s0) /* 19277C 80263E9C 0C0B7972 */ jal func_802DE5C8 diff --git a/ver/us/asm/nonmatchings/190B20/set_animation.s b/ver/us/asm/nonmatchings/190B20/set_animation.s index 545e521fd5..3812c1c773 100644 --- a/ver/us/asm/nonmatchings/190B20/set_animation.s +++ b/ver/us/asm/nonmatchings/190B20/set_animation.s @@ -62,7 +62,7 @@ glabel set_animation /* 1926A8 80263DC8 0240282D */ daddu $a1, $s2, $zero /* 1926AC 80263DCC 8E040084 */ lw $a0, 0x84($s0) /* 1926B0 80263DD0 8E060090 */ lw $a2, 0x90($s0) -/* 1926B4 80263DD4 0C0B78AB */ jal func_802DE2AC +/* 1926B4 80263DD4 0C0B78AB */ jal spr_update_sprite /* 1926B8 80263DD8 AE050088 */ sw $a1, 0x88($s0) /* 1926BC 80263DDC 8E040084 */ lw $a0, 0x84($s0) /* 1926C0 80263DE0 0C0B7972 */ jal func_802DE5C8 diff --git a/ver/us/asm/nonmatchings/77480/check_for_interactables.s b/ver/us/asm/nonmatchings/77480/check_for_interactables.s index 34074024c7..7af278ff41 100644 --- a/ver/us/asm/nonmatchings/77480/check_for_interactables.s +++ b/ver/us/asm/nonmatchings/77480/check_for_interactables.s @@ -166,7 +166,7 @@ glabel L800E09C0_79E70 /* 79F00 800E0A50 00000000 */ nop /* 79F04 800E0A54 0C03BCF5 */ jal func_800EF3D4 /* 79F08 800E0A58 0000202D */ daddu $a0, $zero, $zero -/* 79F0C 800E0A5C 0C03BCE9 */ jal reset_parter_tether_distance +/* 79F0C 800E0A5C 0C03BCE9 */ jal reset_partner_tether_distance /* 79F10 800E0A60 00000000 */ nop /* 79F14 800E0A64 080382AD */ j .L800E0AB4 /* 79F18 800E0A68 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/77480/func_800DFD48.s b/ver/us/asm/nonmatchings/77480/func_800DFD48.s index 75a72b5f3f..4d196cf065 100644 --- a/ver/us/asm/nonmatchings/77480/func_800DFD48.s +++ b/ver/us/asm/nonmatchings/77480/func_800DFD48.s @@ -89,9 +89,9 @@ glabel func_800DFD48 /* 79324 800DFE74 00031040 */ sll $v0, $v1, 1 /* 79328 800DFE78 00431021 */ addu $v0, $v0, $v1 /* 7932C 800DFE7C 000210C0 */ sll $v0, $v0, 3 -/* 79330 800DFE80 3C04800F */ lui $a0, %hi(D_800F7C30) +/* 79330 800DFE80 3C04800F */ lui $a0, %hi(world_actions_peachDisguises+0x14) /* 79334 800DFE84 00822021 */ addu $a0, $a0, $v0 -/* 79338 800DFE88 8C847C30 */ lw $a0, %lo(D_800F7C30)($a0) +/* 79338 800DFE88 8C847C30 */ lw $a0, %lo(world_actions_peachDisguises+0x14)($a0) /* 7933C 800DFE8C 0C0398DB */ jal func_800E636C /* 79340 800DFE90 00000000 */ nop /* 79344 800DFE94 08037FBB */ j .L800DFEEC diff --git a/ver/us/asm/nonmatchings/7bb60_len_41b0/make_disguise_npc.s b/ver/us/asm/nonmatchings/7bb60_len_41b0/make_disguise_npc.s index 15f5196414..2d38eb7ee4 100644 --- a/ver/us/asm/nonmatchings/7bb60_len_41b0/make_disguise_npc.s +++ b/ver/us/asm/nonmatchings/7bb60_len_41b0/make_disguise_npc.s @@ -29,9 +29,9 @@ glabel make_disguise_npc /* 7FA88 800E65D8 00031040 */ sll $v0, $v1, 1 /* 7FA8C 800E65DC 00431021 */ addu $v0, $v0, $v1 /* 7FA90 800E65E0 000210C0 */ sll $v0, $v0, 3 -/* 7FA94 800E65E4 3C01800F */ lui $at, %hi(D_800F7C1C) +/* 7FA94 800E65E4 3C01800F */ lui $at, %hi(world_actions_peachDisguises) /* 7FA98 800E65E8 00220821 */ addu $at, $at, $v0 -/* 7FA9C 800E65EC 8C227C1C */ lw $v0, %lo(D_800F7C1C)($at) +/* 7FA9C 800E65EC 8C227C1C */ lw $v0, %lo(world_actions_peachDisguises)($at) /* 7FAA0 800E65F0 00031880 */ sll $v1, $v1, 2 /* 7FAA4 800E65F4 AFA00018 */ sw $zero, 0x18($sp) /* 7FAA8 800E65F8 AFA0001C */ sw $zero, 0x1c($sp) diff --git a/ver/us/asm/nonmatchings/E23260/func_802B6000_E23260.s b/ver/us/asm/nonmatchings/E23260/func_802B6000_E23260.s deleted file mode 100644 index 058c329cff..0000000000 --- a/ver/us/asm/nonmatchings/E23260/func_802B6000_E23260.s +++ /dev/null @@ -1,136 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802B6000_E23260 -/* E23260 802B6000 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* E23264 802B6004 AFB1001C */ sw $s1, 0x1c($sp) -/* E23268 802B6008 AFB00018 */ sw $s0, 0x18($sp) -/* E2326C 802B600C 3C108011 */ lui $s0, %hi(gPlayerStatus) -/* E23270 802B6010 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus) -/* E23274 802B6014 AFBF0024 */ sw $ra, 0x24($sp) -/* E23278 802B6018 AFB20020 */ sw $s2, 0x20($sp) -/* E2327C 802B601C F7B40028 */ sdc1 $f20, 0x28($sp) -/* E23280 802B6020 8E040004 */ lw $a0, 4($s0) -/* E23284 802B6024 3C128011 */ lui $s2, %hi(gPlayerData) -/* E23288 802B6028 2652F290 */ addiu $s2, $s2, %lo(gPlayerData) -/* E2328C 802B602C 30821000 */ andi $v0, $a0, 0x1000 -/* E23290 802B6030 10400005 */ beqz $v0, .L802B6048 -/* E23294 802B6034 0000882D */ daddu $s1, $zero, $zero -/* E23298 802B6038 0C0AD879 */ jal func_802B61E4_E23444 -/* E2329C 802B603C 00000000 */ nop -/* E232A0 802B6040 080AD872 */ j .L802B61C8 -/* E232A4 802B6044 00000000 */ nop -.L802B6048: -/* E232A8 802B6048 96020008 */ lhu $v0, 8($s0) -/* E232AC 802B604C 8E030000 */ lw $v1, ($s0) -/* E232B0 802B6050 24420001 */ addiu $v0, $v0, 1 -/* E232B4 802B6054 0461001E */ bgez $v1, .L802B60D0 -/* E232B8 802B6058 A6020008 */ sh $v0, 8($s0) -/* E232BC 802B605C 3C027FF7 */ lui $v0, 0x7ff7 -/* E232C0 802B6060 3442FFF1 */ ori $v0, $v0, 0xfff1 -/* E232C4 802B6064 24110001 */ addiu $s1, $zero, 1 -/* E232C8 802B6068 00621024 */ and $v0, $v1, $v0 -/* E232CC 802B606C AE020000 */ sw $v0, ($s0) -/* E232D0 802B6070 30824000 */ andi $v0, $a0, 0x4000 -/* E232D4 802B6074 A20000B6 */ sb $zero, 0xb6($s0) -/* E232D8 802B6078 A6000008 */ sh $zero, 8($s0) -/* E232DC 802B607C A60000C0 */ sh $zero, 0xc0($s0) -/* E232E0 802B6080 A60000C2 */ sh $zero, 0xc2($s0) -/* E232E4 802B6084 AE000054 */ sw $zero, 0x54($s0) -/* E232E8 802B6088 10400004 */ beqz $v0, .L802B609C -/* E232EC 802B608C AE00008C */ sw $zero, 0x8c($s0) -/* E232F0 802B6090 3C040009 */ lui $a0, 9 -/* E232F4 802B6094 080AD832 */ j .L802B60C8 -/* E232F8 802B6098 34840002 */ ori $a0, $a0, 2 -.L802B609C: -/* E232FC 802B609C 30820001 */ andi $v0, $a0, 1 -/* E23300 802B60A0 54400004 */ bnel $v0, $zero, .L802B60B4 -/* E23304 802B60A4 3C040006 */ lui $a0, 6 -/* E23308 802B60A8 3C040001 */ lui $a0, 1 -/* E2330C 802B60AC 080AD832 */ j .L802B60C8 -/* E23310 802B60B0 34840002 */ ori $a0, $a0, 2 -.L802B60B4: -/* E23314 802B60B4 820200B5 */ lb $v0, 0xb5($s0) -/* E23318 802B60B8 14400003 */ bnez $v0, .L802B60C8 -/* E2331C 802B60BC 34840007 */ ori $a0, $a0, 7 -/* E23320 802B60C0 3C040006 */ lui $a0, 6 -/* E23324 802B60C4 34840005 */ ori $a0, $a0, 5 -.L802B60C8: -/* E23328 802B60C8 0C037FBF */ jal func_800DFEFC -/* E2332C 802B60CC 00000000 */ nop -.L802B60D0: -/* E23330 802B60D0 8E020004 */ lw $v0, 4($s0) -/* E23334 802B60D4 30420200 */ andi $v0, $v0, 0x200 -/* E23338 802B60D8 10400005 */ beqz $v0, .L802B60F0 -/* E2333C 802B60DC 27A40010 */ addiu $a0, $sp, 0x10 -/* E23340 802B60E0 0C039769 */ jal set_action_state -/* E23344 802B60E4 2404001C */ addiu $a0, $zero, 0x1c -/* E23348 802B60E8 080AD872 */ j .L802B61C8 -/* E2334C 802B60EC 00000000 */ nop -.L802B60F0: -/* E23350 802B60F0 0C0388C1 */ jal input_to_move_vector -/* E23354 802B60F4 27A50014 */ addiu $a1, $sp, 0x14 -/* E23358 802B60F8 0C039454 */ jal func_800E5150 -/* E2335C 802B60FC 00000000 */ nop -/* E23360 802B6100 0C039858 */ jal check_input_jump -/* E23364 802B6104 00000000 */ nop -/* E23368 802B6108 10400011 */ beqz $v0, .L802B6150 -/* E2336C 802B610C 00000000 */ nop -/* E23370 802B6110 C7A20014 */ lwc1 $f2, 0x14($sp) -/* E23374 802B6114 44800000 */ mtc1 $zero, $f0 -/* E23378 802B6118 00000000 */ nop -/* E2337C 802B611C 46001032 */ c.eq.s $f2, $f0 -/* E23380 802B6120 00000000 */ nop -/* E23384 802B6124 45000007 */ bc1f .L802B6144 -/* E23388 802B6128 00000000 */ nop -/* E2338C 802B612C C6020080 */ lwc1 $f2, 0x80($s0) -/* E23390 802B6130 C7A00010 */ lwc1 $f0, 0x10($sp) -/* E23394 802B6134 46001032 */ c.eq.s $f2, $f0 -/* E23398 802B6138 00000000 */ nop -/* E2339C 802B613C 45010022 */ bc1t .L802B61C8 -/* E233A0 802B6140 00000000 */ nop -.L802B6144: -/* E233A4 802B6144 C7A00010 */ lwc1 $f0, 0x10($sp) -/* E233A8 802B6148 080AD872 */ j .L802B61C8 -/* E233AC 802B614C E6000080 */ swc1 $f0, 0x80($s0) -.L802B6150: -/* E233B0 802B6150 16200005 */ bnez $s1, .L802B6168 -/* E233B4 802B6154 00000000 */ nop -/* E233B8 802B6158 0C039838 */ jal check_input_hammer -/* E233BC 802B615C 00000000 */ nop -/* E233C0 802B6160 14400019 */ bnez $v0, .L802B61C8 -/* E233C4 802B6164 00000000 */ nop -.L802B6168: -/* E233C8 802B6168 C7A00014 */ lwc1 $f0, 0x14($sp) -/* E233CC 802B616C 4480A000 */ mtc1 $zero, $f20 -/* E233D0 802B6170 00000000 */ nop -/* E233D4 802B6174 46140032 */ c.eq.s $f0, $f20 -/* E233D8 802B6178 00000000 */ nop -/* E233DC 802B617C 45000005 */ bc1f .L802B6194 -/* E233E0 802B6180 24040001 */ addiu $a0, $zero, 1 -/* E233E4 802B6184 964202B8 */ lhu $v0, 0x2b8($s2) -/* E233E8 802B6188 24420001 */ addiu $v0, $v0, 1 -/* E233EC 802B618C 080AD872 */ j .L802B61C8 -/* E233F0 802B6190 A64202B8 */ sh $v0, 0x2b8($s2) -.L802B6194: -/* E233F4 802B6194 0C039769 */ jal set_action_state -/* E233F8 802B6198 A6000008 */ sh $zero, 8($s0) -/* E233FC 802B619C C7A00014 */ lwc1 $f0, 0x14($sp) -/* E23400 802B61A0 46140032 */ c.eq.s $f0, $f20 -/* E23404 802B61A4 00000000 */ nop -/* E23408 802B61A8 45010007 */ bc1t .L802B61C8 -/* E2340C 802B61AC 3C037FFF */ lui $v1, 0x7fff -/* E23410 802B61B0 3463FFFF */ ori $v1, $v1, 0xffff -/* E23414 802B61B4 8E020004 */ lw $v0, 4($s0) -/* E23418 802B61B8 C7A00010 */ lwc1 $f0, 0x10($sp) -/* E2341C 802B61BC 00431024 */ and $v0, $v0, $v1 -/* E23420 802B61C0 E6000080 */ swc1 $f0, 0x80($s0) -/* E23424 802B61C4 AE020004 */ sw $v0, 4($s0) -.L802B61C8: -/* E23428 802B61C8 8FBF0024 */ lw $ra, 0x24($sp) -/* E2342C 802B61CC 8FB20020 */ lw $s2, 0x20($sp) -/* E23430 802B61D0 8FB1001C */ lw $s1, 0x1c($sp) -/* E23434 802B61D4 8FB00018 */ lw $s0, 0x18($sp) -/* E23438 802B61D8 D7B40028 */ ldc1 $f20, 0x28($sp) -/* E2343C 802B61DC 03E00008 */ jr $ra -/* E23440 802B61E0 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/asm/nonmatchings/F5750/func_802D3028.s b/ver/us/asm/nonmatchings/F5750/func_802D3028.s index ea31c0d5f3..d5b0dbc43f 100644 --- a/ver/us/asm/nonmatchings/F5750/func_802D3028.s +++ b/ver/us/asm/nonmatchings/F5750/func_802D3028.s @@ -39,7 +39,7 @@ glabel func_802D3028 /* F7A5C 802D30AC 8E040000 */ lw $a0, ($s0) /* F7A60 802D30B0 0482003A */ bltzl $a0, .L802D319C /* F7A64 802D30B4 26520001 */ addiu $s2, $s2, 1 -/* F7A68 802D30B8 0C048B77 */ jal func_80122DDC +/* F7A68 802D30B8 0C048B77 */ jal get_entity_model /* F7A6C 802D30BC 00000000 */ nop /* F7A70 802D30C0 8C420000 */ lw $v0, ($v0) /* F7A74 802D30C4 30420008 */ andi $v0, $v0, 8 diff --git a/ver/us/asm/nonmatchings/F5750/func_802D31E0.s b/ver/us/asm/nonmatchings/F5750/func_802D31E0.s index 41d3f0a216..3d7573c8b9 100644 --- a/ver/us/asm/nonmatchings/F5750/func_802D31E0.s +++ b/ver/us/asm/nonmatchings/F5750/func_802D31E0.s @@ -39,7 +39,7 @@ glabel func_802D31E0 /* F7C14 802D3264 8E040000 */ lw $a0, ($s0) /* F7C18 802D3268 0482003A */ bltzl $a0, .L802D3354 /* F7C1C 802D326C 26520001 */ addiu $s2, $s2, 1 -/* F7C20 802D3270 0C048B77 */ jal func_80122DDC +/* F7C20 802D3270 0C048B77 */ jal get_entity_model /* F7C24 802D3274 00000000 */ nop /* F7C28 802D3278 8C420000 */ lw $v0, ($v0) /* F7C2C 802D327C 30420008 */ andi $v0, $v0, 8 diff --git a/ver/us/asm/nonmatchings/F5750/func_802D3F74.s b/ver/us/asm/nonmatchings/F5750/func_802D3F74.s index d185671ab8..f66618c776 100644 --- a/ver/us/asm/nonmatchings/F5750/func_802D3F74.s +++ b/ver/us/asm/nonmatchings/F5750/func_802D3F74.s @@ -15,7 +15,7 @@ glabel func_802D3F74 /* F894C 802D3F9C 00431021 */ addu $v0, $v0, $v1 /* F8950 802D3FA0 8C420000 */ lw $v0, ($v0) /* F8954 802D3FA4 8C440000 */ lw $a0, ($v0) -/* F8958 802D3FA8 0C048B77 */ jal func_80122DDC +/* F8958 802D3FA8 0C048B77 */ jal get_entity_model /* F895C 802D3FAC 8E100000 */ lw $s0, ($s0) /* F8960 802D3FB0 AC500000 */ sw $s0, ($v0) /* F8964 802D3FB4 8FBF0014 */ lw $ra, 0x14($sp) diff --git a/ver/us/asm/nonmatchings/F5750/func_802D4050.s b/ver/us/asm/nonmatchings/F5750/func_802D4050.s index 71e679c55c..aa388eb781 100644 --- a/ver/us/asm/nonmatchings/F5750/func_802D4050.s +++ b/ver/us/asm/nonmatchings/F5750/func_802D4050.s @@ -30,7 +30,7 @@ glabel func_802D4050 /* F8A48 802D4098 8E030000 */ lw $v1, ($s0) /* F8A4C 802D409C 26310004 */ addiu $s1, $s1, 4 /* F8A50 802D40A0 8C640000 */ lw $a0, ($v1) -/* F8A54 802D40A4 0C048B77 */ jal func_80122DDC +/* F8A54 802D40A4 0C048B77 */ jal get_entity_model /* F8A58 802D40A8 0040802D */ daddu $s0, $v0, $zero /* F8A5C 802D40AC 0040182D */ daddu $v1, $v0, $zero /* F8A60 802D40B0 26100001 */ addiu $s0, $s0, 1 diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/render_entities.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/render_entities.s index dfa9167e01..4ddf9276c0 100644 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/render_entities.s +++ b/ver/us/asm/nonmatchings/a5dd0_len_114e0/render_entities.s @@ -113,7 +113,7 @@ glabel render_entities /* A673C 8011003C 08044019 */ j .L80110064 /* A6740 80110040 92050004 */ lbu $a1, 4($s0) .L80110044: -/* A6744 80110044 0C048B77 */ jal func_80122DDC +/* A6744 80110044 0C048B77 */ jal get_entity_model /* A6748 80110048 86040014 */ lh $a0, 0x14($s0) /* A674C 8011004C 0804401B */ j .L8011006C /* A6750 80110050 AC400060 */ sw $zero, 0x60($v0) diff --git a/ver/us/asm/nonmatchings/fee30_len_2d60/func_802DE2AC.s b/ver/us/asm/nonmatchings/fee30_len_2d60/func_802DE2AC.s index 41f595a422..9c5d2298d7 100644 --- a/ver/us/asm/nonmatchings/fee30_len_2d60/func_802DE2AC.s +++ b/ver/us/asm/nonmatchings/fee30_len_2d60/func_802DE2AC.s @@ -1,7 +1,7 @@ .set noat # allow manual use of $at .set noreorder # don't insert nops after branches -glabel func_802DE2AC +glabel spr_update_sprite /* 10139C 802DE2AC 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 1013A0 802DE2B0 AFB5002C */ sw $s5, 0x2c($sp) /* 1013A4 802DE2B4 0080A82D */ daddu $s5, $a0, $zero diff --git a/ver/us/asm/nonmatchings/npc/func_8003C444.s b/ver/us/asm/nonmatchings/npc/func_8003C444.s index 525ca66839..e35a486ae3 100644 --- a/ver/us/asm/nonmatchings/npc/func_8003C444.s +++ b/ver/us/asm/nonmatchings/npc/func_8003C444.s @@ -8,7 +8,7 @@ glabel D_800984E0 .section .text -glabel func_8003C444 +glabel npc_update_decorations /* 17844 8003C444 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 17848 8003C448 AFB10014 */ sw $s1, 0x14($sp) /* 1784C 8003C44C 0080882D */ daddu $s1, $a0, $zero diff --git a/ver/us/asm/nonmatchings/npc/npc_list_update.s b/ver/us/asm/nonmatchings/npc/npc_list_update.s index 359513f92e..d9e9cabee7 100644 --- a/ver/us/asm/nonmatchings/npc/npc_list_update.s +++ b/ver/us/asm/nonmatchings/npc/npc_list_update.s @@ -138,7 +138,7 @@ glabel npc_list_update /* 14F24 80039B24 0C044181 */ jal get_shadow_by_index /* 14F28 80039B28 8E040078 */ lw $a0, 0x78($s0) /* 14F2C 80039B2C 84440008 */ lh $a0, 8($v0) -/* 14F30 80039B30 0C048B77 */ jal func_80122DDC +/* 14F30 80039B30 0C048B77 */ jal get_entity_model /* 14F34 80039B34 0040882D */ daddu $s1, $v0, $zero /* 14F38 80039B38 0040202D */ daddu $a0, $v0, $zero /* 14F3C 80039B3C 8C430000 */ lw $v1, ($v0) diff --git a/ver/us/asm/nonmatchings/pause/135EE0/pause_handle_input.s b/ver/us/asm/nonmatchings/pause/135EE0/pause_handle_input.s index 22b0ea6d98..853130f808 100644 --- a/ver/us/asm/nonmatchings/pause/135EE0/pause_handle_input.s +++ b/ver/us/asm/nonmatchings/pause/135EE0/pause_handle_input.s @@ -37,7 +37,7 @@ glabel pause_handle_input /* 1377E0 802444A0 8E250004 */ lw $a1, 4($s1) /* 1377E4 802444A4 26310010 */ addiu $s1, $s1, 0x10 /* 1377E8 802444A8 3C063F80 */ lui $a2, 0x3f80 -/* 1377EC 802444AC 0C0B78AB */ jal func_802DE2AC +/* 1377EC 802444AC 0C0B78AB */ jal spr_update_sprite /* 1377F0 802444B0 26100001 */ addiu $s0, $s0, 1 /* 1377F4 802444B4 2A020003 */ slti $v0, $s0, 3 /* 1377F8 802444B8 1440FFF7 */ bnez $v0, .L80244498 diff --git a/ver/us/asm/nonmatchings/pause/13E120/pause_partners_update.s b/ver/us/asm/nonmatchings/pause/13E120/pause_partners_update.s index 2f14341306..0a7c0ca2c9 100644 --- a/ver/us/asm/nonmatchings/pause/13E120/pause_partners_update.s +++ b/ver/us/asm/nonmatchings/pause/13E120/pause_partners_update.s @@ -114,7 +114,7 @@ glabel pause_partners_update /* 13FC7C 8024C93C 8C440000 */ lw $a0, ($v0) /* 13FC80 8024C940 8C650000 */ lw $a1, ($v1) .L8024C944: -/* 13FC84 8024C944 0C0B78AB */ jal func_802DE2AC +/* 13FC84 8024C944 0C0B78AB */ jal spr_update_sprite /* 13FC88 8024C948 26100004 */ addiu $s0, $s0, 4 /* 13FC8C 8024C94C 3C028027 */ lui $v0, %hi(D_802706B0) /* 13FC90 8024C950 8C4206B0 */ lw $v0, %lo(D_802706B0)($v0) diff --git a/ver/us/asm/nonmatchings/pause/13FD40/pause_spirits_update.s b/ver/us/asm/nonmatchings/pause/13FD40/pause_spirits_update.s index 418a0b77c9..51dd563bb1 100644 --- a/ver/us/asm/nonmatchings/pause/13FD40/pause_spirits_update.s +++ b/ver/us/asm/nonmatchings/pause/13FD40/pause_spirits_update.s @@ -42,7 +42,7 @@ glabel pause_spirits_update /* 140BCC 8024D88C 8E250000 */ lw $a1, ($s1) .L8024D890: /* 140BD0 8024D890 3C063F80 */ lui $a2, 0x3f80 -/* 140BD4 8024D894 0C0B78AB */ jal func_802DE2AC +/* 140BD4 8024D894 0C0B78AB */ jal spr_update_sprite /* 140BD8 8024D898 26310010 */ addiu $s1, $s1, 0x10 /* 140BDC 8024D89C 3C028027 */ lui $v0, %hi(D_802706FC) /* 140BE0 8024D8A0 8C4206FC */ lw $v0, %lo(D_802706FC)($v0) diff --git a/ver/us/asm/nonmatchings/E287F0/func_802B6000_E287F0.s b/ver/us/asm/nonmatchings/world/action/16/func_802B6000_E287F0.s similarity index 100% rename from ver/us/asm/nonmatchings/E287F0/func_802B6000_E287F0.s rename to ver/us/asm/nonmatchings/world/action/16/func_802B6000_E287F0.s diff --git a/ver/us/asm/nonmatchings/E245D0/func_802B6000_E245D0.s b/ver/us/asm/nonmatchings/world/action/18/func_802B6000_E245D0.s similarity index 100% rename from ver/us/asm/nonmatchings/E245D0/func_802B6000_E245D0.s rename to ver/us/asm/nonmatchings/world/action/18/func_802B6000_E245D0.s diff --git a/ver/us/asm/nonmatchings/E245D0/func_802B6198_E24768.s b/ver/us/asm/nonmatchings/world/action/18/func_802B6198_E24768.s similarity index 100% rename from ver/us/asm/nonmatchings/E245D0/func_802B6198_E24768.s rename to ver/us/asm/nonmatchings/world/action/18/func_802B6198_E24768.s diff --git a/ver/us/asm/nonmatchings/E245D0/func_802B6230_E24800.s b/ver/us/asm/nonmatchings/world/action/18/func_802B6230_E24800.s similarity index 100% rename from ver/us/asm/nonmatchings/E245D0/func_802B6230_E24800.s rename to ver/us/asm/nonmatchings/world/action/18/func_802B6230_E24800.s diff --git a/ver/us/asm/nonmatchings/E28A30/func_802B6000_E28A30.s b/ver/us/asm/nonmatchings/world/action/encounter/func_802B6000_E28A30.s similarity index 100% rename from ver/us/asm/nonmatchings/E28A30/func_802B6000_E28A30.s rename to ver/us/asm/nonmatchings/world/action/encounter/func_802B6000_E28A30.s diff --git a/ver/us/asm/nonmatchings/E28A30/func_802B609C_E28ACC.s b/ver/us/asm/nonmatchings/world/action/encounter/func_802B609C_E28ACC.s similarity index 100% rename from ver/us/asm/nonmatchings/E28A30/func_802B609C_E28ACC.s rename to ver/us/asm/nonmatchings/world/action/encounter/func_802B609C_E28ACC.s diff --git a/ver/us/asm/nonmatchings/E28A30/func_802B6350_E28D80.s b/ver/us/asm/nonmatchings/world/action/encounter/func_802B6350_E28D80.s similarity index 100% rename from ver/us/asm/nonmatchings/E28A30/func_802B6350_E28D80.s rename to ver/us/asm/nonmatchings/world/action/encounter/func_802B6350_E28D80.s diff --git a/ver/us/asm/nonmatchings/E28A30/func_802B63D4_E28E04.s b/ver/us/asm/nonmatchings/world/action/encounter/func_802B63D4_E28E04.s similarity index 100% rename from ver/us/asm/nonmatchings/E28A30/func_802B63D4_E28E04.s rename to ver/us/asm/nonmatchings/world/action/encounter/func_802B63D4_E28E04.s diff --git a/ver/us/asm/nonmatchings/E28A30/func_802B6478_E28EA8.s b/ver/us/asm/nonmatchings/world/action/encounter/func_802B6478_E28EA8.s similarity index 100% rename from ver/us/asm/nonmatchings/E28A30/func_802B6478_E28EA8.s rename to ver/us/asm/nonmatchings/world/action/encounter/func_802B6478_E28EA8.s diff --git a/ver/us/asm/nonmatchings/E28A30/func_802B6508_E28F38.s b/ver/us/asm/nonmatchings/world/action/encounter/func_802B6508_E28F38.s similarity index 100% rename from ver/us/asm/nonmatchings/E28A30/func_802B6508_E28F38.s rename to ver/us/asm/nonmatchings/world/action/encounter/func_802B6508_E28F38.s diff --git a/ver/us/asm/nonmatchings/E28A30/func_802B6638_E29068.s b/ver/us/asm/nonmatchings/world/action/encounter/func_802B6638_E29068.s similarity index 96% rename from ver/us/asm/nonmatchings/E28A30/func_802B6638_E29068.s rename to ver/us/asm/nonmatchings/world/action/encounter/func_802B6638_E29068.s index 0c75506bb5..d8cac2a09c 100644 --- a/ver/us/asm/nonmatchings/E28A30/func_802B6638_E29068.s +++ b/ver/us/asm/nonmatchings/world/action/encounter/func_802B6638_E29068.s @@ -73,9 +73,9 @@ glabel func_802B6638_E29068 /* E29160 802B6730 00031040 */ sll $v0, $v1, 1 /* E29164 802B6734 00431021 */ addu $v0, $v0, $v1 /* E29168 802B6738 000210C0 */ sll $v0, $v0, 3 -/* E2916C 802B673C 3C04800F */ lui $a0, %hi(D_800F7C1C) +/* E2916C 802B673C 3C04800F */ lui $a0, %hi(world_actions_peachDisguises) /* E29170 802B6740 00822021 */ addu $a0, $a0, $v0 -/* E29174 802B6744 8C847C1C */ lw $a0, %lo(D_800F7C1C)($a0) +/* E29174 802B6744 8C847C1C */ lw $a0, %lo(world_actions_peachDisguises)($a0) /* E29178 802B6748 0C0398DB */ jal func_800E636C /* E2917C 802B674C 00000000 */ nop .L802B6750: diff --git a/ver/us/asm/nonmatchings/E24ED0/func_802B6000_E24ED0.s b/ver/us/asm/nonmatchings/world/action/hammer/func_802B6000_E24ED0.s similarity index 100% rename from ver/us/asm/nonmatchings/E24ED0/func_802B6000_E24ED0.s rename to ver/us/asm/nonmatchings/world/action/hammer/func_802B6000_E24ED0.s diff --git a/ver/us/asm/nonmatchings/E24ED0/func_802B6048_E24F18.s b/ver/us/asm/nonmatchings/world/action/hammer/func_802B6048_E24F18.s similarity index 100% rename from ver/us/asm/nonmatchings/E24ED0/func_802B6048_E24F18.s rename to ver/us/asm/nonmatchings/world/action/hammer/func_802B6048_E24F18.s diff --git a/ver/us/asm/nonmatchings/E24ED0/func_802B62A4_E25174.s b/ver/us/asm/nonmatchings/world/action/hammer/func_802B62A4_E25174.s similarity index 100% rename from ver/us/asm/nonmatchings/E24ED0/func_802B62A4_E25174.s rename to ver/us/asm/nonmatchings/world/action/hammer/func_802B62A4_E25174.s diff --git a/ver/us/asm/nonmatchings/E24ED0/func_802B66A8_E25578.s b/ver/us/asm/nonmatchings/world/action/hammer/func_802B66A8_E25578.s similarity index 100% rename from ver/us/asm/nonmatchings/E24ED0/func_802B66A8_E25578.s rename to ver/us/asm/nonmatchings/world/action/hammer/func_802B66A8_E25578.s diff --git a/ver/us/asm/nonmatchings/E24ED0/func_802B6820_E256F0.s b/ver/us/asm/nonmatchings/world/action/hammer/func_802B6820_E256F0.s similarity index 100% rename from ver/us/asm/nonmatchings/E24ED0/func_802B6820_E256F0.s rename to ver/us/asm/nonmatchings/world/action/hammer/func_802B6820_E256F0.s diff --git a/ver/us/asm/nonmatchings/E27C90/func_802B6000_E27C90.s b/ver/us/asm/nonmatchings/world/action/hit_fire/func_802B6000_E27C90.s similarity index 100% rename from ver/us/asm/nonmatchings/E27C90/func_802B6000_E27C90.s rename to ver/us/asm/nonmatchings/world/action/hit_fire/func_802B6000_E27C90.s diff --git a/ver/us/asm/nonmatchings/E27F40/func_802B6000_E27F40.s b/ver/us/asm/nonmatchings/world/action/hit_lava/func_802B6000_E27F40.s similarity index 100% rename from ver/us/asm/nonmatchings/E27F40/func_802B6000_E27F40.s rename to ver/us/asm/nonmatchings/world/action/hit_lava/func_802B6000_E27F40.s diff --git a/ver/us/asm/nonmatchings/E23260/func_802B61E4_E23444.s b/ver/us/asm/nonmatchings/world/action/idle/func_802B61E4_E23444.s similarity index 96% rename from ver/us/asm/nonmatchings/E23260/func_802B61E4_E23444.s rename to ver/us/asm/nonmatchings/world/action/idle/func_802B61E4_E23444.s index 4ec7ac8b6a..7d86bf176b 100644 --- a/ver/us/asm/nonmatchings/E23260/func_802B61E4_E23444.s +++ b/ver/us/asm/nonmatchings/world/action/idle/func_802B61E4_E23444.s @@ -32,10 +32,10 @@ glabel func_802B61E4_E23444 /* E234B0 802B6250 3C04000C */ lui $a0, 0xc /* E234B4 802B6254 90620080 */ lbu $v0, 0x80($v1) /* E234B8 802B6258 00021080 */ sll $v0, $v0, 2 -/* E234BC 802B625C 3C04802B */ lui $a0, %hi(D_802B6430_E23690) +/* E234BC 802B625C 3C04802B */ lui $a0, %hi(world_action_idle_peachAnims) /* E234C0 802B6260 00822021 */ addu $a0, $a0, $v0 /* E234C4 802B6264 0C037FBF */ jal func_800DFEFC -/* E234C8 802B6268 8C846430 */ lw $a0, %lo(D_802B6430_E23690)($a0) +/* E234C8 802B6268 8C846430 */ lw $a0, %lo(world_action_idle_peachAnims)($a0) /* E234CC 802B626C 080AD8AA */ j .L802B62A8 /* E234D0 802B6270 00000000 */ nop .L802B6274: @@ -48,9 +48,9 @@ glabel func_802B61E4_E23444 /* E234E8 802B6288 00031040 */ sll $v0, $v1, 1 /* E234EC 802B628C 00431021 */ addu $v0, $v0, $v1 /* E234F0 802B6290 000210C0 */ sll $v0, $v0, 3 -/* E234F4 802B6294 3C04800F */ lui $a0, %hi(D_800F7C1C) +/* E234F4 802B6294 3C04800F */ lui $a0, %hi(world_actions_peachDisguises) /* E234F8 802B6298 00822021 */ addu $a0, $a0, $v0 -/* E234FC 802B629C 8C847C1C */ lw $a0, %lo(D_800F7C1C)($a0) +/* E234FC 802B629C 8C847C1C */ lw $a0, %lo(world_actions_peachDisguises)($a0) /* E23500 802B62A0 0C0398DB */ jal func_800E636C /* E23504 802B62A4 00000000 */ nop .L802B62A8: diff --git a/ver/us/asm/nonmatchings/E24040/func_802B6000_E24040.s b/ver/us/asm/nonmatchings/world/action/jump/func_802B6000_E24040.s similarity index 100% rename from ver/us/asm/nonmatchings/E24040/func_802B6000_E24040.s rename to ver/us/asm/nonmatchings/world/action/jump/func_802B6000_E24040.s diff --git a/ver/us/asm/nonmatchings/E24040/func_802B60B4_E240F4.s b/ver/us/asm/nonmatchings/world/action/jump/func_802B60B4_E240F4.s similarity index 100% rename from ver/us/asm/nonmatchings/E24040/func_802B60B4_E240F4.s rename to ver/us/asm/nonmatchings/world/action/jump/func_802B60B4_E240F4.s diff --git a/ver/us/asm/nonmatchings/E24040/func_802B6198_E241D8.s b/ver/us/asm/nonmatchings/world/action/jump/func_802B6198_E241D8.s similarity index 100% rename from ver/us/asm/nonmatchings/E24040/func_802B6198_E241D8.s rename to ver/us/asm/nonmatchings/world/action/jump/func_802B6198_E241D8.s diff --git a/ver/us/asm/nonmatchings/E24040/func_802B6294_E242D4.s b/ver/us/asm/nonmatchings/world/action/jump/func_802B6294_E242D4.s similarity index 100% rename from ver/us/asm/nonmatchings/E24040/func_802B6294_E242D4.s rename to ver/us/asm/nonmatchings/world/action/jump/func_802B6294_E242D4.s diff --git a/ver/us/asm/nonmatchings/E24040/func_802B6348_E24388.s b/ver/us/asm/nonmatchings/world/action/jump/func_802B6348_E24388.s similarity index 100% rename from ver/us/asm/nonmatchings/E24040/func_802B6348_E24388.s rename to ver/us/asm/nonmatchings/world/action/jump/func_802B6348_E24388.s diff --git a/ver/us/asm/nonmatchings/E24040/func_802B647C_E244BC.s b/ver/us/asm/nonmatchings/world/action/jump/func_802B647C_E244BC.s similarity index 100% rename from ver/us/asm/nonmatchings/E24040/func_802B647C_E244BC.s rename to ver/us/asm/nonmatchings/world/action/jump/func_802B647C_E244BC.s diff --git a/ver/us/asm/nonmatchings/E24040/func_802B6508_E24548.s b/ver/us/asm/nonmatchings/world/action/jump/func_802B6508_E24548.s similarity index 100% rename from ver/us/asm/nonmatchings/E24040/func_802B6508_E24548.s rename to ver/us/asm/nonmatchings/world/action/jump/func_802B6508_E24548.s diff --git a/ver/us/asm/nonmatchings/E24920/func_802B6000_E24920.s b/ver/us/asm/nonmatchings/world/action/land/func_802B6000_E24920.s similarity index 100% rename from ver/us/asm/nonmatchings/E24920/func_802B6000_E24920.s rename to ver/us/asm/nonmatchings/world/action/land/func_802B6000_E24920.s diff --git a/ver/us/asm/nonmatchings/E24920/func_802B61C0_E24AE0.s b/ver/us/asm/nonmatchings/world/action/land/func_802B61C0_E24AE0.s similarity index 100% rename from ver/us/asm/nonmatchings/E24920/func_802B61C0_E24AE0.s rename to ver/us/asm/nonmatchings/world/action/land/func_802B61C0_E24AE0.s diff --git a/ver/us/asm/nonmatchings/E24920/func_802B62CC_E24BEC.s b/ver/us/asm/nonmatchings/world/action/land/func_802B62CC_E24BEC.s similarity index 100% rename from ver/us/asm/nonmatchings/E24920/func_802B62CC_E24BEC.s rename to ver/us/asm/nonmatchings/world/action/land/func_802B62CC_E24BEC.s diff --git a/ver/us/asm/nonmatchings/E24920/func_802B644C_E24D6C.s b/ver/us/asm/nonmatchings/world/action/land/func_802B644C_E24D6C.s similarity index 100% rename from ver/us/asm/nonmatchings/E24920/func_802B644C_E24D6C.s rename to ver/us/asm/nonmatchings/world/action/land/func_802B644C_E24D6C.s diff --git a/ver/us/asm/nonmatchings/E27510/func_802B6000_E27510.s b/ver/us/asm/nonmatchings/world/action/slide/func_802B6000_E27510.s similarity index 100% rename from ver/us/asm/nonmatchings/E27510/func_802B6000_E27510.s rename to ver/us/asm/nonmatchings/world/action/slide/func_802B6000_E27510.s diff --git a/ver/us/asm/nonmatchings/E27510/func_802B6060_E27570.s b/ver/us/asm/nonmatchings/world/action/slide/func_802B6060_E27570.s similarity index 100% rename from ver/us/asm/nonmatchings/E27510/func_802B6060_E27570.s rename to ver/us/asm/nonmatchings/world/action/slide/func_802B6060_E27570.s diff --git a/ver/us/asm/nonmatchings/E2A6B0/func_802B6000_E2A6B0.s b/ver/us/asm/nonmatchings/world/action/sneaky_parasol/func_802B6000_E2A6B0.s similarity index 100% rename from ver/us/asm/nonmatchings/E2A6B0/func_802B6000_E2A6B0.s rename to ver/us/asm/nonmatchings/world/action/sneaky_parasol/func_802B6000_E2A6B0.s diff --git a/ver/us/asm/nonmatchings/E2A6B0/func_802B6120_E2A7D0.s b/ver/us/asm/nonmatchings/world/action/sneaky_parasol/func_802B6120_E2A7D0.s similarity index 100% rename from ver/us/asm/nonmatchings/E2A6B0/func_802B6120_E2A7D0.s rename to ver/us/asm/nonmatchings/world/action/sneaky_parasol/func_802B6120_E2A7D0.s diff --git a/ver/us/asm/nonmatchings/E2A6B0/func_802B6CF0_E2B3A0.s b/ver/us/asm/nonmatchings/world/action/sneaky_parasol/func_802B6CF0_E2B3A0.s similarity index 100% rename from ver/us/asm/nonmatchings/E2A6B0/func_802B6CF0_E2B3A0.s rename to ver/us/asm/nonmatchings/world/action/sneaky_parasol/func_802B6CF0_E2B3A0.s diff --git a/ver/us/asm/nonmatchings/E25D60/func_802B6000_E25D60.s b/ver/us/asm/nonmatchings/world/action/spin/func_802B6000_E25D60.s similarity index 100% rename from ver/us/asm/nonmatchings/E25D60/func_802B6000_E25D60.s rename to ver/us/asm/nonmatchings/world/action/spin/func_802B6000_E25D60.s diff --git a/ver/us/asm/nonmatchings/E26DE0/func_802B6000_E26DE0.s b/ver/us/asm/nonmatchings/world/action/super_boots/func_802B6000_E26DE0.s similarity index 100% rename from ver/us/asm/nonmatchings/E26DE0/func_802B6000_E26DE0.s rename to ver/us/asm/nonmatchings/world/action/super_boots/func_802B6000_E26DE0.s diff --git a/ver/us/asm/nonmatchings/E26DE0/func_802B6648_E27428.s b/ver/us/asm/nonmatchings/world/action/super_boots/func_802B6648_E27428.s similarity index 100% rename from ver/us/asm/nonmatchings/E26DE0/func_802B6648_E27428.s rename to ver/us/asm/nonmatchings/world/action/super_boots/func_802B6648_E27428.s diff --git a/ver/us/asm/nonmatchings/E26710/func_802B6000_E26710.s b/ver/us/asm/nonmatchings/world/action/ultra_boots/func_802B6000_E26710.s similarity index 100% rename from ver/us/asm/nonmatchings/E26710/func_802B6000_E26710.s rename to ver/us/asm/nonmatchings/world/action/ultra_boots/func_802B6000_E26710.s diff --git a/ver/us/asm/nonmatchings/E26710/func_802B65F8_E26D08.s b/ver/us/asm/nonmatchings/world/action/ultra_boots/func_802B65F8_E26D08.s similarity index 100% rename from ver/us/asm/nonmatchings/E26710/func_802B65F8_E26D08.s rename to ver/us/asm/nonmatchings/world/action/ultra_boots/func_802B65F8_E26D08.s diff --git a/ver/us/asm/nonmatchings/E291A0/func_802B6000_E291A0.s b/ver/us/asm/nonmatchings/world/action/use_munchlesia/func_802B6000_E291A0.s similarity index 100% rename from ver/us/asm/nonmatchings/E291A0/func_802B6000_E291A0.s rename to ver/us/asm/nonmatchings/world/action/use_munchlesia/func_802B6000_E291A0.s diff --git a/ver/us/asm/nonmatchings/E29470/func_802B6000_E29470.s b/ver/us/asm/nonmatchings/world/action/use_spinning_flower/func_802B6000_E29470.s similarity index 100% rename from ver/us/asm/nonmatchings/E29470/func_802B6000_E29470.s rename to ver/us/asm/nonmatchings/world/action/use_spinning_flower/func_802B6000_E29470.s diff --git a/ver/us/asm/nonmatchings/E29470/func_802B60A4_E29514.s b/ver/us/asm/nonmatchings/world/action/use_spinning_flower/func_802B60A4_E29514.s similarity index 100% rename from ver/us/asm/nonmatchings/E29470/func_802B60A4_E29514.s rename to ver/us/asm/nonmatchings/world/action/use_spinning_flower/func_802B60A4_E29514.s diff --git a/ver/us/asm/nonmatchings/E2A340/func_802B6000_E2A340.s b/ver/us/asm/nonmatchings/world/action/use_tweester/func_802B6000_E2A340.s similarity index 100% rename from ver/us/asm/nonmatchings/E2A340/func_802B6000_E2A340.s rename to ver/us/asm/nonmatchings/world/action/use_tweester/func_802B6000_E2A340.s diff --git a/ver/us/asm/nonmatchings/E236E0/func_802B6000_E236E0.s b/ver/us/asm/nonmatchings/world/action/walk/func_802B6000_E236E0.s similarity index 100% rename from ver/us/asm/nonmatchings/E236E0/func_802B6000_E236E0.s rename to ver/us/asm/nonmatchings/world/action/walk/func_802B6000_E236E0.s diff --git a/ver/us/asm/nonmatchings/E236E0/func_802B6288_E23968.s b/ver/us/asm/nonmatchings/world/action/walk/func_802B6288_E23968.s similarity index 100% rename from ver/us/asm/nonmatchings/E236E0/func_802B6288_E23968.s rename to ver/us/asm/nonmatchings/world/action/walk/func_802B6288_E23968.s diff --git a/ver/us/asm/nonmatchings/E236E0/func_802B6550_E23C30.s b/ver/us/asm/nonmatchings/world/action/walk/func_802B6550_E23C30.s similarity index 100% rename from ver/us/asm/nonmatchings/E236E0/func_802B6550_E23C30.s rename to ver/us/asm/nonmatchings/world/action/walk/func_802B6550_E23C30.s diff --git a/ver/us/asm/nonmatchings/E236E0/func_802B65E8_E23CC8.s b/ver/us/asm/nonmatchings/world/action/walk/func_802B65E8_E23CC8.s similarity index 100% rename from ver/us/asm/nonmatchings/E236E0/func_802B65E8_E23CC8.s rename to ver/us/asm/nonmatchings/world/action/walk/func_802B65E8_E23CC8.s diff --git a/ver/us/asm/nonmatchings/E236E0/func_802B6738_E23E18.s b/ver/us/asm/nonmatchings/world/action/walk/func_802B6738_E23E18.s similarity index 100% rename from ver/us/asm/nonmatchings/E236E0/func_802B6738_E23E18.s rename to ver/us/asm/nonmatchings/world/action/walk/func_802B6738_E23E18.s diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_01/D4D060/func_80240128_D4D168.s b/ver/us/asm/nonmatchings/world/area_pra/pra_01/D4D060/func_80240128_D4D168.s index e255cb0349..f93f981833 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_01/D4D060/func_80240128_D4D168.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_01/D4D060/func_80240128_D4D168.s @@ -17,7 +17,7 @@ glabel func_80240128_D4D168 /* D4D198 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D4D19C 8024015C 0C044181 */ jal get_shadow_by_index /* D4D1A0 80240160 00000000 */ nop -/* D4D1A4 80240164 0C048B77 */ jal func_80122DDC +/* D4D1A4 80240164 0C048B77 */ jal get_entity_model /* D4D1A8 80240168 84440008 */ lh $a0, 8($v0) /* D4D1AC 8024016C 8C430000 */ lw $v1, ($v0) /* D4D1B0 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_01/D4D060/func_80240500_D4D540.s b/ver/us/asm/nonmatchings/world/area_pra/pra_01/D4D060/func_80240500_D4D540.s index 44aea0f591..cb43b9ec30 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_01/D4D060/func_80240500_D4D540.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_01/D4D060/func_80240500_D4D540.s @@ -17,7 +17,7 @@ glabel func_80240500_D4D540 /* D4D570 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D4D574 80240534 0C044181 */ jal get_shadow_by_index /* D4D578 80240538 00000000 */ nop -/* D4D57C 8024053C 0C048B77 */ jal func_80122DDC +/* D4D57C 8024053C 0C048B77 */ jal get_entity_model /* D4D580 80240540 84440008 */ lh $a0, 8($v0) /* D4D584 80240544 8E050028 */ lw $a1, 0x28($s0) /* D4D588 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_02/D50010/func_80240128_D50118.s b/ver/us/asm/nonmatchings/world/area_pra/pra_02/D50010/func_80240128_D50118.s index d150e9a99e..6c95ff85ee 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_02/D50010/func_80240128_D50118.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_02/D50010/func_80240128_D50118.s @@ -17,7 +17,7 @@ glabel func_80240128_D50118 /* D50148 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D5014C 8024015C 0C044181 */ jal get_shadow_by_index /* D50150 80240160 00000000 */ nop -/* D50154 80240164 0C048B77 */ jal func_80122DDC +/* D50154 80240164 0C048B77 */ jal get_entity_model /* D50158 80240168 84440008 */ lh $a0, 8($v0) /* D5015C 8024016C 8C430000 */ lw $v1, ($v0) /* D50160 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_02/D50010/func_80240500_D504F0.s b/ver/us/asm/nonmatchings/world/area_pra/pra_02/D50010/func_80240500_D504F0.s index dedb8a2131..fc1c7f6ad2 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_02/D50010/func_80240500_D504F0.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_02/D50010/func_80240500_D504F0.s @@ -17,7 +17,7 @@ glabel func_80240500_D504F0 /* D50520 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D50524 80240534 0C044181 */ jal get_shadow_by_index /* D50528 80240538 00000000 */ nop -/* D5052C 8024053C 0C048B77 */ jal func_80122DDC +/* D5052C 8024053C 0C048B77 */ jal get_entity_model /* D50530 80240540 84440008 */ lh $a0, 8($v0) /* D50534 80240544 8E050028 */ lw $a1, 0x28($s0) /* D50538 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_05/D55BD0/func_80240128_D55CD8.s b/ver/us/asm/nonmatchings/world/area_pra/pra_05/D55BD0/func_80240128_D55CD8.s index 454ed09843..13ebb1fd76 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_05/D55BD0/func_80240128_D55CD8.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_05/D55BD0/func_80240128_D55CD8.s @@ -17,7 +17,7 @@ glabel func_80240128_D55CD8 /* D55D08 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D55D0C 8024015C 0C044181 */ jal get_shadow_by_index /* D55D10 80240160 00000000 */ nop -/* D55D14 80240164 0C048B77 */ jal func_80122DDC +/* D55D14 80240164 0C048B77 */ jal get_entity_model /* D55D18 80240168 84440008 */ lh $a0, 8($v0) /* D55D1C 8024016C 8C430000 */ lw $v1, ($v0) /* D55D20 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_05/D55BD0/func_80240500_D560B0.s b/ver/us/asm/nonmatchings/world/area_pra/pra_05/D55BD0/func_80240500_D560B0.s index cd635a0b28..389bb60a84 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_05/D55BD0/func_80240500_D560B0.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_05/D55BD0/func_80240500_D560B0.s @@ -17,7 +17,7 @@ glabel func_80240500_D560B0 /* D560E0 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D560E4 80240534 0C044181 */ jal get_shadow_by_index /* D560E8 80240538 00000000 */ nop -/* D560EC 8024053C 0C048B77 */ jal func_80122DDC +/* D560EC 8024053C 0C048B77 */ jal get_entity_model /* D560F0 80240540 84440008 */ lh $a0, 8($v0) /* D560F4 80240544 8E050028 */ lw $a1, 0x28($s0) /* D560F8 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_06/D57430/func_80240158_D57588.s b/ver/us/asm/nonmatchings/world/area_pra/pra_06/D57430/func_80240158_D57588.s index 3b01223e18..cae6eda8c2 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_06/D57430/func_80240158_D57588.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_06/D57430/func_80240158_D57588.s @@ -17,7 +17,7 @@ glabel func_80240158_D57588 /* D575B8 80240188 8E0400CC */ lw $a0, 0xcc($s0) /* D575BC 8024018C 0C044181 */ jal get_shadow_by_index /* D575C0 80240190 00000000 */ nop -/* D575C4 80240194 0C048B77 */ jal func_80122DDC +/* D575C4 80240194 0C048B77 */ jal get_entity_model /* D575C8 80240198 84440008 */ lh $a0, 8($v0) /* D575CC 8024019C 8C430000 */ lw $v1, ($v0) /* D575D0 802401A0 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_06/D57430/func_80240530_D57960.s b/ver/us/asm/nonmatchings/world/area_pra/pra_06/D57430/func_80240530_D57960.s index e38a4eb293..1687e64ceb 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_06/D57430/func_80240530_D57960.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_06/D57430/func_80240530_D57960.s @@ -17,7 +17,7 @@ glabel func_80240530_D57960 /* D57990 80240560 8E0400CC */ lw $a0, 0xcc($s0) /* D57994 80240564 0C044181 */ jal get_shadow_by_index /* D57998 80240568 00000000 */ nop -/* D5799C 8024056C 0C048B77 */ jal func_80122DDC +/* D5799C 8024056C 0C048B77 */ jal get_entity_model /* D579A0 80240570 84440008 */ lh $a0, 8($v0) /* D579A4 80240574 8E050028 */ lw $a1, 0x28($s0) /* D579A8 80240578 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_09/D588B0/func_80240128_D589B8.s b/ver/us/asm/nonmatchings/world/area_pra/pra_09/D588B0/func_80240128_D589B8.s index 4752c66552..1ac8967524 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_09/D588B0/func_80240128_D589B8.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_09/D588B0/func_80240128_D589B8.s @@ -17,7 +17,7 @@ glabel func_80240128_D589B8 /* D589E8 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D589EC 8024015C 0C044181 */ jal get_shadow_by_index /* D589F0 80240160 00000000 */ nop -/* D589F4 80240164 0C048B77 */ jal func_80122DDC +/* D589F4 80240164 0C048B77 */ jal get_entity_model /* D589F8 80240168 84440008 */ lh $a0, 8($v0) /* D589FC 8024016C 8C430000 */ lw $v1, ($v0) /* D58A00 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_09/D588B0/func_80240500_D58D90.s b/ver/us/asm/nonmatchings/world/area_pra/pra_09/D588B0/func_80240500_D58D90.s index 7eb7cf9d1a..23c8789a5c 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_09/D588B0/func_80240500_D58D90.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_09/D588B0/func_80240500_D58D90.s @@ -17,7 +17,7 @@ glabel func_80240500_D58D90 /* D58DC0 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D58DC4 80240534 0C044181 */ jal get_shadow_by_index /* D58DC8 80240538 00000000 */ nop -/* D58DCC 8024053C 0C048B77 */ jal func_80122DDC +/* D58DCC 8024053C 0C048B77 */ jal get_entity_model /* D58DD0 80240540 84440008 */ lh $a0, 8($v0) /* D58DD4 80240544 8E050028 */ lw $a1, 0x28($s0) /* D58DD8 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_10/D5F2D0/func_80240128_D5F3D8.s b/ver/us/asm/nonmatchings/world/area_pra/pra_10/D5F2D0/func_80240128_D5F3D8.s index bae1f19b01..8cb320fb4b 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_10/D5F2D0/func_80240128_D5F3D8.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_10/D5F2D0/func_80240128_D5F3D8.s @@ -17,7 +17,7 @@ glabel func_80240128_D5F3D8 /* D5F408 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D5F40C 8024015C 0C044181 */ jal get_shadow_by_index /* D5F410 80240160 00000000 */ nop -/* D5F414 80240164 0C048B77 */ jal func_80122DDC +/* D5F414 80240164 0C048B77 */ jal get_entity_model /* D5F418 80240168 84440008 */ lh $a0, 8($v0) /* D5F41C 8024016C 8C430000 */ lw $v1, ($v0) /* D5F420 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_10/D5F2D0/func_80240500_D5F7B0.s b/ver/us/asm/nonmatchings/world/area_pra/pra_10/D5F2D0/func_80240500_D5F7B0.s index 83d253ce94..d7d96f28b8 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_10/D5F2D0/func_80240500_D5F7B0.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_10/D5F2D0/func_80240500_D5F7B0.s @@ -17,7 +17,7 @@ glabel func_80240500_D5F7B0 /* D5F7E0 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D5F7E4 80240534 0C044181 */ jal get_shadow_by_index /* D5F7E8 80240538 00000000 */ nop -/* D5F7EC 8024053C 0C048B77 */ jal func_80122DDC +/* D5F7EC 8024053C 0C048B77 */ jal get_entity_model /* D5F7F0 80240540 84440008 */ lh $a0, 8($v0) /* D5F7F4 80240544 8E050028 */ lw $a1, 0x28($s0) /* D5F7F8 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_11/D61520/func_80240128_D61628.s b/ver/us/asm/nonmatchings/world/area_pra/pra_11/D61520/func_80240128_D61628.s index f7ddb1ff31..6e8fed701b 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_11/D61520/func_80240128_D61628.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_11/D61520/func_80240128_D61628.s @@ -17,7 +17,7 @@ glabel func_80240128_D61628 /* D61658 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D6165C 8024015C 0C044181 */ jal get_shadow_by_index /* D61660 80240160 00000000 */ nop -/* D61664 80240164 0C048B77 */ jal func_80122DDC +/* D61664 80240164 0C048B77 */ jal get_entity_model /* D61668 80240168 84440008 */ lh $a0, 8($v0) /* D6166C 8024016C 8C430000 */ lw $v1, ($v0) /* D61670 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_11/D61520/func_80240500_D61A00.s b/ver/us/asm/nonmatchings/world/area_pra/pra_11/D61520/func_80240500_D61A00.s index 35224f3ad0..c4ef41b608 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_11/D61520/func_80240500_D61A00.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_11/D61520/func_80240500_D61A00.s @@ -17,7 +17,7 @@ glabel func_80240500_D61A00 /* D61A30 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D61A34 80240534 0C044181 */ jal get_shadow_by_index /* D61A38 80240538 00000000 */ nop -/* D61A3C 8024053C 0C048B77 */ jal func_80122DDC +/* D61A3C 8024053C 0C048B77 */ jal get_entity_model /* D61A40 80240540 84440008 */ lh $a0, 8($v0) /* D61A44 80240544 8E050028 */ lw $a1, 0x28($s0) /* D61A48 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_12/D62D10/func_80240158_D62E68.s b/ver/us/asm/nonmatchings/world/area_pra/pra_12/D62D10/func_80240158_D62E68.s index dcc11ac1dc..893df27dfe 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_12/D62D10/func_80240158_D62E68.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_12/D62D10/func_80240158_D62E68.s @@ -17,7 +17,7 @@ glabel func_80240158_D62E68 /* D62E98 80240188 8E0400CC */ lw $a0, 0xcc($s0) /* D62E9C 8024018C 0C044181 */ jal get_shadow_by_index /* D62EA0 80240190 00000000 */ nop -/* D62EA4 80240194 0C048B77 */ jal func_80122DDC +/* D62EA4 80240194 0C048B77 */ jal get_entity_model /* D62EA8 80240198 84440008 */ lh $a0, 8($v0) /* D62EAC 8024019C 8C430000 */ lw $v1, ($v0) /* D62EB0 802401A0 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_12/D62D10/func_80240530_D63240.s b/ver/us/asm/nonmatchings/world/area_pra/pra_12/D62D10/func_80240530_D63240.s index d6da0f52de..64b7ca5f78 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_12/D62D10/func_80240530_D63240.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_12/D62D10/func_80240530_D63240.s @@ -17,7 +17,7 @@ glabel func_80240530_D63240 /* D63270 80240560 8E0400CC */ lw $a0, 0xcc($s0) /* D63274 80240564 0C044181 */ jal get_shadow_by_index /* D63278 80240568 00000000 */ nop -/* D6327C 8024056C 0C048B77 */ jal func_80122DDC +/* D6327C 8024056C 0C048B77 */ jal get_entity_model /* D63280 80240570 84440008 */ lh $a0, 8($v0) /* D63284 80240574 8E050028 */ lw $a1, 0x28($s0) /* D63288 80240578 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_13/D64600/func_80240128_D64708.s b/ver/us/asm/nonmatchings/world/area_pra/pra_13/D64600/func_80240128_D64708.s index 38821ce86d..ecd15f1e72 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_13/D64600/func_80240128_D64708.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_13/D64600/func_80240128_D64708.s @@ -17,7 +17,7 @@ glabel func_80240128_D64708 /* D64738 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D6473C 8024015C 0C044181 */ jal get_shadow_by_index /* D64740 80240160 00000000 */ nop -/* D64744 80240164 0C048B77 */ jal func_80122DDC +/* D64744 80240164 0C048B77 */ jal get_entity_model /* D64748 80240168 84440008 */ lh $a0, 8($v0) /* D6474C 8024016C 8C430000 */ lw $v1, ($v0) /* D64750 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_13/D64600/func_80240500_D64AE0.s b/ver/us/asm/nonmatchings/world/area_pra/pra_13/D64600/func_80240500_D64AE0.s index 3032b32c2c..1337973a33 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_13/D64600/func_80240500_D64AE0.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_13/D64600/func_80240500_D64AE0.s @@ -17,7 +17,7 @@ glabel func_80240500_D64AE0 /* D64B10 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D64B14 80240534 0C044181 */ jal get_shadow_by_index /* D64B18 80240538 00000000 */ nop -/* D64B1C 8024053C 0C048B77 */ jal func_80122DDC +/* D64B1C 8024053C 0C048B77 */ jal get_entity_model /* D64B20 80240540 84440008 */ lh $a0, 8($v0) /* D64B24 80240544 8E050028 */ lw $a1, 0x28($s0) /* D64B28 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_14/D67D20/func_80240128_D67E28.s b/ver/us/asm/nonmatchings/world/area_pra/pra_14/D67D20/func_80240128_D67E28.s index 36f56ce78a..4fb4e308c2 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_14/D67D20/func_80240128_D67E28.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_14/D67D20/func_80240128_D67E28.s @@ -17,7 +17,7 @@ glabel func_80240128_D67E28 /* D67E58 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D67E5C 8024015C 0C044181 */ jal get_shadow_by_index /* D67E60 80240160 00000000 */ nop -/* D67E64 80240164 0C048B77 */ jal func_80122DDC +/* D67E64 80240164 0C048B77 */ jal get_entity_model /* D67E68 80240168 84440008 */ lh $a0, 8($v0) /* D67E6C 8024016C 8C430000 */ lw $v1, ($v0) /* D67E70 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_14/D67D20/func_80240500_D68200.s b/ver/us/asm/nonmatchings/world/area_pra/pra_14/D67D20/func_80240500_D68200.s index 0d55d7fe72..238f6da749 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_14/D67D20/func_80240500_D68200.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_14/D67D20/func_80240500_D68200.s @@ -17,7 +17,7 @@ glabel func_80240500_D68200 /* D68230 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D68234 80240534 0C044181 */ jal get_shadow_by_index /* D68238 80240538 00000000 */ nop -/* D6823C 8024053C 0C048B77 */ jal func_80122DDC +/* D6823C 8024053C 0C048B77 */ jal get_entity_model /* D68240 80240540 84440008 */ lh $a0, 8($v0) /* D68244 80240544 8E050028 */ lw $a1, 0x28($s0) /* D68248 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_16/D69B40/func_80240128_D69C48.s b/ver/us/asm/nonmatchings/world/area_pra/pra_16/D69B40/func_80240128_D69C48.s index f0a68953ee..da88fb2ed7 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_16/D69B40/func_80240128_D69C48.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_16/D69B40/func_80240128_D69C48.s @@ -17,7 +17,7 @@ glabel func_80240128_D69C48 /* D69C78 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D69C7C 8024015C 0C044181 */ jal get_shadow_by_index /* D69C80 80240160 00000000 */ nop -/* D69C84 80240164 0C048B77 */ jal func_80122DDC +/* D69C84 80240164 0C048B77 */ jal get_entity_model /* D69C88 80240168 84440008 */ lh $a0, 8($v0) /* D69C8C 8024016C 8C430000 */ lw $v1, ($v0) /* D69C90 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_16/D69B40/func_80240500_D6A020.s b/ver/us/asm/nonmatchings/world/area_pra/pra_16/D69B40/func_80240500_D6A020.s index e0274d76ce..fc778cc6ef 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_16/D69B40/func_80240500_D6A020.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_16/D69B40/func_80240500_D6A020.s @@ -17,7 +17,7 @@ glabel func_80240500_D6A020 /* D6A050 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D6A054 80240534 0C044181 */ jal get_shadow_by_index /* D6A058 80240538 00000000 */ nop -/* D6A05C 8024053C 0C048B77 */ jal func_80122DDC +/* D6A05C 8024053C 0C048B77 */ jal get_entity_model /* D6A060 80240540 84440008 */ lh $a0, 8($v0) /* D6A064 80240544 8E050028 */ lw $a1, 0x28($s0) /* D6A068 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_18/D6B640/func_80240128_D6B748.s b/ver/us/asm/nonmatchings/world/area_pra/pra_18/D6B640/func_80240128_D6B748.s index 36c9674fe6..d710e723a4 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_18/D6B640/func_80240128_D6B748.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_18/D6B640/func_80240128_D6B748.s @@ -17,7 +17,7 @@ glabel func_80240128_D6B748 /* D6B778 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D6B77C 8024015C 0C044181 */ jal get_shadow_by_index /* D6B780 80240160 00000000 */ nop -/* D6B784 80240164 0C048B77 */ jal func_80122DDC +/* D6B784 80240164 0C048B77 */ jal get_entity_model /* D6B788 80240168 84440008 */ lh $a0, 8($v0) /* D6B78C 8024016C 8C430000 */ lw $v1, ($v0) /* D6B790 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_18/D6B640/func_80240500_D6BB20.s b/ver/us/asm/nonmatchings/world/area_pra/pra_18/D6B640/func_80240500_D6BB20.s index 759dd79d93..e5e7207a5f 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_18/D6B640/func_80240500_D6BB20.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_18/D6B640/func_80240500_D6BB20.s @@ -17,7 +17,7 @@ glabel func_80240500_D6BB20 /* D6BB50 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D6BB54 80240534 0C044181 */ jal get_shadow_by_index /* D6BB58 80240538 00000000 */ nop -/* D6BB5C 8024053C 0C048B77 */ jal func_80122DDC +/* D6BB5C 8024053C 0C048B77 */ jal get_entity_model /* D6BB60 80240540 84440008 */ lh $a0, 8($v0) /* D6BB64 80240544 8E050028 */ lw $a1, 0x28($s0) /* D6BB68 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_19/D6E9D0/func_80240128_D6EAD8.s b/ver/us/asm/nonmatchings/world/area_pra/pra_19/D6E9D0/func_80240128_D6EAD8.s index 852317081b..6357bef764 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_19/D6E9D0/func_80240128_D6EAD8.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_19/D6E9D0/func_80240128_D6EAD8.s @@ -17,7 +17,7 @@ glabel func_80240128_D6EAD8 /* D6EB08 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D6EB0C 8024015C 0C044181 */ jal get_shadow_by_index /* D6EB10 80240160 00000000 */ nop -/* D6EB14 80240164 0C048B77 */ jal func_80122DDC +/* D6EB14 80240164 0C048B77 */ jal get_entity_model /* D6EB18 80240168 84440008 */ lh $a0, 8($v0) /* D6EB1C 8024016C 8C430000 */ lw $v1, ($v0) /* D6EB20 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_19/D6E9D0/func_80240500_D6EEB0.s b/ver/us/asm/nonmatchings/world/area_pra/pra_19/D6E9D0/func_80240500_D6EEB0.s index a8be80e13b..0961108bd9 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_19/D6E9D0/func_80240500_D6EEB0.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_19/D6E9D0/func_80240500_D6EEB0.s @@ -17,7 +17,7 @@ glabel func_80240500_D6EEB0 /* D6EEE0 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D6EEE4 80240534 0C044181 */ jal get_shadow_by_index /* D6EEE8 80240538 00000000 */ nop -/* D6EEEC 8024053C 0C048B77 */ jal func_80122DDC +/* D6EEEC 8024053C 0C048B77 */ jal get_entity_model /* D6EEF0 80240540 84440008 */ lh $a0, 8($v0) /* D6EEF4 80240544 8E050028 */ lw $a1, 0x28($s0) /* D6EEF8 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_20/D763C0/func_80240128_D764C8.s b/ver/us/asm/nonmatchings/world/area_pra/pra_20/D763C0/func_80240128_D764C8.s index 8879939200..29a1f933c7 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_20/D763C0/func_80240128_D764C8.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_20/D763C0/func_80240128_D764C8.s @@ -17,7 +17,7 @@ glabel func_80240128_D764C8 /* D764F8 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D764FC 8024015C 0C044181 */ jal get_shadow_by_index /* D76500 80240160 00000000 */ nop -/* D76504 80240164 0C048B77 */ jal func_80122DDC +/* D76504 80240164 0C048B77 */ jal get_entity_model /* D76508 80240168 84440008 */ lh $a0, 8($v0) /* D7650C 8024016C 8C430000 */ lw $v1, ($v0) /* D76510 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_20/D763C0/func_80240500_D768A0.s b/ver/us/asm/nonmatchings/world/area_pra/pra_20/D763C0/func_80240500_D768A0.s index 6c7e09013c..b4ebb879cd 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_20/D763C0/func_80240500_D768A0.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_20/D763C0/func_80240500_D768A0.s @@ -17,7 +17,7 @@ glabel func_80240500_D768A0 /* D768D0 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D768D4 80240534 0C044181 */ jal get_shadow_by_index /* D768D8 80240538 00000000 */ nop -/* D768DC 8024053C 0C048B77 */ jal func_80122DDC +/* D768DC 8024053C 0C048B77 */ jal get_entity_model /* D768E0 80240540 84440008 */ lh $a0, 8($v0) /* D768E4 80240544 8E050028 */ lw $a1, 0x28($s0) /* D768E8 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_27/D799F0/func_80240158_D79B48.s b/ver/us/asm/nonmatchings/world/area_pra/pra_27/D799F0/func_80240158_D79B48.s index 0cb87c3411..4d1c7306bc 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_27/D799F0/func_80240158_D79B48.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_27/D799F0/func_80240158_D79B48.s @@ -17,7 +17,7 @@ glabel func_80240158_D79B48 /* D79B78 80240188 8E0400CC */ lw $a0, 0xcc($s0) /* D79B7C 8024018C 0C044181 */ jal get_shadow_by_index /* D79B80 80240190 00000000 */ nop -/* D79B84 80240194 0C048B77 */ jal func_80122DDC +/* D79B84 80240194 0C048B77 */ jal get_entity_model /* D79B88 80240198 84440008 */ lh $a0, 8($v0) /* D79B8C 8024019C 8C430000 */ lw $v1, ($v0) /* D79B90 802401A0 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_27/D799F0/func_80240530_D79F20.s b/ver/us/asm/nonmatchings/world/area_pra/pra_27/D799F0/func_80240530_D79F20.s index 8bf4cae2e2..6e99ea8fd6 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_27/D799F0/func_80240530_D79F20.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_27/D799F0/func_80240530_D79F20.s @@ -17,7 +17,7 @@ glabel func_80240530_D79F20 /* D79F50 80240560 8E0400CC */ lw $a0, 0xcc($s0) /* D79F54 80240564 0C044181 */ jal get_shadow_by_index /* D79F58 80240568 00000000 */ nop -/* D79F5C 8024056C 0C048B77 */ jal func_80122DDC +/* D79F5C 8024056C 0C048B77 */ jal get_entity_model /* D79F60 80240570 84440008 */ lh $a0, 8($v0) /* D79F64 80240574 8E050028 */ lw $a1, 0x28($s0) /* D79F68 80240578 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_28/D7B2A0/func_80240158_D7B3F8.s b/ver/us/asm/nonmatchings/world/area_pra/pra_28/D7B2A0/func_80240158_D7B3F8.s index 149f559c1c..6f603b0111 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_28/D7B2A0/func_80240158_D7B3F8.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_28/D7B2A0/func_80240158_D7B3F8.s @@ -17,7 +17,7 @@ glabel func_80240158_D7B3F8 /* D7B428 80240188 8E0400CC */ lw $a0, 0xcc($s0) /* D7B42C 8024018C 0C044181 */ jal get_shadow_by_index /* D7B430 80240190 00000000 */ nop -/* D7B434 80240194 0C048B77 */ jal func_80122DDC +/* D7B434 80240194 0C048B77 */ jal get_entity_model /* D7B438 80240198 84440008 */ lh $a0, 8($v0) /* D7B43C 8024019C 8C430000 */ lw $v1, ($v0) /* D7B440 802401A0 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_28/D7B2A0/func_80240530_D7B7D0.s b/ver/us/asm/nonmatchings/world/area_pra/pra_28/D7B2A0/func_80240530_D7B7D0.s index 4e09b58aab..d86fc88b2b 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_28/D7B2A0/func_80240530_D7B7D0.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_28/D7B2A0/func_80240530_D7B7D0.s @@ -17,7 +17,7 @@ glabel func_80240530_D7B7D0 /* D7B800 80240560 8E0400CC */ lw $a0, 0xcc($s0) /* D7B804 80240564 0C044181 */ jal get_shadow_by_index /* D7B808 80240568 00000000 */ nop -/* D7B80C 8024056C 0C048B77 */ jal func_80122DDC +/* D7B80C 8024056C 0C048B77 */ jal get_entity_model /* D7B810 80240570 84440008 */ lh $a0, 8($v0) /* D7B814 80240574 8E050028 */ lw $a1, 0x28($s0) /* D7B818 80240578 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_29/D7CB70/func_80240128_D7CC78.s b/ver/us/asm/nonmatchings/world/area_pra/pra_29/D7CB70/func_80240128_D7CC78.s index 429ecde906..4d26bace33 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_29/D7CB70/func_80240128_D7CC78.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_29/D7CB70/func_80240128_D7CC78.s @@ -17,7 +17,7 @@ glabel func_80240128_D7CC78 /* D7CCA8 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D7CCAC 8024015C 0C044181 */ jal get_shadow_by_index /* D7CCB0 80240160 00000000 */ nop -/* D7CCB4 80240164 0C048B77 */ jal func_80122DDC +/* D7CCB4 80240164 0C048B77 */ jal get_entity_model /* D7CCB8 80240168 84440008 */ lh $a0, 8($v0) /* D7CCBC 8024016C 8C430000 */ lw $v1, ($v0) /* D7CCC0 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_29/D7CB70/func_80240500_D7D050.s b/ver/us/asm/nonmatchings/world/area_pra/pra_29/D7CB70/func_80240500_D7D050.s index 36afc77cff..a06169a321 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_29/D7CB70/func_80240500_D7D050.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_29/D7CB70/func_80240500_D7D050.s @@ -17,7 +17,7 @@ glabel func_80240500_D7D050 /* D7D080 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D7D084 80240534 0C044181 */ jal get_shadow_by_index /* D7D088 80240538 00000000 */ nop -/* D7D08C 8024053C 0C048B77 */ jal func_80122DDC +/* D7D08C 8024053C 0C048B77 */ jal get_entity_model /* D7D090 80240540 84440008 */ lh $a0, 8($v0) /* D7D094 80240544 8E050028 */ lw $a1, 0x28($s0) /* D7D098 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_33/D89700/func_80240128_D89808.s b/ver/us/asm/nonmatchings/world/area_pra/pra_33/D89700/func_80240128_D89808.s index c96bcb0034..d004736b2a 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_33/D89700/func_80240128_D89808.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_33/D89700/func_80240128_D89808.s @@ -17,7 +17,7 @@ glabel func_80240128_D89808 /* D89838 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D8983C 8024015C 0C044181 */ jal get_shadow_by_index /* D89840 80240160 00000000 */ nop -/* D89844 80240164 0C048B77 */ jal func_80122DDC +/* D89844 80240164 0C048B77 */ jal get_entity_model /* D89848 80240168 84440008 */ lh $a0, 8($v0) /* D8984C 8024016C 8C430000 */ lw $v1, ($v0) /* D89850 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_33/D89700/func_80240500_D89BE0.s b/ver/us/asm/nonmatchings/world/area_pra/pra_33/D89700/func_80240500_D89BE0.s index 28efb24d40..b026a16166 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_33/D89700/func_80240500_D89BE0.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_33/D89700/func_80240500_D89BE0.s @@ -17,7 +17,7 @@ glabel func_80240500_D89BE0 /* D89C10 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D89C14 80240534 0C044181 */ jal get_shadow_by_index /* D89C18 80240538 00000000 */ nop -/* D89C1C 8024053C 0C048B77 */ jal func_80122DDC +/* D89C1C 8024053C 0C048B77 */ jal get_entity_model /* D89C20 80240540 84440008 */ lh $a0, 8($v0) /* D89C24 80240544 8E050028 */ lw $a1, 0x28($s0) /* D89C28 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_34/D8B3D0/func_80240128_D8B4D8.s b/ver/us/asm/nonmatchings/world/area_pra/pra_34/D8B3D0/func_80240128_D8B4D8.s index bfb3dc24ad..fe45eaed4d 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_34/D8B3D0/func_80240128_D8B4D8.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_34/D8B3D0/func_80240128_D8B4D8.s @@ -17,7 +17,7 @@ glabel func_80240128_D8B4D8 /* D8B508 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D8B50C 8024015C 0C044181 */ jal get_shadow_by_index /* D8B510 80240160 00000000 */ nop -/* D8B514 80240164 0C048B77 */ jal func_80122DDC +/* D8B514 80240164 0C048B77 */ jal get_entity_model /* D8B518 80240168 84440008 */ lh $a0, 8($v0) /* D8B51C 8024016C 8C430000 */ lw $v1, ($v0) /* D8B520 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_34/D8B3D0/func_80240500_D8B8B0.s b/ver/us/asm/nonmatchings/world/area_pra/pra_34/D8B3D0/func_80240500_D8B8B0.s index cb5d3aafcc..06dfd0654f 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_34/D8B3D0/func_80240500_D8B8B0.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_34/D8B3D0/func_80240500_D8B8B0.s @@ -17,7 +17,7 @@ glabel func_80240500_D8B8B0 /* D8B8E0 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D8B8E4 80240534 0C044181 */ jal get_shadow_by_index /* D8B8E8 80240538 00000000 */ nop -/* D8B8EC 8024053C 0C048B77 */ jal func_80122DDC +/* D8B8EC 8024053C 0C048B77 */ jal get_entity_model /* D8B8F0 80240540 84440008 */ lh $a0, 8($v0) /* D8B8F4 80240544 8E050028 */ lw $a1, 0x28($s0) /* D8B8F8 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_35/D8D270/func_80240128_D8D378.s b/ver/us/asm/nonmatchings/world/area_pra/pra_35/D8D270/func_80240128_D8D378.s index e0a87617ce..7ca6dda35b 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_35/D8D270/func_80240128_D8D378.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_35/D8D270/func_80240128_D8D378.s @@ -17,7 +17,7 @@ glabel func_80240128_D8D378 /* D8D3A8 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D8D3AC 8024015C 0C044181 */ jal get_shadow_by_index /* D8D3B0 80240160 00000000 */ nop -/* D8D3B4 80240164 0C048B77 */ jal func_80122DDC +/* D8D3B4 80240164 0C048B77 */ jal get_entity_model /* D8D3B8 80240168 84440008 */ lh $a0, 8($v0) /* D8D3BC 8024016C 8C430000 */ lw $v1, ($v0) /* D8D3C0 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_35/D8D270/func_80240500_D8D750.s b/ver/us/asm/nonmatchings/world/area_pra/pra_35/D8D270/func_80240500_D8D750.s index b6827693c9..96aa4cf612 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_35/D8D270/func_80240500_D8D750.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_35/D8D270/func_80240500_D8D750.s @@ -17,7 +17,7 @@ glabel func_80240500_D8D750 /* D8D780 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D8D784 80240534 0C044181 */ jal get_shadow_by_index /* D8D788 80240538 00000000 */ nop -/* D8D78C 8024053C 0C048B77 */ jal func_80122DDC +/* D8D78C 8024053C 0C048B77 */ jal get_entity_model /* D8D790 80240540 84440008 */ lh $a0, 8($v0) /* D8D794 80240544 8E050028 */ lw $a1, 0x28($s0) /* D8D798 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_36/D91700/func_80240158_D91858.s b/ver/us/asm/nonmatchings/world/area_pra/pra_36/D91700/func_80240158_D91858.s index 69d3285c2d..79b0dd2424 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_36/D91700/func_80240158_D91858.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_36/D91700/func_80240158_D91858.s @@ -17,7 +17,7 @@ glabel func_80240158_D91858 /* D91888 80240188 8E0400CC */ lw $a0, 0xcc($s0) /* D9188C 8024018C 0C044181 */ jal get_shadow_by_index /* D91890 80240190 00000000 */ nop -/* D91894 80240194 0C048B77 */ jal func_80122DDC +/* D91894 80240194 0C048B77 */ jal get_entity_model /* D91898 80240198 84440008 */ lh $a0, 8($v0) /* D9189C 8024019C 8C430000 */ lw $v1, ($v0) /* D918A0 802401A0 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_36/D91700/func_80240530_D91C30.s b/ver/us/asm/nonmatchings/world/area_pra/pra_36/D91700/func_80240530_D91C30.s index 676635ed4e..9e5a71e38a 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_36/D91700/func_80240530_D91C30.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_36/D91700/func_80240530_D91C30.s @@ -17,7 +17,7 @@ glabel func_80240530_D91C30 /* D91C60 80240560 8E0400CC */ lw $a0, 0xcc($s0) /* D91C64 80240564 0C044181 */ jal get_shadow_by_index /* D91C68 80240568 00000000 */ nop -/* D91C6C 8024056C 0C048B77 */ jal func_80122DDC +/* D91C6C 8024056C 0C048B77 */ jal get_entity_model /* D91C70 80240570 84440008 */ lh $a0, 8($v0) /* D91C74 80240574 8E050028 */ lw $a1, 0x28($s0) /* D91C78 80240578 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_37/D92F40/func_80240158_D93098.s b/ver/us/asm/nonmatchings/world/area_pra/pra_37/D92F40/func_80240158_D93098.s index 8bd758e570..8dcd2950d6 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_37/D92F40/func_80240158_D93098.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_37/D92F40/func_80240158_D93098.s @@ -17,7 +17,7 @@ glabel func_80240158_D93098 /* D930C8 80240188 8E0400CC */ lw $a0, 0xcc($s0) /* D930CC 8024018C 0C044181 */ jal get_shadow_by_index /* D930D0 80240190 00000000 */ nop -/* D930D4 80240194 0C048B77 */ jal func_80122DDC +/* D930D4 80240194 0C048B77 */ jal get_entity_model /* D930D8 80240198 84440008 */ lh $a0, 8($v0) /* D930DC 8024019C 8C430000 */ lw $v1, ($v0) /* D930E0 802401A0 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_37/D92F40/func_80240530_D93470.s b/ver/us/asm/nonmatchings/world/area_pra/pra_37/D92F40/func_80240530_D93470.s index 298d57fcca..4ce7f58808 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_37/D92F40/func_80240530_D93470.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_37/D92F40/func_80240530_D93470.s @@ -17,7 +17,7 @@ glabel func_80240530_D93470 /* D934A0 80240560 8E0400CC */ lw $a0, 0xcc($s0) /* D934A4 80240564 0C044181 */ jal get_shadow_by_index /* D934A8 80240568 00000000 */ nop -/* D934AC 8024056C 0C048B77 */ jal func_80122DDC +/* D934AC 8024056C 0C048B77 */ jal get_entity_model /* D934B0 80240570 84440008 */ lh $a0, 8($v0) /* D934B4 80240574 8E050028 */ lw $a1, 0x28($s0) /* D934B8 80240578 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_38/D955F0/func_80240158_D95748.s b/ver/us/asm/nonmatchings/world/area_pra/pra_38/D955F0/func_80240158_D95748.s index ca8e91fa2d..1b64d9a090 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_38/D955F0/func_80240158_D95748.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_38/D955F0/func_80240158_D95748.s @@ -17,7 +17,7 @@ glabel func_80240158_D95748 /* D95778 80240188 8E0400CC */ lw $a0, 0xcc($s0) /* D9577C 8024018C 0C044181 */ jal get_shadow_by_index /* D95780 80240190 00000000 */ nop -/* D95784 80240194 0C048B77 */ jal func_80122DDC +/* D95784 80240194 0C048B77 */ jal get_entity_model /* D95788 80240198 84440008 */ lh $a0, 8($v0) /* D9578C 8024019C 8C430000 */ lw $v1, ($v0) /* D95790 802401A0 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_38/D955F0/func_80240530_D95B20.s b/ver/us/asm/nonmatchings/world/area_pra/pra_38/D955F0/func_80240530_D95B20.s index 2a873e2a9a..fa4bb66264 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_38/D955F0/func_80240530_D95B20.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_38/D955F0/func_80240530_D95B20.s @@ -17,7 +17,7 @@ glabel func_80240530_D95B20 /* D95B50 80240560 8E0400CC */ lw $a0, 0xcc($s0) /* D95B54 80240564 0C044181 */ jal get_shadow_by_index /* D95B58 80240568 00000000 */ nop -/* D95B5C 8024056C 0C048B77 */ jal func_80122DDC +/* D95B5C 8024056C 0C048B77 */ jal get_entity_model /* D95B60 80240570 84440008 */ lh $a0, 8($v0) /* D95B64 80240574 8E050028 */ lw $a1, 0x28($s0) /* D95B68 80240578 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_39/D97890/func_80240158_D979E8.s b/ver/us/asm/nonmatchings/world/area_pra/pra_39/D97890/func_80240158_D979E8.s index d38f557431..23a25bb036 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_39/D97890/func_80240158_D979E8.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_39/D97890/func_80240158_D979E8.s @@ -17,7 +17,7 @@ glabel func_80240158_D979E8 /* D97A18 80240188 8E0400CC */ lw $a0, 0xcc($s0) /* D97A1C 8024018C 0C044181 */ jal get_shadow_by_index /* D97A20 80240190 00000000 */ nop -/* D97A24 80240194 0C048B77 */ jal func_80122DDC +/* D97A24 80240194 0C048B77 */ jal get_entity_model /* D97A28 80240198 84440008 */ lh $a0, 8($v0) /* D97A2C 8024019C 8C430000 */ lw $v1, ($v0) /* D97A30 802401A0 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_39/D97890/func_80240530_D97DC0.s b/ver/us/asm/nonmatchings/world/area_pra/pra_39/D97890/func_80240530_D97DC0.s index 17922d1e3e..0ba474e49f 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_39/D97890/func_80240530_D97DC0.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_39/D97890/func_80240530_D97DC0.s @@ -17,7 +17,7 @@ glabel func_80240530_D97DC0 /* D97DF0 80240560 8E0400CC */ lw $a0, 0xcc($s0) /* D97DF4 80240564 0C044181 */ jal get_shadow_by_index /* D97DF8 80240568 00000000 */ nop -/* D97DFC 8024056C 0C048B77 */ jal func_80122DDC +/* D97DFC 8024056C 0C048B77 */ jal get_entity_model /* D97E00 80240570 84440008 */ lh $a0, 8($v0) /* D97E04 80240574 8E050028 */ lw $a1, 0x28($s0) /* D97E08 80240578 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_40/D999D0/func_80240128_D99AD8.s b/ver/us/asm/nonmatchings/world/area_pra/pra_40/D999D0/func_80240128_D99AD8.s index b754ec8082..2b816124f0 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_40/D999D0/func_80240128_D99AD8.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_40/D999D0/func_80240128_D99AD8.s @@ -17,7 +17,7 @@ glabel func_80240128_D99AD8 /* D99B08 80240158 8E0400CC */ lw $a0, 0xcc($s0) /* D99B0C 8024015C 0C044181 */ jal get_shadow_by_index /* D99B10 80240160 00000000 */ nop -/* D99B14 80240164 0C048B77 */ jal func_80122DDC +/* D99B14 80240164 0C048B77 */ jal get_entity_model /* D99B18 80240168 84440008 */ lh $a0, 8($v0) /* D99B1C 8024016C 8C430000 */ lw $v1, ($v0) /* D99B20 80240170 34630200 */ ori $v1, $v1, 0x200 diff --git a/ver/us/asm/nonmatchings/world/area_pra/pra_40/D999D0/func_80240500_D99EB0.s b/ver/us/asm/nonmatchings/world/area_pra/pra_40/D999D0/func_80240500_D99EB0.s index 081bbc3210..fbc5861cb4 100644 --- a/ver/us/asm/nonmatchings/world/area_pra/pra_40/D999D0/func_80240500_D99EB0.s +++ b/ver/us/asm/nonmatchings/world/area_pra/pra_40/D999D0/func_80240500_D99EB0.s @@ -17,7 +17,7 @@ glabel func_80240500_D99EB0 /* D99EE0 80240530 8E0400CC */ lw $a0, 0xcc($s0) /* D99EE4 80240534 0C044181 */ jal get_shadow_by_index /* D99EE8 80240538 00000000 */ nop -/* D99EEC 8024053C 0C048B77 */ jal func_80122DDC +/* D99EEC 8024053C 0C048B77 */ jal get_entity_model /* D99EF0 80240540 84440008 */ lh $a0, 8($v0) /* D99EF4 80240544 8E050028 */ lw $a1, 0x28($s0) /* D99EF8 80240548 8E070030 */ lw $a3, 0x30($s0) diff --git a/ver/us/asm/nonmatchings/world/area_tst/tst_04/B1B570/func_8024029C_B1B80C.s b/ver/us/asm/nonmatchings/world/area_tst/tst_04/B1B570/func_8024029C_B1B80C.s index 6931ac219d..b886a049da 100644 --- a/ver/us/asm/nonmatchings/world/area_tst/tst_04/B1B570/func_8024029C_B1B80C.s +++ b/ver/us/asm/nonmatchings/world/area_tst/tst_04/B1B570/func_8024029C_B1B80C.s @@ -15,7 +15,7 @@ glabel func_8024029C_B1B80C /* B1B834 802402C4 8E0400CC */ lw $a0, 0xcc($s0) /* B1B838 802402C8 0C044181 */ jal get_shadow_by_index /* B1B83C 802402CC 00000000 */ nop -/* B1B840 802402D0 0C048B77 */ jal func_80122DDC +/* B1B840 802402D0 0C048B77 */ jal get_entity_model /* B1B844 802402D4 84440008 */ lh $a0, 8($v0) /* B1B848 802402D8 8C430000 */ lw $v1, ($v0) /* B1B84C 802402DC 3C04800A */ lui $a0, %hi(D_8009A634) diff --git a/ver/us/asm/nonmatchings/world/area_tst/tst_11/B1CA50/func_8024003C_B1CA8C.s b/ver/us/asm/nonmatchings/world/area_tst/tst_11/B1CA50/func_8024003C_B1CA8C.s index 6ebded1a1f..246bdaeaf3 100644 --- a/ver/us/asm/nonmatchings/world/area_tst/tst_11/B1CA50/func_8024003C_B1CA8C.s +++ b/ver/us/asm/nonmatchings/world/area_tst/tst_11/B1CA50/func_8024003C_B1CA8C.s @@ -15,7 +15,7 @@ glabel func_8024003C_B1CA8C /* B1CAB4 80240064 8E0400CC */ lw $a0, 0xcc($s0) /* B1CAB8 80240068 0C044181 */ jal get_shadow_by_index /* B1CABC 8024006C 00000000 */ nop -/* B1CAC0 80240070 0C048B77 */ jal func_80122DDC +/* B1CAC0 80240070 0C048B77 */ jal get_entity_model /* B1CAC4 80240074 84440008 */ lh $a0, 8($v0) /* B1CAC8 80240078 8C430000 */ lw $v1, ($v0) /* B1CACC 8024007C 3C04800A */ lui $a0, %hi(D_8009A634) diff --git a/ver/us/asm/nonmatchings/world/area_tst/tst_11/B1CA50/func_802402F4_B1CD44.s b/ver/us/asm/nonmatchings/world/area_tst/tst_11/B1CA50/func_802402F4_B1CD44.s index e2fa44cc05..7184164434 100644 --- a/ver/us/asm/nonmatchings/world/area_tst/tst_11/B1CA50/func_802402F4_B1CD44.s +++ b/ver/us/asm/nonmatchings/world/area_tst/tst_11/B1CA50/func_802402F4_B1CD44.s @@ -15,7 +15,7 @@ glabel func_802402F4_B1CD44 /* B1CD6C 8024031C 8E0400CC */ lw $a0, 0xcc($s0) /* B1CD70 80240320 0C044181 */ jal get_shadow_by_index /* B1CD74 80240324 00000000 */ nop -/* B1CD78 80240328 0C048B77 */ jal func_80122DDC +/* B1CD78 80240328 0C048B77 */ jal get_entity_model /* B1CD7C 8024032C 84440008 */ lh $a0, 8($v0) /* B1CD80 80240330 8C430000 */ lw $v1, ($v0) /* B1CD84 80240334 3C04800A */ lui $a0, %hi(D_8009A634) diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index 61215e822b..42321877c6 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -9961,130 +9961,166 @@ segments: - [0xE22B30, data] - [0xE23230, .rodata, E225B0] - type: code + name: world_action_idle + dir: world/action start: 0xE23260 vram: 0x802B6000 overlay: True subsegments: - - [0xE23260, c] - - [0xE23690, data] + - [0xE23260, c, idle] + - [0xE23690, .data, idle] - type: code + name: world_action_walk + dir: world/action start: 0xE236E0 vram: 0x802B6000 overlay: True subsegments: - - [0xE236E0, c] - - [0xE23FF0, data] + - [0xE236E0, c, walk] + - [0xE23FF0, data, walk] - type: code + name: world_action_jump + dir: world/action start: 0xE24040 vram: 0x802B6000 overlay: True subsegments: - - [0xE24040, c] + - [0xE24040, c, jump] - type: code + name: world_action_18 + dir: world/action start: 0xE245D0 vram: 0x802B6000 overlay: True subsegments: - - [0xE245D0, c] - - [0xE248D0, data] + - [0xE245D0, c, 18] + - [0xE248D0, data, 18] - type: code + name: world_action_land + dir: world/action start: 0xE24920 vram: 0x802B6000 overlay: True subsegments: - - [0xE24920, c] + - [0xE24920, c, land] - type: code + name: world_action_hammer + dir: world/action start: 0xE24ED0 vram: 0x802B6000 overlay: True subsegments: - - [0xE24ED0, c, E24ED0] - - [0xE25C80, data] - - [0xE25CC0, .rodata, E24ED0] + - [0xE24ED0, c, hammer] + - [0xE25C80, data, hammer] + - [0xE25CC0, .rodata, hammer] - type: code + name: world_action_spin + dir: world/action start: 0xE25D60 vram: 0x802B6000 overlay: True subsegments: - - [0xE25D60, c, E25D60] - - [0xE26700, .rodata, E25D60] + - [0xE25D60, c, spin] + - [0xE26700, .rodata, spin] - type: code + name: world_action_ultra_boots + dir: world/action start: 0xE26710 vram: 0x802B6000 overlay: True subsegments: - - [0xE26710, c, E26710] - - [0xE26DA0, .rodata, E26710] + - [0xE26710, c, ultra_boots] + - [0xE26DA0, .rodata, ultra_boots] - type: code + name: world_action_super_boots + dir: world/action start: 0xE26DE0 vram: 0x802B6000 overlay: True subsegments: - - [0xE26DE0, c, E26DE0] - - [0xE274C0, .rodata, E26DE0] + - [0xE26DE0, c, super_boots] + - [0xE274C0, .rodata, super_boots] - type: code + name: world_action_slide + dir: world/action start: 0xE27510 vram: 0x802B6000 overlay: True subsegments: - - [0xE27510, c, E27510] - - [0xE27C50, .rodata, E27510] + - [0xE27510, c, slide] + - [0xE27C50, .rodata, slide] - type: code + name: world_action_hit_fire + dir: world/action start: 0xE27C90 vram: 0x802B6000 overlay: True subsegments: - - [0xE27C90, c] + - [0xE27C90, c, hit_fire] - type: code + name: world_action_hit_lava + dir: world/action start: 0xE27F40 vram: 0x802B6000 overlay: True subsegments: - - [0xE27F40, c, E27F40] - - [0xE28790, .rodata, E27F40] + - [0xE27F40, c, hit_lava] + - [0xE28790, .rodata, hit_lava] - type: code + name: world_action_16 + dir: world/action start: 0xE287F0 vram: 0x802B6000 overlay: True subsegments: - - [0xE287F0, c] + - [0xE287F0, c, 16] - type: code + name: world_action_encounter + dir: world/action start: 0xE28A30 vram: 0x802B6000 overlay: True subsegments: - - [0xE28A30, c, E28A30] - - [0xE29190, .rodata, E28A30] + - [0xE28A30, c, encounter] + - [0xE29190, .rodata, encounter] - type: code + name: world_action_use_munchlesia + dir: world/action start: 0xE291A0 vram: 0x802B6000 overlay: True subsegments: - - [0xE291A0, c, E291A0] - - [0xE29450, .rodata, E291A0] + - [0xE291A0, c, use_munchlesia] + - [0xE29450, .rodata, use_munchlesia] - type: code + name: world_action_use_spinning_flower + dir: world/action start: 0xE29470 vram: 0x802B6000 overlay: True subsegments: - - [0xE29470, c, E29470] - - [0xE2A300, .rodata, E29470] + - [0xE29470, c, use_spinning_flower] + - [0xE2A300, .rodata, use_spinning_flower] - type: code + name: world_action_use_tweester + dir: world/action start: 0xE2A340 vram: 0x802B6000 overlay: True subsegments: - - [0xE2A340, c, E2A340] - - [0xE2A690, data] - - [0xE2A6A0, .rodata, E2A340] + - [0xE2A340, c, use_tweester] + - [0xE2A690, data, use_tweester] + - [0xE2A6A0, .rodata, use_tweester] - type: code + name: world_action_sneaky_parasol + dir: world/action start: 0xE2A6B0 vram: 0x802B6000 overlay: True subsegments: - - [0xE2A6B0, c, E2A6B0] - - [0xE2B420, data] - - [0xE2B440, .rodata, E2A6B0] + - [0xE2A6B0, c, sneaky_parasol] + - [0xE2B420, data, sneaky_parasol] + - [0xE2B440, .rodata, sneaky_parasol] - type: code dir: entity/default start: 0xE2B530 diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index 3c02f71854..409f72b762 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -279,7 +279,7 @@ func_8003BA60 = 0x8003BA60; // type:func rom:0x16E60 func_8003BED8 = 0x8003BED8; // type:func rom:0x172D8 func_8003C3D8 = 0x8003C3D8; // type:func rom:0x177D8 func_8003C428 = 0x8003C428; // type:func rom:0x17828 -func_8003C444 = 0x8003C444; // type:func rom:0x17844 +npc_update_decorations = 0x8003C444; // type:func rom:0x17844 func_8003C53C = 0x8003C53C; // type:func rom:0x1793C func_8003C61C = 0x8003C61C; // type:func rom:0x17A1C func_8003C658 = 0x8003C658; // type:func rom:0x17A58 @@ -1587,7 +1587,7 @@ func_800E5530 = 0x800E5530; // type:func rom:0x7E9E0 func_800E58F0 = 0x800E58F0; // type:func rom:0x7EDA0 func_800E5938 = 0x800E5938; // type:func rom:0x7EDE8 func_800E59A0 = 0x800E59A0; // type:func rom:0x7EE50 -func_800E5A2C = 0x800E5A2C; // type:func rom:0x7EEDC +phys_update_action_state = 0x800E5A2C; // type:func rom:0x7EEDC func_800E5C78 = 0x800E5C78; // type:func rom:0x7F128 set_action_state = 0x800E5DA4; // type:func rom:0x7F254 update_locomotion_state = 0x800E5F68; // type:func rom:0x7F418 @@ -1720,8 +1720,8 @@ func_800EECE8 = 0x800EECE8; // type:func rom:0x88198 func_800EF300 = 0x800EF300; // type:func rom:0x887B0 func_800EF314 = 0x800EF314; // type:func rom:0x887C4 enable_partner_ai = 0x800EF328; // type:func rom:0x887D8 -set_parter_tether_distance = 0x800EF394; // type:func rom:0x88844 -reset_parter_tether_distance = 0x800EF3A4; // type:func rom:0x88854 +set_partner_tether_distance = 0x800EF394; // type:func rom:0x88844 +reset_partner_tether_distance = 0x800EF3A4; // type:func rom:0x88854 func_800EF3C0 = 0x800EF3C0; // type:func rom:0x88870 func_800EF3D4 = 0x800EF3D4; // type:func rom:0x88884 func_800EF3E4 = 0x800EF3E4; // type:func rom:0x88894 @@ -1775,8 +1775,7 @@ D_800F7B80 = 0x800F7B80; // type:data rom:0x91030 D_800F7B84 = 0x800F7B84; // type:data rom:0x91034 D_800F7B90 = 0x800F7B90; // type:data rom:0x91040 D_800F7B94 = 0x800F7B94; // type:data rom:0x91044 -D_800F7C1C = 0x800F7C1C; // type:data rom:0x910CC -D_800F7C30 = 0x800F7C30; // type:data rom:0x910E0 +world_actions_peachDisguises = 0x800F7C1C; // type:data rom:0x910CC size:0x48 D_800F7C7C = 0x800F7C7C; // type:data rom:0x9112C D_800F7C8C = 0x800F7C8C; // type:data rom:0x9113C D_800F7F00 = 0x800F7F00; // type:data rom:0x913B0 @@ -2025,7 +2024,7 @@ draw_entity_model_extra1 = 0x80122088; // type:func rom:0xB8788 draw_entity_model_extra2 = 0x80122188; // type:func rom:0xB8888 draw_entity_model_extra3 = 0x80122288; // type:func rom:0xB8988 func_80122D7C = 0x80122D7C; // type:func rom:0xB947C -func_80122DDC = 0x80122DDC; // type:func rom:0xB94DC +get_entity_model = 0x80122DDC; // type:func rom:0xB94DC free_entity_model_by_index = 0x80122DFC; // type:func rom:0xB94FC free_entity_model_by_ref = 0x80122E94; // type:func rom:0xB9594 set_entity_model_flags = 0x80122EE8; // type:func rom:0xB95E8 @@ -3069,7 +3068,7 @@ func_802DDFF8 = 0x802DDFF8; // type:func rom:0x1010E8 func_802DE044 = 0x802DE044; // type:func rom:0x101134 func_802DE0C0 = 0x802DE0C0; // type:func rom:0x1011B0 func_802DE0EC = 0x802DE0EC; // type:func rom:0x1011DC -func_802DE2AC = 0x802DE2AC; // type:func rom:0x10139C +spr_update_sprite = 0x802DE2AC; // type:func rom:0x10139C func_802DE3D8 = 0x802DE3D8; // type:func rom:0x1014C8 func_802DE5C8 = 0x802DE5C8; // type:func rom:0x1016B8 func_802DE5E8 = 0x802DE5E8; // type:func rom:0x1016D8 @@ -16022,7 +16021,7 @@ D_802B7C00_E231B0 = 0x802B7C00; // type:data rom:0xE231B0 D_802B7C78_E23228 = 0x802B7C78; // type:data rom:0xE23228 func_802B6000_E23260 = 0x802B6000; // type:func rom:0xE23260 func_802B61E4_E23444 = 0x802B61E4; // type:func rom:0xE23444 -D_802B6430_E23690 = 0x802B6430; // type:data rom:0xE23690 +world_action_idle_peachAnims = 0x802B6430; // type:data rom:0xE23690 func_802B6000_E236E0 = 0x802B6000; // type:func rom:0xE236E0 func_802B6288_E23968 = 0x802B6288; // type:func rom:0xE23968 func_802B6550_E23C30 = 0x802B6550; // type:func rom:0xE23C30 diff --git a/ver/us/undefined_syms_auto.txt b/ver/us/undefined_syms_auto.txt index 036e20f259..eb3c88a1e5 100644 --- a/ver/us/undefined_syms_auto.txt +++ b/ver/us/undefined_syms_auto.txt @@ -50,8 +50,6 @@ D_800F7B60 = 0x800F7B60; D_800F7B70 = 0x800F7B70; D_800F7B80 = 0x800F7B80; D_800F7B90 = 0x800F7B90; -D_800F7C1C = 0x800F7C1C; -D_800F7C30 = 0x800F7C30; D_800F7C7C = 0x800F7C7C; D_800F7C8C = 0x800F7C8C; D_800F7F00 = 0x800F7F00;