diff --git a/.gitignore b/.gitignore index 3a9a53c61ee..3d483152687 100644 --- a/.gitignore +++ b/.gitignore @@ -52,24 +52,10 @@ build/ *.sbn # Star Rod -/sprite/SpriteTable.xml -/mod.cfg -/tools/star-rod -/editor -/logs -/out -dump +.starrod +/ver/us/dump *.backup -crash.xml -/audio/* -/sprite/* -/battle/* -/globals/* -/map/* -/world/* -/image/* -/strings/* -/res/* +*.crash /tools/Yay0compress /tools/n64crc diff --git a/include/common_structs.h b/include/common_structs.h index 5ec023cadbb..69440fbe9e5 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -381,7 +381,7 @@ typedef struct Trigger { /* 0x04 */ s32 varIndex; /* 0x08 */ union { /* */ s32 colliderID; - /* */ Vec4f* pos; + /* */ struct BombTrigger* blast; /* */ } location; /* 0x0C */ s32 (*onActivateFunc)(struct Trigger*); /* 0x10 */ EvtScript* onTriggerEvt; @@ -1758,15 +1758,9 @@ typedef struct LavaReset { typedef struct BombTrigger { /* 0x00 */ Vec3f pos; - /* 0x0C */ s32 radius; // effective 'size' of the object, usually set to zero because bombettes explosion radius is large enough + /* 0x0C */ f32 diameter; // effective 'size' of the object, usually set to zero because bombettes explosion radius is large enough } BombTrigger; // size = 0x10; -// the use of this is a bug in sam_11 -typedef struct BombTriggerF { - /* 0x00 */ Vec3f pos; - /* 0x0C */ f32 radius; -} BombTriggerF; // size = 0x10; - typedef struct AnimatedModel { /* 0x00 */ s32 animModelID; /* 0x04 */ Vec3f pos; diff --git a/include/entity.h b/include/entity.h index 26e0e69e173..df326a047f2 100644 --- a/include/entity.h +++ b/include/entity.h @@ -6,7 +6,7 @@ typedef s32 EntityScript[]; typedef s32 EntityModelScript[]; -extern s32 CreateEntityVarArgBuffer[4]; +extern s32 CreateEntityVarArgBuffer[]; enum { ENTITY_SCRIPT_OP_End, @@ -360,9 +360,7 @@ typedef struct SpinningFlowerData { /* 0x14 */ f32 spinSpeed; /* 0x18 */ s32 unk_18; /* 0x1C */ char unk_1C[0x0C]; - /* 0x28 */ s16 unk_28; - /* 0x2A */ s16 unk_2A; - /* 0x2C */ s16 unk_2C; + /* 0x28 */ Vec3s pos; /* 0x30 */ Mtx unk_30; } SpinningFlowerData; // size = 0x70 @@ -399,16 +397,16 @@ extern EntityBlueprint Entity_InertRedBlock; extern EntityBlueprint Entity_BrickBlock; extern EntityBlueprint Entity_MulticoinBlock; extern EntityBlueprint Entity_Hammer1Block; -extern EntityBlueprint Entity_Hammer1Block_WideX; -extern EntityBlueprint Entity_Hammer1Block_WideZ; +extern EntityBlueprint Entity_Hammer1BlockWideX; +extern EntityBlueprint Entity_Hammer1BlockWideZ; extern EntityBlueprint Entity_Hammer1BlockTiny; extern EntityBlueprint Entity_Hammer2Block; -extern EntityBlueprint Entity_Hammer2Block_WideX; -extern EntityBlueprint Entity_Hammer2Block_WideZ; +extern EntityBlueprint Entity_Hammer2BlockWideX; +extern EntityBlueprint Entity_Hammer2BlockWideZ; extern EntityBlueprint Entity_Hammer2BlockTiny; extern EntityBlueprint Entity_Hammer3Block; -extern EntityBlueprint Entity_Hammer3Block_WideX; -extern EntityBlueprint Entity_Hammer3Block_WideZ; +extern EntityBlueprint Entity_Hammer3BlockWideX; +extern EntityBlueprint Entity_Hammer3BlockWideZ; extern EntityBlueprint Entity_Hammer3BlockTiny; extern EntityBlueprint Entity_PushBlock; extern EntityBlueprint Entity_PowBlock; @@ -433,7 +431,7 @@ extern EntityBlueprint Entity_PadlockRedFace; extern EntityBlueprint Entity_PadlockBlueFace; extern EntityBlueprint Entity_BoardedFloor; extern EntityBlueprint Entity_BombableRock; -extern EntityBlueprint Entity_BombableRock2; +extern EntityBlueprint Entity_BombableRockWide; extern EntityBlueprint Entity_Tweester; extern EntityBlueprint Entity_StarBoxLauncher; extern EntityBlueprint Entity_CymbalPlant; diff --git a/include/functions.h b/include/functions.h index b50c9197748..8594e8dc5e2 100644 --- a/include/functions.h +++ b/include/functions.h @@ -248,8 +248,8 @@ s32 phys_can_player_interact(void); void ai_enemy_play_sound(Npc* npc, s32 arg1, s32 arg2); -s32 player_test_move_without_slipping(PlayerStatus*, f32*, f32*, f32*, f32, f32, s32*); -s32 player_test_move_with_slipping(PlayerStatus* playerStatus, f32* posX, f32* posY, f32* posZ, f32 speed, f32 heading); +HitID player_test_move_without_slipping(PlayerStatus*, f32*, f32*, f32*, f32, f32, s32*); +HitID player_test_move_with_slipping(PlayerStatus* playerStatus, f32* posX, f32* posY, f32* posZ, f32 speed, f32 heading); s32 evt_get_variable(Evt* script, Bytecode var); s32 evt_set_variable(Evt* script, Bytecode var, s32 value); @@ -274,6 +274,24 @@ s32 test_ray_zones(f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f32 d f32* hitDepth, f32* nx, f32* ny, f32* nz); s32 test_ray_colliders(s32 ignoreFlags, f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f32 dirZ, f32* hitX, f32* hitY, f32* hitZ, f32* hitDepth, f32* hitNx, f32* hitNy, f32* hitNz); + +/// Test a general ray from a given starting position and direction against all entities. +/// If one is hit, returns the position and normal of the hit and the length along the ray on the output params. +/// All output params are invalid when a value of `NO_COLLIDER` is returned. +/// @param startX origin x position of the ray +/// @param startY origin y position of the ray +/// @param startZ origin z position of the ray +/// @param dirX normalized x direction of the ray +/// @param dirY normalized y direction of the ray +/// @param dirZ normalized z direction of the ray +/// @param[out] hitX normalized x position of the hit +/// @param[out] hitY normalized y position of the hit +/// @param[out] hitZ normalized z position of the hit +/// @param[in,out] hitDepth as input, maximum length of the ray; as output, distance along the ray of the hit +/// @param[out] hitNx x normal direction of the hit +/// @param[out] hitNy y normal direction of the hit +/// @param[out] hitNz z normal direction of the hit +/// @returns entity index or `NO_COLLIDER` is none is hit s32 test_ray_entities(f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f32 dirZ, f32* hitX, f32* hitY, f32* hitZ, f32* hitDepth, f32* hitNx, f32* hitNy, f32* hitNz); @@ -402,9 +420,9 @@ PlayerData* get_player_data(void); b32 npc_raycast_down_around(s32, f32*, f32*, f32*, f32*, f32, f32); b32 npc_raycast_down_sides(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth); s32 npc_raycast_up(s32, f32*, f32*, f32*, f32*); -s32 npc_raycast_up_corners(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw, f32 radius); +HitID npc_raycast_up_corners(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw, f32 radius); s32 player_raycast_up_corners(PlayerStatus*, f32*, f32*, f32*, f32*, f32); -s32 player_raycast_below_cam_relative(PlayerStatus* playerStatus, f32* outX, f32* outY, f32* outZ, f32* outLength, +HitID player_raycast_below_cam_relative(PlayerStatus* playerStatus, f32* outX, f32* outY, f32* outZ, f32* outLength, f32* hitRx, f32* hitRz, f32* hitDirX, f32* hitDirZ); b32 npc_test_move_taller_with_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32); b32 npc_test_move_simple_with_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32); diff --git a/include/npc.h b/include/npc.h index c860816ecd4..3c3e58dcf4e 100644 --- a/include/npc.h +++ b/include/npc.h @@ -155,7 +155,7 @@ typedef struct NpcSettings { typedef struct ItemDrop { /* 0x00 */ s16 item; /* 0x02 */ s16 weight; - /* 0x04 */ s16 unk_04; + /* 0x04 */ s16 flagIdx; } ItemDrop; // size = 0x06 /// @brief Describes heart/flower drop chances after defeating an Npc in the overworld. @@ -239,7 +239,6 @@ typedef struct { typedef union { EnemyTerritoryWander wander; EnemyTerritoryPatrol patrol; - s32 temp[48]; // TODO: remove when old map data is replaced char PADDING[0xC0]; } EnemyTerritory; // size = 0xC0 diff --git a/include/saved_flag_names.h b/include/saved_flag_names.h index a9a2e4b1700..c0e0caed839 100644 --- a/include/saved_flag_names.h +++ b/include/saved_flag_names.h @@ -404,7 +404,7 @@ enum GameFlags { GF_TIK03_ItemBlock_SnowmanDoll = GameFlag(0x190), GF_TIK03_ItemBlock_CoinA = GameFlag(0x191), GF_TIK03_ItemBlock_CoinB = GameFlag(0x192), - GF_TIK05_Chest_PowerSmash1 = GameFlag(0x193), + GF_TIK05_Chest_PowerSmash = GameFlag(0x193), GF_TIK07_Item_StarPiece = GameFlag(0x194), GF_TIK10_HiddenItem_CoinA = GameFlag(0x195), GF_TIK10_HiddenItem_CoinB = GameFlag(0x196), diff --git a/include/script_api/macros.h b/include/script_api/macros.h index a0b47752f6b..de355624f25 100644 --- a/include/script_api/macros.h +++ b/include/script_api/macros.h @@ -43,14 +43,14 @@ #define EVT_LIMIT -270000000 // TODO better name // This fixes an issue with fixed point numbers not being correct. Potentially a truncation vs round difference. -#define Float_ROUND(x) ((x) >=0 ? (f64)((x) + 0.9) : (f64)(x)) -#define Float(DOUBLE) ((Bytecode)Float_ROUND(((DOUBLE) * 1024.0f)) - EVT_FIXED_OFFSET) +#define FLOAT_ROUND(x) ((x) >=0 ? (f64)((x) + 0.9) : (f64)(x)) +#define Float(DOUBLE) ((Bytecode)FLOAT_ROUND(((DOUBLE) * 1024.0f)) - EVT_FIXED_OFFSET) /// Progammatically converts Float --> f32 #define EVT_FIXED_TO_FLOAT(x) ({f32 var = (x) + EVT_FIXED_OFFSET; var /= 1024.0f; var;}) /// Progammatically converts f32 --> Float -#define Float_TO_FIXED(x) (((x) * 1024.0f) + -EVT_FIXED_OFFSET) +#define FLOAT_TO_FIXED(x) (((x) * 1024.0f) + -EVT_FIXED_OFFSET) /// Address/pointer constant. #define Ref(sym) ((Bytecode) &(sym)) diff --git a/include/variables.h b/include/variables.h index 163a17f5270..5274c463afb 100644 --- a/include/variables.h +++ b/include/variables.h @@ -60,8 +60,8 @@ extern char wMapTexName[]; extern char wMapHitName[]; extern char wMapShapeName[]; extern char wMapBgName[]; -extern u8 D_802D9D70; // player alpha1 copy? -extern u8 D_802D9D71; // player alpha2 copy? +extern u8 ReflectWallPrevAlpha; // player alpha1 copy? +extern u8 ReflectFloorPrevAlpha; // player alpha2 copy? extern DisplayContext D_80164000[2]; diff --git a/src/77480.c b/src/77480.c index 87ef4de087c..b1ab1ead968 100644 --- a/src/77480.c +++ b/src/77480.c @@ -41,9 +41,9 @@ extern f32 D_800F7B48; extern s32 D_800F7B4C; extern s32 WorldTattleInteractionID; -s32 player_raycast_down(f32*, f32*, f32*, f32*); -s32 player_raycast_up_corner(f32* x, f32* y, f32* z, f32* length); -s32 player_raycast_general(s32, f32, f32, f32, f32, f32, f32, f32*, f32*, f32*, f32*, f32*, f32*, f32*); +HitID player_raycast_down(f32*, f32*, f32*, f32*); +HitID player_raycast_up_corner(f32* x, f32* y, f32* z, f32* length); +HitID player_raycast_general(s32, f32, f32, f32, f32, f32, f32, f32*, f32*, f32*, f32*, f32*, f32*, f32*); void player_get_slip_vector(f32* outX, f32* outY, f32 x, f32 y, f32 nX, f32 nY); void phys_update_standard(void); void phys_update_lava_reset(void); @@ -68,7 +68,7 @@ void appendGfx_player_spin(void* data); void update_player_shadow(void); s32 partner_use_ability(void); -s32 player_raycast_below(f32 yaw, f32 diameter, f32* outX, f32* outY, f32* outZ, f32* outLength, f32* hitRx, f32* hitRz, +HitID player_raycast_below(f32 yaw, f32 diameter, f32* outX, f32* outY, f32* outZ, f32* outLength, f32* hitRx, f32* hitRz, f32* hitDirX, f32* hitDirZ) { f32 x, y, z, length; f32 inputX, inputY, inputZ, inputLength; @@ -77,7 +77,7 @@ s32 player_raycast_below(f32 yaw, f32 diameter, f32* outX, f32* outY, f32* outZ, f32 temp_f20; f32 cosTemp; f32 sinTemp; - s32 hitObjectID; + s32 hitID; s32 ret; *hitRx = 0.0f; @@ -97,9 +97,9 @@ s32 player_raycast_below(f32 yaw, f32 diameter, f32* outX, f32* outY, f32* outZ, y = inputY; z = inputZ + cosTemp; length = inputLength; - hitObjectID = player_raycast_down(&x, &y, &z, &length); + hitID = player_raycast_down(&x, &y, &z, &length); ret = NO_COLLIDER; - if (hitObjectID >= 0 && length <= fabsf(*outLength)) { + if (hitID > NO_COLLIDER && length <= fabsf(*outLength)) { *hitRx = -gGameStatusPtr->playerGroundTraceAngles.x; *hitRz = -gGameStatusPtr->playerGroundTraceAngles.z; *outX = x; @@ -108,15 +108,15 @@ s32 player_raycast_below(f32 yaw, f32 diameter, f32* outX, f32* outY, f32* outZ, *outLength = length; *hitDirX = sinTemp; *hitDirZ = cosTemp; - ret = hitObjectID; + ret = hitID; } x = inputX - sinTemp; y = inputY; z = inputZ - cosTemp; length = inputLength; - hitObjectID = player_raycast_down(&x, &y, &z, &length); - if (hitObjectID >= 0 && length <= fabsf(*outLength)) { + hitID = player_raycast_down(&x, &y, &z, &length); + if (hitID > NO_COLLIDER && length <= fabsf(*outLength)) { *hitRx = -gGameStatusPtr->playerGroundTraceAngles.x; *hitRz = -gGameStatusPtr->playerGroundTraceAngles.z; *outX = x; @@ -125,15 +125,15 @@ s32 player_raycast_below(f32 yaw, f32 diameter, f32* outX, f32* outY, f32* outZ, *outLength = length; *hitDirX = -sinTemp; *hitDirZ = -cosTemp; - ret = hitObjectID; + ret = hitID; } x = inputX + cosTemp; y = inputY; z = inputZ + sinTemp; length = inputLength; - hitObjectID = player_raycast_down(&x, &y, &z, &length); - if (hitObjectID >= 0 && length <= fabsf(*outLength)) { + hitID = player_raycast_down(&x, &y, &z, &length); + if (hitID > NO_COLLIDER && length <= fabsf(*outLength)) { *hitRx = -gGameStatusPtr->playerGroundTraceAngles.x; *hitRz = -gGameStatusPtr->playerGroundTraceAngles.z; *outX = x; @@ -142,15 +142,15 @@ s32 player_raycast_below(f32 yaw, f32 diameter, f32* outX, f32* outY, f32* outZ, *outLength = length; *hitDirX = sinTemp; *hitDirZ = cosTemp; - ret = hitObjectID; + ret = hitID; } x = inputX - cosTemp; y = inputY; z = inputZ - sinTemp; length = inputLength; - hitObjectID = player_raycast_down(&x, &y, &z, &length); - if (hitObjectID >= 0 && length <= fabsf(*outLength)) { + hitID = player_raycast_down(&x, &y, &z, &length); + if (hitID > NO_COLLIDER && length <= fabsf(*outLength)) { *hitRx = -gGameStatusPtr->playerGroundTraceAngles.x; *hitRz = -gGameStatusPtr->playerGroundTraceAngles.z; *outX = x; @@ -159,15 +159,15 @@ s32 player_raycast_below(f32 yaw, f32 diameter, f32* outX, f32* outY, f32* outZ, *outLength = length; *hitDirX = -sinTemp; *hitDirZ = -cosTemp; - ret = hitObjectID; + ret = hitID; } x = inputX; y = inputY; z = inputZ; length = inputLength; - hitObjectID = player_raycast_down(&x, &y, &z, &length); - if (hitObjectID >= 0 && length <= fabsf(*outLength)) { + hitID = player_raycast_down(&x, &y, &z, &length); + if (hitID > NO_COLLIDER && length <= fabsf(*outLength)) { *hitRx = -gGameStatusPtr->playerGroundTraceAngles.x; *hitRz = -gGameStatusPtr->playerGroundTraceAngles.z; *outX = x; @@ -176,10 +176,10 @@ s32 player_raycast_below(f32 yaw, f32 diameter, f32* outX, f32* outY, f32* outZ, *outLength = length; *hitDirX = 0.0f; *hitDirZ = 0.0f; - ret = hitObjectID; + ret = hitID; } - if (ret < 0) { + if (ret <= NO_COLLIDER) { *outX = x; *outY = y; *outZ = z; @@ -188,7 +188,7 @@ s32 player_raycast_below(f32 yaw, f32 diameter, f32* outX, f32* outY, f32* outZ, return ret; } -s32 player_raycast_below_cam_relative(PlayerStatus* playerStatus, f32* outX, f32* outY, f32* outZ, f32* outLength, +HitID player_raycast_below_cam_relative(PlayerStatus* playerStatus, f32* outX, f32* outY, f32* outZ, f32* outLength, f32* hitRx, f32* hitRz, f32* hitDirX, f32* hitDirZ) { f32 yaw = 0.0f; @@ -200,7 +200,7 @@ s32 player_raycast_below_cam_relative(PlayerStatus* playerStatus, f32* outX, f32 outX, outY, outZ, outLength, hitRx, hitRz, hitDirX, hitDirZ); } -s32 player_raycast_down(f32* x, f32* y, f32* z, f32* length) { +HitID player_raycast_down(f32* x, f32* y, f32* z, f32* length) { f32 hitX; f32 hitY; f32 hitZ; @@ -214,7 +214,7 @@ s32 player_raycast_down(f32* x, f32* y, f32* z, f32* length) { hitDepth = *length; entityID = test_ray_entities(*x, *y, *z, 0.0f, -1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); - if (entityID >= 0) { + if (entityID > NO_COLLIDER) { entity = get_entity_by_index(entityID); if (entity->alpha < 255) { entity->collisionTimer = 4; @@ -225,11 +225,11 @@ s32 player_raycast_down(f32* x, f32* y, f32* z, f32* length) { } colliderID = test_ray_colliders(COLLIDER_FLAG_IGNORE_PLAYER, *x, *y, *z, 0, -1.0f, 0, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { ret = colliderID; } - if (ret >= 0) { + if (ret > NO_COLLIDER) { *length = hitDepth; *x = hitX; *y = hitY; @@ -250,7 +250,7 @@ s32 player_raycast_down(f32* x, f32* y, f32* z, f32* length) { return ret; } -s32 player_raycast_up_corners(PlayerStatus* player, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw) { +HitID player_raycast_up_corners(PlayerStatus* player, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw) { f32 startX; f32 startY; f32 startZ; @@ -280,28 +280,28 @@ s32 player_raycast_up_corners(PlayerStatus* player, f32* posX, f32* posY, f32* p ret = NO_COLLIDER; hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth); - if (hitID < 0) { + if (hitID <= NO_COLLIDER) { startX = x - deltaX; startY = y; startZ = z - deltaZ; hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth); } - if (hitID < 0) { + if (hitID <= NO_COLLIDER) { startX = x + deltaZ; startY = y; startZ = z + deltaX; hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth); } - if (hitID < 0) { + if (hitID <= NO_COLLIDER) { startX = x - deltaZ; startY = y; startZ = z - deltaX; hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth); } - if (hitID >= 0) { + if (hitID > NO_COLLIDER) { *posX = startX; *posY = startY; *posZ = startZ; @@ -309,7 +309,7 @@ s32 player_raycast_up_corners(PlayerStatus* player, f32* posX, f32* posY, f32* p ret = hitID; } - if (ret < 0) { + if (ret <= NO_COLLIDER) { *posX = startX; *posY = startY; *posZ = startZ; @@ -319,7 +319,7 @@ s32 player_raycast_up_corners(PlayerStatus* player, f32* posX, f32* posY, f32* p return ret; } -s32 player_raycast_up_corner(f32* x, f32* y, f32* z, f32* length) { +HitID player_raycast_up_corner(f32* x, f32* y, f32* z, f32* length) { f32 hitX; f32 hitY; f32 hitZ; @@ -342,7 +342,7 @@ s32 player_raycast_up_corner(f32* x, f32* y, f32* z, f32* length) { sz2 = sz = *z; hitDepth = *length; hitID = test_ray_colliders(COLLIDER_FLAG_IGNORE_PLAYER, sx, sy, sz, 0.0f, 1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); - if (hitID >= 0 && *length > hitDepth) { + if (hitID > NO_COLLIDER && *length > hitDepth) { *length = hitDepth; ret = hitID; *x = sx = sx2; @@ -355,7 +355,7 @@ s32 player_raycast_up_corner(f32* x, f32* y, f32* z, f32* length) { sx = sx2; sy = sy2; sz = sz2; - if (hitID >= 0 && *length > hitDepth) { + if (hitID > NO_COLLIDER && *length > hitDepth) { get_entity_by_index(hitID); ret = hitID | COLLISION_WITH_ENTITY_BIT; *length = hitDepth; @@ -367,7 +367,7 @@ s32 player_raycast_up_corner(f32* x, f32* y, f32* z, f32* length) { return ret; } -s32 player_test_lateral_overlap(s32 mode, PlayerStatus* playerStatus, f32* x, f32* y, f32* z, f32 length, f32 yaw) { +HitID player_test_lateral_overlap(s32 mode, PlayerStatus* playerStatus, f32* x, f32* y, f32* z, f32 length, f32 yaw) { f32 sinTheta; f32 cosTheta; f32 hitX; @@ -412,7 +412,7 @@ s32 player_test_lateral_overlap(s32 mode, PlayerStatus* playerStatus, f32* x, f3 targetDz = length * cosTheta; } - if (hitID >= 0) { + if (hitID > NO_COLLIDER) { originalDepth = length + radius; if (hitDepth <= originalDepth) { depthDiff = hitDepth - originalDepth; @@ -431,7 +431,7 @@ s32 player_test_lateral_overlap(s32 mode, PlayerStatus* playerStatus, f32* x, f3 return ret; } -s32 player_raycast_general(s32 mode, f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f32 dirZ, f32* hitX, +HitID player_raycast_general(s32 mode, f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f32 dirZ, f32* hitX, f32* hitY, f32* hitZ, f32* hitDepth, f32*hitNx, f32* hitNy, f32* hitNz) { f32 nAngleX; f32 nAngleZ; @@ -444,7 +444,7 @@ s32 player_raycast_general(s32 mode, f32 startX, f32 startY, f32 startZ, f32 dir entityID = test_ray_entities(startX, startY, startZ, dirX, dirY, dirZ, hitX, hitY, hitZ, hitDepth, hitNx, hitNy, hitNz); ret = NO_COLLIDER; - if (entityID >= 0) { + if (entityID > NO_COLLIDER) { entity = get_entity_by_index(entityID); if (entity->alpha < 255) { entity->collisionTimer = 0; @@ -470,11 +470,11 @@ s32 player_raycast_general(s32 mode, f32 startX, f32 startY, f32 startZ, f32 dir colliderID = test_ray_colliders(ignoreFlags, startX, startY, startZ, dirX, dirY, dirZ, hitX, hitY, hitZ, hitDepth, hitNx, hitNy, hitNz); - if (ret < 0) { + if (ret <= NO_COLLIDER) { ret = colliderID; } - if (ret >= 0) { + if (ret > NO_COLLIDER) { nAngleZ = 180.0f - atan2(0, 0, *hitNz * 100.0, *hitNy * 100.0); nAngleX = 180.0f - atan2(0, 0, *hitNx * 100.0, *hitNy * 100.0); @@ -486,7 +486,7 @@ s32 player_raycast_general(s32 mode, f32 startX, f32 startY, f32 startZ, f32 dir return ret; } -s32 player_test_move_without_slipping(PlayerStatus* playerStatus, f32* x, f32* y, f32* z, f32 length, f32 yaw, s32* hasClimbableStep) { +HitID player_test_move_without_slipping(PlayerStatus* playerStatus, f32* x, f32* y, f32* z, f32 length, f32 yaw, s32* hasClimbableStep) { f32 sinTheta; f32 cosTheta; f32 hitX; @@ -503,7 +503,7 @@ s32 player_test_move_without_slipping(PlayerStatus* playerStatus, f32* x, f32* y f32 depthDiff; f32 height; s32 ret; - s32 raycastID; + s32 hitID; f32 targetDx; f32 targetDz; f32 dx, dz; @@ -518,8 +518,8 @@ s32 player_test_move_without_slipping(PlayerStatus* playerStatus, f32* x, f32* y dx = radius * sinTheta; ret = NO_COLLIDER; - raycastID = player_raycast_general(PLAYER_COLLISION_0, *x, *y + 0.1, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); - if (raycastID >= 0 && hitDepth <= depth) { + hitID = player_raycast_general(PLAYER_COLLISION_0, *x, *y + 0.1, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); + if (hitID > NO_COLLIDER && hitDepth <= depth) { *hasClimbableStep = TRUE; } @@ -527,19 +527,19 @@ s32 player_test_move_without_slipping(PlayerStatus* playerStatus, f32* x, f32* y hitDepth = depth; dz = radius * cosTheta; - raycastID = player_raycast_general(PLAYER_COLLISION_0, *x, *y + height, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); + hitID = player_raycast_general(PLAYER_COLLISION_0, *x, *y + height, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); targetDx = 0.0f; targetDz = 0.0f; - if ((raycastID >= 0) && (hitDepth <= depth)) { + if (hitID > NO_COLLIDER && hitDepth <= depth) { depthDiff = hitDepth - depth; dx = depthDiff * sinTheta; dz = depthDiff * cosTheta; player_get_slip_vector(&slipDx, &slipDz, 0.0f, 0.0f, hitNx, hitNz); *x += dx + slipDx; *z += dz + slipDz; - ret = raycastID; + ret = hitID; } *x += targetDx; *z += targetDz; @@ -553,7 +553,7 @@ void player_get_slip_vector(f32* outX, f32* outY, f32 x, f32 y, f32 nX, f32 nY) *outY = (y - projectionLength * nY) * 0.5f; } -s32 player_test_move_with_slipping(PlayerStatus* playerStatus, f32* x, f32* y, f32* z, f32 length, f32 yaw) { +HitID player_test_move_with_slipping(PlayerStatus* playerStatus, f32* x, f32* y, f32* z, f32 length, f32 yaw) { f32 sinTheta; f32 cosTheta; f32 hitX; @@ -587,7 +587,7 @@ s32 player_test_move_with_slipping(PlayerStatus* playerStatus, f32* x, f32* y, f targetDz = length * cosTheta; hitID = player_raycast_general(PLAYER_COLLISION_0, *x, *y + height, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); - if (hitID >= 0 && (depthDiff = hitDepth, depthDiff <= length + radius)) { + if (hitID > NO_COLLIDER && (depthDiff = hitDepth, depthDiff <= length + radius)) { depthDiff -= (length + radius); dx = depthDiff * sinTheta; dz = depthDiff * cosTheta; @@ -598,7 +598,7 @@ s32 player_test_move_with_slipping(PlayerStatus* playerStatus, f32* x, f32* y, f } else { height = playerStatus->colliderHeight * 0.75; hitID = player_raycast_general(PLAYER_COLLISION_0, *x, *y + height, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); - if (hitID >= 0 && (depthDiff = hitDepth, depthDiff <= length + radius)) { + if (hitID > NO_COLLIDER && (depthDiff = hitDepth, depthDiff <= length + radius)) { depthDiff -= (length + radius); dx = depthDiff * sinTheta; dz = depthDiff * cosTheta; @@ -747,7 +747,7 @@ void phys_update_standard(void) { collision_main_lateral(); collision_check_player_overlaps(); - if (collision_main_above() < 0 && playerStatus->timeInAir == 0 && + if (collision_main_above() <= NO_COLLIDER && playerStatus->timeInAir == 0 && playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) { collision_lateral_peach(); } @@ -1218,7 +1218,7 @@ void check_for_interactables(void) { if (curInteraction == NO_COLLIDER) { s32 floor = gCollisionStatus.curFloor; - if ((floor >= 0) && (floor & COLLISION_WITH_ENTITY_BIT)) { + if (floor > NO_COLLIDER && (floor & COLLISION_WITH_ENTITY_BIT)) { phi_s2 = 1; curInteraction = floor; switch (get_entity_type(floor)) { @@ -1277,7 +1277,7 @@ void check_for_interactables(void) { } playerStatus->interactingWithID = curInteraction; - if ((phi_s2 == 0) || curInteraction >= 0 && get_entity_by_index(curInteraction)->flags & ENTITY_FLAG_SHOWS_INSPECT_PROMPT) { + if ((phi_s2 == 0) || curInteraction > NO_COLLIDER && get_entity_by_index(curInteraction)->flags & ENTITY_FLAG_SHOWS_INSPECT_PROMPT) { if (playerStatus->actionState == ACTION_STATE_IDLE || playerStatus->actionState == ACTION_STATE_WALK || playerStatus->actionState == ACTION_STATE_RUN) { playerStatus->animFlags |= PA_FLAG_INTERACT_PROMPT_AVAILABLE; func_800EF3D4(2); diff --git a/src/7BB60.c b/src/7BB60.c index 08fd6f07080..ac3c0db241d 100644 --- a/src/7BB60.c +++ b/src/7BB60.c @@ -6,7 +6,7 @@ CollisionStatus gCollisionStatus; f32 D_8010C928; f32 JumpedOnSwitchX; f32 JumpedOnSwitchZ; -f32 D_8010C984; +f32 StepUpLastYaw; extern f32 GravityParamsStartJump[]; @@ -92,7 +92,7 @@ s32 collision_main_above(void) { hitResult = player_raycast_up_corners(playerStatus, &x, &y, &z, &sp2C, moveAngle); collisionStatus->curCeiling = hitResult; - if (hitResult >= 0) { + if (hitResult > NO_COLLIDER) { if (playerStatus->actionState != ACTION_STATE_FALLING && playerStatus->actionState != ACTION_STATE_STEP_DOWN && collisionStatus->curFloor <= NO_COLLIDER @@ -153,7 +153,7 @@ void handle_jumping_land_on_switch(void) { groundPosY = player_check_collision_below(player_fall_distance(), &colliderID); player_handle_floor_collider_type(colliderID); playerStatus->pos.y = groundPosY; - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { if (!(playerStatus->animFlags & PA_FLAG_USING_WATT)) { anim = ANIM_Mario1_Land; } else { @@ -339,7 +339,7 @@ void player_handle_floor_collider_type(s32 colliderID) { PlayerStatus* playerStatus = &gPlayerStatus; PartnerStatus* partnerStatus = &gPartnerStatus; - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { s32 surfaceType = get_collider_flags(colliderID) & COLLIDER_FLAGS_SURFACE_TYPE_MASK; switch (surfaceType) { case SURFACE_TYPE_WATER: @@ -481,8 +481,8 @@ f32 player_check_collision_below(f32 offset, s32* colliderID) { s32 hit = *colliderID = player_raycast_below_cam_relative(&gPlayerStatus, &x, &y, &z, &outLength, &sp38, &sp3C, &sp40, &sp44); - if (hit < 0) { - if (offset >= 0.0f && collisionStatus->curCeiling >= 0) { + if (hit <= NO_COLLIDER) { + if (offset >= 0.0f && collisionStatus->curCeiling > NO_COLLIDER) { return playerStatus->pos.y; } y = playerStatus->pos.y + offset; @@ -673,7 +673,7 @@ void collision_main_lateral(void) { playerZ = playerStatus->pos.z; result = player_test_move_with_slipping(playerStatus, &playerX, &playerY, &playerZ, playerStatus->colliderDiameter * 0.5f, playerStatus->targetYaw); - if (speed == 0.0f && result < 0) { + if (speed == 0.0f && result <= NO_COLLIDER) { yaw2 = playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].curYaw; sin_cos_rad(DEG_TO_RAD(yaw2 + 180.0f), &sinTheta, &cosTheta); playerX = playerStatus->pos.x + (sinTheta * playerStatus->colliderDiameter * 0.5f); @@ -697,7 +697,7 @@ void collision_main_lateral(void) { if (speed > 4.0f) { result = player_test_move_with_slipping(playerStatus, &playerX, &playerY, &playerZ, 4.0f, yaw2); - if (result < 0) { + if (result <= NO_COLLIDER) { result = player_test_move_with_slipping(playerStatus, &playerX, &playerY, &playerZ, speed - 4.0f, yaw2); } collisionStatus->pushingAgainstWall = result; @@ -717,15 +717,15 @@ void collision_main_lateral(void) { yaw = clamp_angle(yaw2 + 35.0); test2 = player_test_lateral_overlap(PLAYER_COLLISION_0, playerStatus, &test2X, &test2Z, &test2Y, 0.0f, yaw); - if (test1 < 0) { - if (test2 < 0) { + if (test1 <= NO_COLLIDER) { + if (test2 <= NO_COLLIDER) { playerStatus->pos.x = playerX; playerStatus->pos.z = playerZ; } else { playerStatus->pos.x = test1X; playerStatus->pos.z = test1Z; } - } else if (test2 < 0) { + } else if (test2 <= NO_COLLIDER) { playerStatus->pos.x = test2X; playerStatus->pos.z = test2Y; } @@ -736,7 +736,7 @@ void collision_main_lateral(void) { } else { yaw2 = playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].curYaw; } - if (collision_check_player_intersecting_world(0, 0, yaw2) < 0) { + if (collision_check_player_intersecting_world(0, 0, yaw2) <= NO_COLLIDER) { collision_check_player_intersecting_world(1, playerStatus->colliderHeight * 0.75f, yaw2); } } @@ -778,7 +778,7 @@ s32 collision_check_player_intersecting_world(s32 mode, s32 arg1, f32 yaw) { hitID2 = hitID; } - if (hitID2 >= 0) { + if (hitID2 > NO_COLLIDER) { ret = hitID2; } gPlayerStatusPtr = gPlayerStatusPtr; @@ -802,7 +802,7 @@ s32 func_800E4404(s32 mode, s32 arg1, f32 arg2, f32* outX, f32* outY, f32* outZ) f32 z = *outZ; s32 hitID = player_test_lateral_overlap(mode, gPlayerStatusPtr, &x, &y, &z, 0, angle); - if (hitID >= 0) { + if (hitID > NO_COLLIDER) { ret = hitID; } @@ -903,7 +903,7 @@ void phys_main_collision_below(void) { if (playerStatus->timeInAir == 0) { collisionStatus->curFloor = colliderID; } - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { playerStatus->groundAnglesXZ.x = hitDirX; playerStatus->groundAnglesXZ.y = hitDirZ; } @@ -924,7 +924,7 @@ void phys_main_collision_below(void) { (phys_adjust_cam_on_landing(), !phys_should_player_be_sliding()) || (set_action_state(ACTION_STATE_SLIDING), (playerStatus->actionState != ACTION_STATE_SLIDING)))) { - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { s32 surfaceType = get_collider_flags(colliderID) & COLLIDER_FLAGS_SURFACE_TYPE_MASK; switch (surfaceType) { case SURFACE_TYPE_SPIKES: @@ -964,7 +964,7 @@ void phys_main_collision_below(void) { } else { set_action_state(ACTION_STATE_STEP_UP); D_8010C928 = playerY; - D_8010C984 = playerStatus->targetYaw; + StepUpLastYaw = playerStatus->targetYaw; } } else { playerStatus->pos.y = playerY; @@ -1081,7 +1081,7 @@ void collision_lateral_peach(void) { // If there was a climbable step in this direction, but no wall, we can climb up it if (climbableStep - && wall < 0 + && wall <= NO_COLLIDER && playerStatus->actionState != ACTION_STATE_STEP_UP_PEACH && playerStatus->curSpeed != 0.0f ) { @@ -1157,7 +1157,7 @@ s32 phys_check_interactable_collision(void) { z = playerStatus->pos.z; ret = player_test_move_with_slipping(playerStatus, &x, &y, &z, playerStatus->colliderDiameter * 0.5f, yaw); - if (ret < 0 && playerStatus->curSpeed == 0.0f) { + if (ret <= NO_COLLIDER && playerStatus->curSpeed == 0.0f) { yaw = playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].curYaw; x = playerStatus->pos.x; y = playerStatus->pos.y; diff --git a/src/891b0_len_fb0.c b/src/891b0_len_fb0.c index d6eeb497b6f..0f5596c1070 100644 --- a/src/891b0_len_fb0.c +++ b/src/891b0_len_fb0.c @@ -26,8 +26,8 @@ s32 D_801094A8 = 0; s16 D_801094AC = 4; s16 D_801094AE = 4; -BSS s32 D_8010CFF0; -BSS s32 D_8010CFF4; +BSS s32 PrevTimeInAir; +BSS s32 LandedTimeInAir; void func_800EFD00(void) { } @@ -48,10 +48,10 @@ void handle_floor_behavior(void) { } if (playerStatus->actionState == ACTION_STATE_LAND && playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) { - D_8010CFF4 = D_8010CFF0; + LandedTimeInAir = PrevTimeInAir; } - D_8010CFF0 = playerStatus->timeInAir; + PrevTimeInAir = playerStatus->timeInAir; switch (colliderType) { case SURFACE_TYPE_FLOWERS: @@ -88,7 +88,7 @@ void surface_standard_behavior(void) { if (playerStatus->actionState == ACTION_STATE_LAND && (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) && - D_8010CFF4 >= 10) + LandedTimeInAir >= 10) { x = playerStatus->pos.x; y = playerStatus->pos.y + 0.0f; @@ -222,7 +222,7 @@ void surface_cloud_behavior(void) { if (((playerStatus->actionState == ACTION_STATE_LAND && (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED)) || ((playerStatus->actionState == ACTION_STATE_SPIN_POUND || playerStatus->actionState == ACTION_STATE_TORNADO_POUND) && (playerStatus->flags & PS_FLAG_SPECIAL_LAND))) && - D_8010CFF4 >= 10) + LandedTimeInAir >= 10) { fx_cloud_puff( playerStatus->pos.x, diff --git a/src/battle/16C8E0.c b/src/battle/16C8E0.c index d9663cc05df..0228cb0d8b3 100644 --- a/src/battle/16C8E0.c +++ b/src/battle/16C8E0.c @@ -97,7 +97,7 @@ EvtScript BtlBringPartnerOut = { }; extern HudScript HES_HPBar; -extern HudScript HES_Item_SmallStarPoint; +extern HudScript HES_SmallStarPoint; extern HudScript HES_Item_StarPoint; extern HudScript HES_StatusSPShine; @@ -218,7 +218,7 @@ void initialize_battle(void) { } for (i = 0; i < ARRAY_COUNT(BtlStarPointOnesHIDs); i++) { - hudElemID = BtlStarPointOnesHIDs[i] = hud_element_create(&HES_Item_SmallStarPoint); + hudElemID = BtlStarPointOnesHIDs[i] = hud_element_create(&HES_SmallStarPoint); hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED); hud_element_set_render_depth(hudElemID, 20); } @@ -1049,8 +1049,8 @@ void btl_update_starpoints_display(void) { for (i = 0; i < ones; i++) { id = BtlStarPointOnesHIDs[i]; - if (hud_element_get_script(id) != &HES_Item_SmallStarPoint) { - hud_element_set_script(id, &HES_Item_SmallStarPoint); + if (hud_element_get_script(id) != &HES_SmallStarPoint) { + hud_element_set_script(id, &HES_SmallStarPoint); } hud_element_clear_flags(id, 2); hud_element_set_render_pos(id, posX, posY); diff --git a/src/bss/engine1_pre_bss.c b/src/bss/engine1_pre_bss.c index 15274228d10..8cb7078904a 100644 --- a/src/bss/engine1_pre_bss.c +++ b/src/bss/engine1_pre_bss.c @@ -30,7 +30,7 @@ BSS s32 NpcHitQueryBehindLeftY; BSS s32 NpcHitQueryColliderID; BSS f32 JumpedOnSwitchZ; BSS s32 PlayerRunStateTime; -BSS f32 D_8010C984; +BSS f32 StepUpLastYaw; BSS s32 D_8010C988; BSS s32 NpcHitQueryAheadCollider; BSS f32 PlayerNormalPitch; diff --git a/src/collision.c b/src/collision.c index 821104fb64c..928ff614447 100644 --- a/src/collision.c +++ b/src/collision.c @@ -834,7 +834,7 @@ s32 test_ray_colliders(s32 ignoreFlags, f32 startX, f32 startY, f32 startZ, f32 } } - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { *hitX = gCollisionPointX; *hitY = gCollisionPointY; *hitZ = gCollisionPointZ; @@ -883,7 +883,7 @@ s32 test_ray_zones(f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f32 d } } - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { *hitX = gCollisionPointX; *hitY = gCollisionPointY; *hitZ = gCollisionPointZ; @@ -929,12 +929,6 @@ f32 test_ray_collider_horizontal(s32 ignoreFlags, s32 colliderID, f32 x, f32 y, return ret; } -enum { - ENTITY_TEST_ANY = 0, - ENTITY_TEST_DOWN = 1, - ENTITY_TEST_LATERAL = 2, -}; - s32 test_ray_entities(f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f32 dirZ, f32* hitX, f32* hitY, f32* hitZ, f32* hitDepth, f32* hitNx, f32* hitNy, f32* hitNz) { f32 hitDepthDown, hitDepthHoriz; @@ -952,6 +946,12 @@ s32 test_ray_entities(f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f3 f32 dist, dist2; ColliderTriangle *triangle = &entityTriangle; + enum { + ENTITY_TEST_ANY = 0, + ENTITY_TEST_DOWN = 1, + ENTITY_TEST_LATERAL = 2, + }; + entityIndex = -1; type = ENTITY_TEST_ANY; hitDepthDown = hitDepthHoriz = *hitDepth; diff --git a/src/encounter.c b/src/encounter.c index ef95f486336..af15ca7617c 100644 --- a/src/encounter.c +++ b/src/encounter.c @@ -84,7 +84,7 @@ EnemyDrops DefaultEnemyDrops = { { .item = ITEM_MUSHROOM, .weight = 50, - .unk_04 = -1, + .flagIdx = -1, }, }, .heartDrops = { diff --git a/src/entity/Block.c b/src/entity/Block.c index ac44dcaed40..7e4be396c2e 100644 --- a/src/entity/Block.c +++ b/src/entity/Block.c @@ -629,7 +629,7 @@ EntityBlueprint Entity_Hammer1Block = { .aabbSize = { 50, 50, 50 } }; -EntityBlueprint Entity_Hammer1Block_WideX = { +EntityBlueprint Entity_Hammer1BlockWideX = { .flags = ENTITY_FLAG_4000 | ENTITY_FLAG_FIXED_SHADOW_SIZE | ENTITY_FLAG_80, .typeDataSize = sizeof(BlockData), .renderCommandList = Entity_Hammer1Block_RenderScript, @@ -642,7 +642,7 @@ EntityBlueprint Entity_Hammer1Block_WideX = { .aabbSize = { 100, 50, 50 } }; -EntityBlueprint Entity_Hammer1Block_WideZ = { +EntityBlueprint Entity_Hammer1BlockWideZ = { .flags = ENTITY_FLAG_4000 | ENTITY_FLAG_FIXED_SHADOW_SIZE | ENTITY_FLAG_80, .typeDataSize = sizeof(BlockData), .renderCommandList = Entity_Hammer1Block_RenderScript, @@ -681,7 +681,7 @@ EntityBlueprint Entity_Hammer2Block = { .aabbSize = { 50, 50, 50 } }; -EntityBlueprint Entity_Hammer2Block_WideX = { +EntityBlueprint Entity_Hammer2BlockWideX = { .flags = ENTITY_FLAG_4000 | ENTITY_FLAG_FIXED_SHADOW_SIZE | ENTITY_FLAG_80, .typeDataSize = sizeof(BlockData), .renderCommandList = Entity_Hammer2Block_RenderScript, @@ -694,7 +694,7 @@ EntityBlueprint Entity_Hammer2Block_WideX = { .aabbSize = { 100, 50, 50 } }; -EntityBlueprint Entity_Hammer2Block_WideZ = { +EntityBlueprint Entity_Hammer2BlockWideZ = { .flags = ENTITY_FLAG_4000 | ENTITY_FLAG_FIXED_SHADOW_SIZE | ENTITY_FLAG_80, .typeDataSize = sizeof(BlockData), .renderCommandList = Entity_Hammer2Block_RenderScript, @@ -733,7 +733,7 @@ EntityBlueprint Entity_Hammer3Block = { .aabbSize = { 50, 50, 50 } }; -EntityBlueprint Entity_Hammer3Block_WideX = { +EntityBlueprint Entity_Hammer3BlockWideX = { .flags = ENTITY_FLAG_4000 | ENTITY_FLAG_FIXED_SHADOW_SIZE | ENTITY_FLAG_80, .typeDataSize = sizeof(BlockData), .renderCommandList = Entity_Hammer3Block_RenderScript, @@ -746,7 +746,7 @@ EntityBlueprint Entity_Hammer3Block_WideX = { .aabbSize = { 100, 50, 50 } }; -EntityBlueprint Entity_Hammer3Block_WideZ = { +EntityBlueprint Entity_Hammer3BlockWideZ = { .flags = ENTITY_FLAG_4000 | ENTITY_FLAG_FIXED_SHADOW_SIZE | ENTITY_FLAG_80, .typeDataSize = sizeof(BlockData), .renderCommandList = Entity_Hammer3Block_RenderScript, diff --git a/src/entity/default/BombableRock.c b/src/entity/default/BombableRock.c index d36b5f6f768..ca5cabe7f90 100644 --- a/src/entity/default/BombableRock.c +++ b/src/entity/default/BombableRock.c @@ -260,7 +260,7 @@ EntityBlueprint Entity_BombableRock = { .aabbSize = { 50, 50, 50 } }; -EntityBlueprint Entity_BombableRock2 = { +EntityBlueprint Entity_BombableRockWide = { .flags = 0, .typeDataSize = sizeof(BombableRockData), .renderCommandList = Entity_BombableRock_RenderScript, diff --git a/src/entity/jan_iwa/Plants1.c b/src/entity/jan_iwa/Plants1.c index 6b7a266011e..d97284c9a69 100644 --- a/src/entity/jan_iwa/Plants1.c +++ b/src/entity/jan_iwa/Plants1.c @@ -22,9 +22,9 @@ extern Gfx Entity_SpinningFlower_Render[]; BSS f32 D_802BCE20; BSS f32 D_802BCE24[3]; // unused -BSS u16 D_802BCE30; -BSS u16 D_802BCE32; -BSS u16 D_802BCE34; +BSS u16 FlowerGoalPositionY; +BSS u16 FlowerGoalPositionZ; +BSS u16 FlowerGoalPositionX; void entity_SpinningFlower_setupGfx(s32 entityIndex) { Entity* entity = get_entity_by_index(entityIndex); @@ -59,9 +59,9 @@ void func_802BB000_E2D930(Entity* entity) { if (playerStatus->actionState == ACTION_STATE_RIDE) { playerStatus->animFlags |= PA_FLAG_INTERRUPT_USE_PARTNER; } else if (playerStatus->actionState != ACTION_STATE_USE_SPINNING_FLOWER) { - D_802BCE34 = data->unk_28; - D_802BCE30 = data->unk_2A; - D_802BCE32 = data->unk_2C; + FlowerGoalPositionX = data->pos.x; + FlowerGoalPositionY = data->pos.y; + FlowerGoalPositionZ = data->pos.z; set_action_state(ACTION_STATE_USE_SPINNING_FLOWER); } } @@ -131,9 +131,9 @@ void entity_SpinningFlower_init(Entity* entity) { z = entity->pos.z; } - data->unk_28 = x; - data->unk_2A = y; - data->unk_2C = z; + data->pos.x = x; + data->pos.y = y; + data->pos.z = z; data->state = 0; entity->renderSetupFunc = entity_SpinningFlower_setupGfx; } diff --git a/src/evt/demo_api.c b/src/evt/demo_api.c index 2f1f61267c4..42f63de2983 100644 --- a/src/evt/demo_api.c +++ b/src/evt/demo_api.c @@ -7,8 +7,8 @@ extern Addr sprite_shading_profiles_ROM_START; #endif // TODO: not sure where these go -u8 D_802D9D70 = 254; -u8 D_802D9D71 = 254; +u8 ReflectWallPrevAlpha = 254; +u8 ReflectFloorPrevAlpha = 254; u16 StarShrineLightBeamAlpha = 255; extern s32 gSpriteShadingHeader[2]; @@ -106,27 +106,22 @@ API_CALLABLE(DemoSetButtons) { API_CALLABLE(DemoJoystickRadial) { GameStatus** gameStatus = &gGameStatusPtr; - f32 a; - f32 b; - s32* thisPos = script->ptrReadPos; + Bytecode* args = script->ptrReadPos; - a = evt_get_float_variable(script, *thisPos++); - b = evt_get_float_variable(script, *thisPos++); + f32 mag = evt_get_float_variable(script, *args++); + f32 ang = evt_get_float_variable(script, *args++); - (*gameStatus)->demoStickX = a * sin_deg(b); - (*gameStatus)->demoStickY = a * cos_deg(b); + (*gameStatus)->demoStickX = mag * sin_deg(ang); + (*gameStatus)->demoStickY = mag * cos_deg(ang); return ApiStatus_DONE2; } API_CALLABLE(DemoJoystickXY) { GameStatus** gameStatus = &gGameStatusPtr; - f32 x; - f32 y; - s32* thisPos = script->ptrReadPos; - - x = evt_get_float_variable(script, *thisPos++); - y = evt_get_float_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + f32 x = evt_get_float_variable(script, *args++); + f32 y = evt_get_float_variable(script, *args++); (*gameStatus)->demoStickX = x; (*gameStatus)->demoStickY = y; diff --git a/src/evt/evt.c b/src/evt/evt.c index beea879858e..7fbfddcd1dc 100644 --- a/src/evt/evt.c +++ b/src/evt/evt.c @@ -21,7 +21,7 @@ f32 evt_fixed_var_to_float(Bytecode scriptVar) { } Bytecode evt_float_to_fixed_var(f32 value) { - // not equivalent to hte Float_TO_FIXED() macro due to the s32 cast + // not equivalent to the FLOAT_TO_FIXED() macro due to the s32 cast // occuring *before* the add here and *after* the add in the macro return (s32)(value * 1024.0f) + -EVT_FIXED_OFFSET; } diff --git a/src/evt/f8f60_len_1560.c b/src/evt/f8f60_len_1560.c index 058bfa7887e..de55a61ed46 100644 --- a/src/evt/f8f60_len_1560.c +++ b/src/evt/f8f60_len_1560.c @@ -433,9 +433,9 @@ API_CALLABLE(GetNextPathPos) { } get_path_position(alpha, &pos, path->numVectors, path->lengths, path->staticVectorList, path->vectors); - script->varTable[1] = (pos.x * 1024.0f) + -2.3e8f; - script->varTable[2] = (pos.y * 1024.0f) + -2.3e8f; - script->varTable[3] = (pos.z * 1024.0f) + -2.3e8f; + script->varTable[1] = FLOAT_TO_FIXED(pos.x); + script->varTable[2] = FLOAT_TO_FIXED(pos.y); + script->varTable[3] = FLOAT_TO_FIXED(pos.z); if (path->timeElapsed < path->timeLeft) { path->timeElapsed = path->timeElapsed + 1; diff --git a/src/evt/map_api.c b/src/evt/map_api.c index 1d54022383b..6205dec89df 100644 --- a/src/evt/map_api.c +++ b/src/evt/map_api.c @@ -346,13 +346,13 @@ API_CALLABLE(MakeTransformGroup) { API_CALLABLE(SetTransformGroupEnabled) { Bytecode* args = script->ptrReadPos; - u16 var1 = evt_get_variable(script, *args++); - s32 var2 = evt_get_variable(script, *args++); + u16 modelID = evt_get_variable(script, *args++); + s32 enable = evt_get_variable(script, *args++); - if (var2 != 0) { - enable_transform_group(var1); + if (enable) { + enable_transform_group(modelID); } else { - disable_transform_group(var1); + disable_transform_group(modelID); } return ApiStatus_DONE2; } diff --git a/src/evt/player_api.c b/src/evt/player_api.c index 28e179a55db..feae679228b 100644 --- a/src/evt/player_api.c +++ b/src/evt/player_api.c @@ -326,7 +326,7 @@ ApiStatus player_jump(Evt* script, s32 isInitialCall, s32 mode) { yTemp = player_check_collision_below(playerNpc->jumpVel, &colliderID); - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { playerStatus->pos.y = yTemp; player_handle_floor_collider_type(colliderID); handle_floor_behavior(); diff --git a/src/evt/script_list.c b/src/evt/script_list.c index 7203cd43ed0..6b2a74b1e60 100644 --- a/src/evt/script_list.c +++ b/src/evt/script_list.c @@ -1,9 +1,9 @@ #include "common.h" #include "hud_element.h" -s32 gStaticScriptCounter = 1; -s32 gIsUpdatingScripts = 0; -f32 gGlobalTimeSpace = 1.0f; +s32 UniqueScriptCounter = 1; +s32 IsUpdatingScripts = FALSE; +f32 GlobalTimeRate = 1.0f; // script_list BSS u32* gMapFlags; @@ -186,7 +186,7 @@ void clear_script_list(void) { gNumScripts = 0; gScriptListCount = 0; - gIsUpdatingScripts = 0; + IsUpdatingScripts = FALSE; for (i = 0; i < MAX_MAPVARS; i++) { gMapVars[i] = 0; @@ -212,7 +212,7 @@ void init_script_list(void) { } gNumScripts = 0; - gIsUpdatingScripts = 0; + IsUpdatingScripts = FALSE; init_virtual_entity_list(); init_model_animators(); @@ -266,7 +266,7 @@ Evt* start_script(EvtScript* source, s32 priority, s32 flags) { newScript->blockingParent = NULL; newScript->childScript = NULL; newScript->parentScript = NULL; - newScript->id = gStaticScriptCounter++; + newScript->id = UniqueScriptCounter++; newScript->owner1.actorID = -1; newScript->owner2.npcID = -1; newScript->loopDepth = -1; @@ -275,7 +275,7 @@ Evt* start_script(EvtScript* source, s32 priority, s32 flags) { newScript->ptrSavedPos = NULL; newScript->frameCounter = 0.0f; newScript->unk_158 = 0; - newScript->timeScale = gGlobalTimeSpace; + newScript->timeScale = GlobalTimeRate; scriptListCount = 0; @@ -289,7 +289,7 @@ Evt* start_script(EvtScript* source, s32 priority, s32 flags) { find_script_labels(newScript); - if (gIsUpdatingScripts && (newScript->stateFlags & EVT_FLAG_RUN_IMMEDIATELY)) { + if (IsUpdatingScripts && (newScript->stateFlags & EVT_FLAG_RUN_IMMEDIATELY)) { scriptListCount = gScriptListCount++; gScriptIndexList[scriptListCount] = curScriptIndex; gScriptIdList[scriptListCount] = newScript->id; @@ -297,8 +297,8 @@ Evt* start_script(EvtScript* source, s32 priority, s32 flags) { suspend_frozen_scripts(newScript); - if (gStaticScriptCounter == 0) { - gStaticScriptCounter = 1; + if (UniqueScriptCounter == 0) { + UniqueScriptCounter = 1; } return newScript; @@ -331,7 +331,7 @@ Evt* start_script_in_group(EvtScript* source, u8 priority, u8 flags, u8 groupFla newScript->stateFlags = flags | EVT_FLAG_ACTIVE; newScript->curOpcode = EVT_OP_INTERNAL_FETCH; newScript->priority = priority; - newScript->id = gStaticScriptCounter++; + newScript->id = UniqueScriptCounter++; newScript->ptrNextLine = (Bytecode*)source; newScript->ptrFirstLine = (Bytecode*)source; newScript->ptrCurLine = (Bytecode*)source; @@ -347,7 +347,7 @@ Evt* start_script_in_group(EvtScript* source, u8 priority, u8 flags, u8 groupFla newScript->ptrSavedPos = 0; newScript->frameCounter = 0.0f; newScript->unk_158 = 0; - newScript->timeScale = gGlobalTimeSpace; + newScript->timeScale = GlobalTimeRate; scriptListCount = 0; for (i = 0; i < ARRAY_COUNT(newScript->varTable); i++) { @@ -359,7 +359,7 @@ Evt* start_script_in_group(EvtScript* source, u8 priority, u8 flags, u8 groupFla find_script_labels(newScript); - if (gIsUpdatingScripts && (newScript->stateFlags & EVT_FLAG_RUN_IMMEDIATELY)) { + if (IsUpdatingScripts && (newScript->stateFlags & EVT_FLAG_RUN_IMMEDIATELY)) { scriptListCount = gScriptListCount++; gScriptIndexList[scriptListCount] = curScriptIndex; gScriptIdList[scriptListCount] = newScript->id; @@ -368,7 +368,7 @@ Evt* start_script_in_group(EvtScript* source, u8 priority, u8 flags, u8 groupFla suspend_frozen_scripts(newScript); - tempCounter = &gStaticScriptCounter; + tempCounter = &UniqueScriptCounter; if (*tempCounter == 0) { *tempCounter = 1; } @@ -407,7 +407,7 @@ Evt* start_child_script(Evt* parentScript, EvtScript* source, s32 flags) { child->childScript = NULL; child->parentScript = NULL; child->priority = parentScript->priority + 1; - child->id = gStaticScriptCounter++; + child->id = UniqueScriptCounter++; child->owner1 = parentScript->owner1; child->owner2 = parentScript->owner2; child->loopDepth = -1; @@ -416,7 +416,7 @@ Evt* start_child_script(Evt* parentScript, EvtScript* source, s32 flags) { child->ptrSavedPos = NULL; child->array = parentScript->array; child->flagArray = parentScript->flagArray; - child->timeScale = gGlobalTimeSpace; + child->timeScale = GlobalTimeRate; child->frameCounter = 0.0f; child->unk_158 = 0; @@ -431,7 +431,7 @@ Evt* start_child_script(Evt* parentScript, EvtScript* source, s32 flags) { } find_script_labels(child); - if (gIsUpdatingScripts) { + if (IsUpdatingScripts) { scriptListCount = gScriptListCount++; gScriptIndexList[scriptListCount] = curScriptIndex; gScriptIdList[scriptListCount] = child->id; @@ -439,8 +439,8 @@ Evt* start_child_script(Evt* parentScript, EvtScript* source, s32 flags) { suspend_frozen_scripts(child); - if (gStaticScriptCounter == 0) { - gStaticScriptCounter = 1; + if (UniqueScriptCounter == 0) { + UniqueScriptCounter = 1; } return child; @@ -475,7 +475,7 @@ Evt* func_802C39F8(Evt* parentScript, Bytecode* nextLine, s32 newState) { child->parentScript = parentScript; child->childScript = NULL; child->priority = parentScript->priority; - child->id = gStaticScriptCounter++; + child->id = UniqueScriptCounter++; child->owner1.actorID = parentScript->owner1.actorID; child->owner2.npcID = parentScript->owner2.npcID; child->loopDepth = -1; @@ -484,7 +484,7 @@ Evt* func_802C39F8(Evt* parentScript, Bytecode* nextLine, s32 newState) { child->ptrSavedPos = NULL; child->array = parentScript->array; child->flagArray = parentScript->flagArray; - child->timeScale = gGlobalTimeSpace; + child->timeScale = GlobalTimeRate; child->frameCounter = 0.0f; child->unk_158 = 0; @@ -499,14 +499,14 @@ Evt* func_802C39F8(Evt* parentScript, Bytecode* nextLine, s32 newState) { } find_script_labels(child); - if (gIsUpdatingScripts) { + if (IsUpdatingScripts) { scriptListCount = gScriptListCount++; gScriptIndexList[scriptListCount] = curScriptIndex; gScriptIdList[scriptListCount] = child->id; } - if (gStaticScriptCounter == 0) { - gStaticScriptCounter = 1; + if (UniqueScriptCounter == 0) { + UniqueScriptCounter = 1; } suspend_frozen_scripts(child); @@ -547,7 +547,7 @@ Evt* func_802C3C10(Evt* script, Bytecode* line, s32 arg2) { script->childScript = NULL; script->frameCounter = 0.0f; script->unk_158 = 0; - script->timeScale = gGlobalTimeSpace; + script->timeScale = GlobalTimeRate; find_script_labels(script); suspend_frozen_scripts(script); @@ -569,7 +569,7 @@ Evt* restart_script(Evt* script) { script->frameCounter = 0; script->unk_158 = 0; - script->timeScale = gGlobalTimeSpace; + script->timeScale = GlobalTimeRate; find_script_labels(script); suspend_frozen_scripts(script); @@ -584,7 +584,7 @@ void update_scripts(void) { return; } - gIsUpdatingScripts = TRUE; + IsUpdatingScripts = TRUE; sort_scripts(); for (i = 0; i < gScriptListCount; i++) { @@ -620,7 +620,7 @@ void update_scripts(void) { } } } - gIsUpdatingScripts = FALSE; + IsUpdatingScripts = FALSE; } // Does nothing, is cursed @@ -744,15 +744,15 @@ void set_script_priority(Evt* script, s32 priority) { } void set_script_timescale(Evt* script, f32 timescale) { - script->timeScale = timescale * gGlobalTimeSpace; + script->timeScale = timescale * GlobalTimeRate; } void set_global_timespace(f32 timeScale) { - gGlobalTimeSpace = timeScale; + GlobalTimeRate = timeScale; } f32 get_global_timespace(void) { - return gGlobalTimeSpace; + return GlobalTimeRate; } void set_script_group(Evt* script, s32 groupFlags) { diff --git a/src/item_entity_scripts.yaml b/src/item_entity_scripts.yaml index 15a2ee4f50c..dbd6cc55933 100644 --- a/src/item_entity_scripts.yaml +++ b/src/item_entity_scripts.yaml @@ -106,8 +106,8 @@ - { name: Letter, template: STANDARD, icon: key/Letter } - { name: Unused_089, template: STANDARD, icon: key/LongLetter } - { name: Unused_08A, template: STANDARD, icon: key/TealLetter } -- { name: Unused_08B, template: STANDARD, icon: key/Postcard } -- { name: Unused_08C, template: STANDARD, icon: key/EmptyBook } +- { name: Postcard, template: STANDARD, icon: key/Postcard } +- { name: EmptyBook, template: STANDARD, icon: key/EmptyBook } - { name: Unused_08D, template: STANDARD, icon: unused/item_08D } - { name: Unused_08E, template: STANDARD, icon: unused/item_08E } - { name: Unused_08F, template: STANDARD, icon: unused/item_08F } diff --git a/src/item_hud_scripts.yaml b/src/item_hud_scripts.yaml index 539ccc1952f..7dc3defd874 100644 --- a/src/item_hud_scripts.yaml +++ b/src/item_hud_scripts.yaml @@ -105,8 +105,8 @@ - { priority: 136, name: Letter, template: STANDARD_ITEM, icon: key/Letter, pair: true } - { priority: 137, name: Unused_089, template: STANDARD_ITEM, icon: key/LongLetter, pair: true } - { priority: 138, name: Unused_08A, template: STANDARD_ITEM, icon: key/TealLetter, pair: true } -- { priority: 139, name: Unused_08B, template: STANDARD_ITEM, icon: key/Postcard, pair: true } -- { priority: 140, name: Unused_08C, template: STANDARD_ITEM, icon: key/EmptyBook, pair: true } +- { priority: 139, name: Postcard, template: STANDARD_ITEM, icon: key/Postcard, pair: true } +- { priority: 140, name: EmptyBook, template: STANDARD_ITEM, icon: key/EmptyBook, pair: true } - { priority: 141, name: Unused_08D, template: STANDARD_ITEM, icon: unused/item_08D, pair: true } - { priority: 142, name: Unused_08E, template: STANDARD_ITEM, icon: unused/item_08E, pair: true } - { priority: 143, name: Unused_08F, template: STANDARD_ITEM, icon: unused/item_08F, pair: true } diff --git a/src/item_table.yaml b/src/item_table.yaml index eee569c65eb..b8e37a4eefe 100644 --- a/src/item_table.yaml +++ b/src/item_table.yaml @@ -1588,7 +1588,7 @@ moveID: MOVE_NONE potencyA: 0 potencyB: 0 -- PeachKey1: +- PeachKey: category: KEY nameMsg: MSG_ItemName_PeachKey fullDescMsg: MSG_ItemFullDesc_PeachKey @@ -1798,7 +1798,7 @@ moveID: MOVE_NONE potencyA: 0 potencyB: 0 -- PeachKey2: +- UnusedPeachKey: category: KEY nameMsg: MSG_ItemName_PeachKey fullDescMsg: MSG_ItemFullDesc_PeachKey @@ -1828,7 +1828,7 @@ moveID: MOVE_NONE potencyA: 0 potencyB: 0 -- PrisonKey1: +- PrisonKey: category: KEY nameMsg: MSG_ItemName_PrisonKey fullDescMsg: MSG_ItemFullDesc_PrisonKey @@ -1873,7 +1873,7 @@ moveID: MOVE_NONE potencyA: 0 potencyB: 0 -- PrisonKey2: +- UnusedPrisonKey1: category: KEY nameMsg: MSG_ItemName_PrisonKey fullDescMsg: MSG_ItemFullDesc_PrisonKey @@ -1888,7 +1888,7 @@ moveID: MOVE_NONE potencyA: 0 potencyB: 0 -- PrisonKey3: +- UnusedPrisonKey2: category: KEY nameMsg: MSG_ItemName_PrisonKey fullDescMsg: MSG_ItemFullDesc_PrisonKey @@ -1903,7 +1903,7 @@ moveID: MOVE_NONE potencyA: 0 potencyB: 0 -- PrisonKey4: +- UnusedPrisonKey3: category: KEY nameMsg: MSG_ItemName_PrisonKey fullDescMsg: MSG_ItemFullDesc_PrisonKey @@ -3268,7 +3268,7 @@ moveID: MOVE_NONE potencyA: 15 potencyB: 15 -- JellyShroom1: +- JellyShroom: category: CONSUMABLE nameMsg: MSG_ItemName_JellyShroom fullDescMsg: MSG_ItemFullDesc_JellyShroom @@ -3283,7 +3283,7 @@ moveID: MOVE_NONE potencyA: 5 potencyB: 50 -- JellyShroom2: +- UnusedJellyShroom1: category: UNUSED nameMsg: MSG_ItemName_JellyShroom fullDescMsg: MSG_ItemFullDesc_JellyShroom @@ -3298,7 +3298,7 @@ moveID: MOVE_NONE potencyA: 5 potencyB: 50 -- JellyShroom3: +- UnusedJellyShroom2: category: UNUSED nameMsg: MSG_ItemName_JellyShroom fullDescMsg: MSG_ItemFullDesc_JellyShroom @@ -3313,7 +3313,7 @@ moveID: MOVE_NONE potencyA: 5 potencyB: 50 -- JellyShroom4: +- UnusedJellyShroom3: category: UNUSED nameMsg: MSG_ItemName_JellyShroom fullDescMsg: MSG_ItemFullDesc_JellyShroom @@ -3328,7 +3328,7 @@ moveID: MOVE_NONE potencyA: 5 potencyB: 50 -- JellyShroom5: +- UnusedJellyShroom4: category: UNUSED nameMsg: MSG_ItemName_JellyShroom fullDescMsg: MSG_ItemFullDesc_JellyShroom @@ -3343,7 +3343,7 @@ moveID: MOVE_NONE potencyA: 5 potencyB: 50 -- JellyShroom6: +- UnusedJellyShroom5: category: UNUSED nameMsg: MSG_ItemName_JellyShroom fullDescMsg: MSG_ItemFullDesc_JellyShroom @@ -4378,7 +4378,7 @@ moveID: MOVE_MEGA_JUMP potencyA: 0 potencyB: 0 -- PowerSmash1: +- PowerSmash: category: BADGE nameMsg: MSG_ItemName_PowerSmash fullDescMsg: MSG_ItemFullDesc_PowerSmash @@ -4423,7 +4423,7 @@ moveID: MOVE_MEGA_SMASH potencyA: 0 potencyB: 0 -- PowerSmash2: +- UnusedPowerSmash1: category: BADGE nameMsg: MSG_ItemName_PowerSmash fullDescMsg: MSG_ItemFullDesc_PowerSmash @@ -4438,7 +4438,7 @@ moveID: MOVE_MEGA_SMASH potencyA: 0 potencyB: 0 -- PowerSmash3: +- UnusedPowerSmash2: category: BADGE nameMsg: MSG_ItemName_PowerSmash fullDescMsg: MSG_ItemFullDesc_PowerSmash @@ -4453,7 +4453,7 @@ moveID: MOVE_MEGA_SMASH potencyA: 0 potencyB: 0 -- DeepFocus1: +- DeepFocusA: category: BADGE nameMsg: MSG_ItemName_DeepFocus fullDescMsg: MSG_ItemFullDesc_DeepFocus @@ -4588,7 +4588,7 @@ moveID: MOVE_EARTHQUAKE_JUMP potencyA: 0 potencyB: 0 -- DeepFocus2: +- DeepFocusB: category: BADGE nameMsg: MSG_ItemName_DeepFocus fullDescMsg: MSG_ItemFullDesc_DeepFocus @@ -4603,7 +4603,7 @@ moveID: MOVE_DEEP_FOCUS potencyA: 0 potencyB: 0 -- DeepFocus3: +- DeepFocusC: category: BADGE nameMsg: MSG_ItemName_DeepFocus fullDescMsg: MSG_ItemFullDesc_DeepFocus @@ -5053,7 +5053,7 @@ moveID: MOVE_HEALTHY_HEALTHY potencyA: 0 potencyB: 0 -- AttackFX_F2: +- UnusedAttackFX_1: category: BADGE nameMsg: MSG_ItemName_AttackFXF fullDescMsg: MSG_ItemFullDesc_AttackFXF @@ -5068,7 +5068,7 @@ moveID: MOVE_ATTACK_FX_F potencyA: 0 potencyB: 0 -- AttackFX_F3: +- UnusedAttackFX_2: category: BADGE nameMsg: MSG_ItemName_AttackFXF fullDescMsg: MSG_ItemFullDesc_AttackFXF @@ -5083,7 +5083,7 @@ moveID: MOVE_ATTACK_FX_F potencyA: 0 potencyB: 0 -- AttackFX_F4: +- UnusedAttackFX_3: category: BADGE nameMsg: MSG_ItemName_AttackFXF fullDescMsg: MSG_ItemFullDesc_AttackFXF @@ -5098,7 +5098,7 @@ moveID: MOVE_ATTACK_FX_F potencyA: 0 potencyB: 0 -- AttackFX_F5: +- UnusedAttackFX_4: category: BADGE nameMsg: MSG_ItemName_AttackFXF fullDescMsg: MSG_ItemFullDesc_AttackFXF diff --git a/src/move_table.yaml b/src/move_table.yaml index 5bb6438165b..dba4b520761 100644 --- a/src/move_table.yaml +++ b/src/move_table.yaml @@ -1,25 +1,25 @@ - None: - nameMsg: 0 - fullDescMsg: 0 - shortDescMsg: 0 + nameMsg: MSG_NONE + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [] category: MOVE_TYPE_NONE actionTip: NONE costFP: 0 costBP: 0 - Unused_01: - nameMsg: 0 - fullDescMsg: 0 - shortDescMsg: 0 + nameMsg: MSG_NONE + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [ TARGET_FLAG_2 ] category: MOVE_TYPE_NONE actionTip: NONE costFP: 0 costBP: 0 - Unused_02: - nameMsg: 0 - fullDescMsg: 0 - shortDescMsg: 0 + nameMsg: MSG_NONE + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [ TARGET_FLAG_PLAYER ] category: MOVE_TYPE_NONE actionTip: NONE @@ -27,7 +27,7 @@ costBP: 0 - Hammer1: nameMsg: MSG_Menus_Hammer - fullDescMsg: 0 + fullDescMsg: MSG_NONE shortDescMsg: MSG_ItemShortDesc_Hammer flags: [ TARGET_FLAG_SELECT_ONE, TARGET_FLAG_GROUND, TARGET_FLAG_SMASH_LIKE, TARGET_FLAG_NOT_BEHIND, TARGET_FLAG_ALLOW_TARGET_ONLY ] category: MOVE_TYPE_HAMMER @@ -54,8 +54,8 @@ costBP: 0 - FirstStrikeHammer: nameMsg: MSG_Menus_Hammer - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [ TARGET_FLAG_SELECT_ONE, TARGET_FLAG_GROUND, TARGET_FLAG_SMASH_LIKE, TARGET_FLAG_NOT_BEHIND, TARGET_FLAG_ALLOW_TARGET_ONLY ] category: MOVE_TYPE_HAMMER actionTip: BTL_MSG_ACTION_TIP_HOLD_LEFT_TIMED @@ -261,8 +261,8 @@ costBP: 0 - FirstStrikeJump: nameMsg: MSG_Menus_Jump - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [ TARGET_FLAG_SELECT_ONE, TARGET_FLAG_80, TARGET_FLAG_JUMP_LIKE, TARGET_FLAG_NOT_BELOW, TARGET_FLAG_ALLOW_TARGET_ONLY, TARGET_FLAG_NO_CEILING ] category: MOVE_TYPE_JUMP actionTip: BTL_MSG_ACTION_TIP_PRESS_BEFORE_LANDING @@ -468,7 +468,7 @@ costBP: 3 - Items: nameMsg: MSG_Menus_Items - fullDescMsg: 0 + fullDescMsg: MSG_NONE shortDescMsg: MSG_Menus_Action_UseItem flags: [ TARGET_FLAG_SELECT_ONE, TARGET_FLAG_GROUND, TARGET_FLAG_ALLOW_TARGET_ONLY ] category: MOVE_TYPE_ITEMS @@ -495,8 +495,8 @@ costBP: 3 - Unused_37: nameMsg: (s32) "つうじょう" - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [] category: MOVE_TYPE_SWITCH actionTip: NONE @@ -513,8 +513,8 @@ costBP: 4 - Unused_39: nameMsg: (s32) "つうじょう" - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [ TARGET_FLAG_SELECT_ONE, TARGET_FLAG_GROUND, TARGET_FLAG_ALLOW_TARGET_ONLY ] category: MOVE_TYPE_6 actionTip: NONE @@ -522,8 +522,8 @@ costBP: 0 - Unused_3A: nameMsg: (s32) "つうじょう" - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [] category: MOVE_TYPE_ATTACK_UP actionTip: NONE @@ -567,8 +567,8 @@ costBP: 2 - Unused_3F: nameMsg: (s32) "つうじょう" - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [ TARGET_FLAG_SELECT_ONE, TARGET_FLAG_GROUND, TARGET_FLAG_ALLOW_TARGET_ONLY ] category: MOVE_TYPE_DEFENSE_UP actionTip: NONE @@ -675,8 +675,8 @@ costBP: 1 - Unused_4B: nameMsg: (s32) "つうじょう" - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [] category: MOVE_TYPE_9 actionTip: NONE @@ -729,8 +729,8 @@ costBP: 5 - Unused_51: nameMsg: (s32) "つうじょう" - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [ TARGET_FLAG_SELECT_ONE, TARGET_FLAG_GROUND, TARGET_FLAG_ALLOW_TARGET_ONLY ] category: MOVE_TYPE_NONE actionTip: NONE @@ -999,8 +999,8 @@ costBP: 1 - Unused_FinalGoompa: nameMsg: (s32) "ファイナルクリジイ" - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [ TARGET_FLAG_2 ] category: MOVE_TYPE_NONE actionTip: NONE @@ -1008,8 +1008,8 @@ costBP: 1 - Unused_FinalBobomb: nameMsg: (s32) "ファイナルボムヘイ" - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [ TARGET_FLAG_2 ] category: MOVE_TYPE_NONE actionTip: NONE @@ -1071,7 +1071,7 @@ costBP: 3 - Focus: nameMsg: MSG_Menus_StarPower_Focus - fullDescMsg: 0 + fullDescMsg: MSG_NONE shortDescMsg: MSG_Menus_StarPowerDesc_Focus flags: [ TARGET_FLAG_OVERRIDE ] category: MOVE_TYPE_STAR_POWER @@ -1080,7 +1080,7 @@ costBP: 0 - Refresh: nameMsg: MSG_Menus_StarPower_Refresh - fullDescMsg: 0 + fullDescMsg: MSG_NONE shortDescMsg: MSG_Menus_StarPowerDesc_Refresh flags: [ TARGET_FLAG_PLAYER ] category: MOVE_TYPE_STAR_POWER @@ -1089,7 +1089,7 @@ costBP: 1 - Lullaby: nameMsg: MSG_Menus_StarPower_Lullaby - fullDescMsg: 0 + fullDescMsg: MSG_NONE shortDescMsg: MSG_Menus_StarPowerDesc_Lullaby flags: [ TARGET_FLAG_2, TARGET_FLAG_PRIMARY_ONLY ] category: MOVE_TYPE_STAR_POWER @@ -1098,7 +1098,7 @@ costBP: 1 - StarStorm: nameMsg: MSG_Menus_StarPower_StarStorm - fullDescMsg: 0 + fullDescMsg: MSG_NONE shortDescMsg: MSG_Menus_StarPowerDesc_StarStorm flags: [ TARGET_FLAG_2, TARGET_FLAG_PRIMARY_ONLY ] category: MOVE_TYPE_STAR_POWER @@ -1107,7 +1107,7 @@ costBP: 2 - ChillOutMove: nameMsg: MSG_Menus_StarPower_ChillOut - fullDescMsg: 0 + fullDescMsg: MSG_NONE shortDescMsg: MSG_Menus_StarPowerDesc_ChillOut flags: [ TARGET_FLAG_2, TARGET_FLAG_PRIMARY_ONLY ] category: MOVE_TYPE_STAR_POWER @@ -1116,7 +1116,7 @@ costBP: 2 - Smooch: nameMsg: MSG_Menus_StarPower_Smooch - fullDescMsg: 0 + fullDescMsg: MSG_NONE shortDescMsg: MSG_Menus_StarPowerDesc_Smooch flags: [ TARGET_FLAG_PLAYER ] category: MOVE_TYPE_STAR_POWER @@ -1125,7 +1125,7 @@ costBP: 3 - TimeOut: nameMsg: MSG_Menus_StarPower_TimeOut - fullDescMsg: 0 + fullDescMsg: MSG_NONE shortDescMsg: MSG_Menus_StarPowerDesc_TimeOut flags: [ TARGET_FLAG_2, TARGET_FLAG_PRIMARY_ONLY ] category: MOVE_TYPE_STAR_POWER @@ -1134,7 +1134,7 @@ costBP: 2 - UpAndAway: nameMsg: MSG_Menus_StarPower_UpAndAway - fullDescMsg: 0 + fullDescMsg: MSG_NONE shortDescMsg: MSG_Menus_StarPowerDesc_UpAndAway flags: [ TARGET_FLAG_2, TARGET_FLAG_PRIMARY_ONLY ] category: MOVE_TYPE_STAR_POWER @@ -1143,7 +1143,7 @@ costBP: 2 - StarBeam: nameMsg: MSG_Menus_StarPower_StarBeam - fullDescMsg: 0 + fullDescMsg: MSG_NONE shortDescMsg: MSG_Menus_StarPowerDesc_StarBeam flags: [ TARGET_FLAG_2, TARGET_FLAG_PRIMARY_ONLY ] category: MOVE_TYPE_STAR_POWER @@ -1152,7 +1152,7 @@ costBP: 0 - PeachBeam: nameMsg: MSG_Menus_StarPower_PeachBeam - fullDescMsg: 0 + fullDescMsg: MSG_NONE shortDescMsg: MSG_Menus_StarPowerDesc_PeachBeam flags: [ TARGET_FLAG_2, TARGET_FLAG_PRIMARY_ONLY ] category: MOVE_TYPE_STAR_POWER @@ -1161,7 +1161,7 @@ costBP: 0 - PeachFocus: nameMsg: MSG_Menus_StarPower_Peach_Focus - fullDescMsg: 0 + fullDescMsg: MSG_NONE shortDescMsg: MSG_Menus_StarPowerDesc_Focus flags: [ TARGET_FLAG_PARTNER ] category: MOVE_TYPE_STAR_POWER @@ -1170,7 +1170,7 @@ costBP: 0 - TwinkDash: nameMsg: MSG_Menus_StarPower_Twink_Dash - fullDescMsg: 0 + fullDescMsg: MSG_NONE shortDescMsg: MSG_Menus_StarPowerDesc_Focus flags: [ TARGET_FLAG_SELECT_ONE, TARGET_FLAG_2, TARGET_FLAG_PRIMARY_ONLY ] category: MOVE_TYPE_STAR_POWER @@ -1395,8 +1395,8 @@ costBP: 0 - Unused_LoneFool1: nameMsg: (s32) "ひとりぼけ" - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [ TARGET_FLAG_SELECT_ONE, TARGET_FLAG_2 ] category: MOVE_TYPE_PARTNER actionTip: BTL_MSG_ACTION_TIP_PRESS_BEFORE_LANDING @@ -1404,8 +1404,8 @@ costBP: 0 - Unused_LoneFool2: nameMsg: (s32) "ひとりぼけ" - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [ TARGET_FLAG_SELECT_ONE, TARGET_FLAG_2 ] category: MOVE_TYPE_PARTNER actionTip: BTL_MSG_ACTION_TIP_PRESS_BEFORE_LANDING @@ -1413,8 +1413,8 @@ costBP: 0 - Unused_LoneFool3: nameMsg: (s32) "ひとりぼけ" - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [ TARGET_FLAG_SELECT_ONE, TARGET_FLAG_2 ] category: MOVE_TYPE_PARTNER actionTip: BTL_MSG_ACTION_TIP_PRESS_BEFORE_LANDING @@ -1422,8 +1422,8 @@ costBP: 0 - Unused_Mumble: nameMsg: (s32) "むにゃむにゃ" - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [ TARGET_FLAG_GROUND ] category: MOVE_TYPE_PARTNER actionTip: BTL_MSG_ACTION_TIP_PRESS_BEFORE_LANDING @@ -1431,8 +1431,8 @@ costBP: 0 - Unused_Preach: nameMsg: (s32) "せっきょう" - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [ TARGET_FLAG_SELECT_ONE, TARGET_FLAG_2 ] category: MOVE_TYPE_PARTNER actionTip: BTL_MSG_ACTION_TIP_PRESS_BEFORE_LANDING @@ -1440,8 +1440,8 @@ costBP: 0 - Unused_Awakening: nameMsg: (s32) "かくせい" - fullDescMsg: 0 - shortDescMsg: 0 + fullDescMsg: MSG_NONE + shortDescMsg: MSG_NONE flags: [ TARGET_FLAG_SELECT_ONE, TARGET_FLAG_2 ] category: MOVE_TYPE_PARTNER actionTip: BTL_MSG_ACTION_TIP_PRESS_BEFORE_LANDING diff --git a/src/npc_collision.c b/src/npc_collision.c index 08d13e5639f..79388645ac5 100644 --- a/src/npc_collision.c +++ b/src/npc_collision.c @@ -9,7 +9,8 @@ s32 NpcHitQueryColliderID; PlayerStatus* gPlayerStatusPtr = &gPlayerStatus; // maybe wPlayerStatus -s32 npc_raycast_down(s32 ignoreFlags, f32* startX, f32* startY, f32* startZ, f32* hitDepth) { +// not used outside this file +HitID npc_raycast_down(s32 ignoreFlags, f32* startX, f32* startY, f32* startZ, f32* hitDepth) { f32 cHitX; f32 cHitY; f32 cHitZ; @@ -35,7 +36,7 @@ s32 npc_raycast_down(s32 ignoreFlags, f32* startX, f32* startY, f32* startZ, f32 colliderID = test_ray_colliders(ignoreFlags, sx, sy, sz, 0.0f, -1.0f, 0.0f, &cHitX, &cHitY, &cHitZ, &cHitDepth, &cHitNx, &cHitNy, &cHitNz); if (!(ignoreFlags & COLLISION_IGNORE_ENTITIES)) { entityID = test_ray_entities(*startX, *startY, *startZ, 0.0f, -1.0f, 0.0f, &eHitX, &eHitY, &eHitZ, &eHitDepth, &eHitNx, &eHitNy, &eHitNz); - if (entityID >= 0) { + if (entityID > NO_COLLIDER) { colliderID = entityID | COLLISION_WITH_ENTITY_BIT; if (eHitDepth < cHitDepth) { cHitDepth = eHitDepth; @@ -47,7 +48,7 @@ s32 npc_raycast_down(s32 ignoreFlags, f32* startX, f32* startY, f32* startZ, f32 cHitNz = eHitNz; } } - if (colliderID < 0) { + if (colliderID <= NO_COLLIDER) { return colliderID; } } @@ -57,7 +58,7 @@ s32 npc_raycast_down(s32 ignoreFlags, f32* startX, f32* startY, f32* startZ, f32 *startY = cHitY; *startZ = cHitZ; - if (colliderID < 0) { + if (colliderID <= NO_COLLIDER) { return colliderID; } @@ -71,6 +72,7 @@ s32 npc_raycast_down(s32 ignoreFlags, f32* startX, f32* startY, f32* startZ, f32 return colliderID; } +// used specifically for partners b32 npc_raycast_down_around(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw, f32 radius) { f32 startX; f32 startY; @@ -110,7 +112,7 @@ b32 npc_raycast_down_around(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f3 originalDepth = depth = minDepth; colliderID = npc_raycast_down(ignoreFlags, &startX, &startY, &startZ, &depth); - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { if (depth <= minDepth) { hitYAhead = startY; NpcHitQueryColliderID = colliderID; @@ -133,7 +135,7 @@ b32 npc_raycast_down_around(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f3 depth = originalDepth; colliderID = npc_raycast_down(ignoreFlags, &startX, &startY, &startZ, &depth); - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { if (depth <= minDepth) { hitYBehindRight = startY; NpcHitQueryColliderID = colliderID; @@ -156,7 +158,7 @@ b32 npc_raycast_down_around(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f3 depth = originalDepth; colliderID = npc_raycast_down(ignoreFlags, &startX, &startY, &startZ, &depth); - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { if (depth <= minDepth) { hitYBehindLeft = startY; NpcHitQueryColliderID = colliderID; @@ -180,6 +182,7 @@ b32 npc_raycast_down_around(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f3 return FALSE; } +// used for non-partner NPCs b32 npc_raycast_down_sides(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth) { f32 startX; f32 startY; @@ -226,7 +229,7 @@ b32 npc_raycast_down_sides(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32 originalDepth = depth = minDepth; colliderID = npc_raycast_down(ignoreFlags, &startX, &startY, &startZ, &depth); - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { if (depth <= minDepth) { hitYAhead = startY; NpcHitQueryColliderID = colliderID; @@ -249,7 +252,7 @@ b32 npc_raycast_down_sides(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32 depth = originalDepth; colliderID = npc_raycast_down(ignoreFlags, &startX, &startY, &startZ, &depth); - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { if (depth <= minDepth) { hitYBehind = startY; NpcHitQueryColliderID = colliderID; @@ -301,7 +304,7 @@ s32 npc_raycast_up(s32 ignoreFlags, f32* startX, f32* startY, f32* startZ, f32* if (!(ignoreFlags & COLLISION_IGNORE_ENTITIES)) { entityID = test_ray_entities(sx, sy, sz, 0.0f, 1.0f, 0.0f, &eHitX, &eHitY, &eHitZ, &eHitDepth, &eHitNx, &eHitNy, &eHitNz); ret = entityID | COLLISION_WITH_ENTITY_BIT; - if (entityID >= 0) { + if (entityID > NO_COLLIDER) { cHitDepth = eHitDepth; cHitX = eHitX; cHitY = eHitY; @@ -314,7 +317,7 @@ s32 npc_raycast_up(s32 ignoreFlags, f32* startX, f32* startY, f32* startZ, f32* } } - if (ret < 0) { + if (ret <= NO_COLLIDER) { // TODO find better match colliderID = FALSE; return colliderID; @@ -348,7 +351,7 @@ s32 npc_raycast_up_corner(s32 ignoreFlags, f32* x, f32* y, f32* z, f32* length) sz2 = sz = *z; hitDepth = *length; colliderID = test_ray_colliders(ignoreFlags, sx, sy, sz, 0.0f, 1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); - if (colliderID >= 0 && *length > hitDepth) { + if (colliderID > NO_COLLIDER && *length > hitDepth) { *length = hitDepth; ret = colliderID; *x = sx = sx2; @@ -361,7 +364,7 @@ s32 npc_raycast_up_corner(s32 ignoreFlags, f32* x, f32* y, f32* z, f32* length) sx = sx2; sy = sy2; sz = sz2; - if (entityID >= 0 && *length > hitDepth) { + if (entityID > NO_COLLIDER && *length > hitDepth) { ret = entityID | COLLISION_WITH_ENTITY_BIT; *length = hitDepth; *x = sx; @@ -372,7 +375,7 @@ s32 npc_raycast_up_corner(s32 ignoreFlags, f32* x, f32* y, f32* z, f32* length) return ret; } -s32 npc_raycast_up_corners(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw, f32 radius) { +HitID npc_raycast_up_corners(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw, f32 radius) { f32 startX; f32 startY; f32 startZ; @@ -402,28 +405,28 @@ s32 npc_raycast_up_corners(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32 ret = NO_COLLIDER; hitID = npc_raycast_up_corner(ignoreFlags, &startX, &startY, &startZ, &depth); - if (hitID < 0) { + if (hitID <= NO_COLLIDER) { startX = x - deltaX; startY = y; startZ = z - deltaZ; hitID = npc_raycast_up_corner(ignoreFlags, &startX, &startY, &startZ, &depth); } - if (hitID < 0) { + if (hitID <= NO_COLLIDER) { startX = x + deltaZ; startY = y; startZ = z + deltaX; hitID = npc_raycast_up_corner(ignoreFlags, &startX, &startY, &startZ, &depth); } - if (hitID < 0) { + if (hitID <= NO_COLLIDER) { startX = x - deltaZ; startY = y; startZ = z - deltaX; hitID = npc_raycast_up_corner(ignoreFlags, &startX, &startY, &startZ, &depth); } - if (hitID >= 0) { + if (hitID > NO_COLLIDER) { *posX = startX; *posY = startY; *posZ = startZ; @@ -431,7 +434,7 @@ s32 npc_raycast_up_corners(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32 ret = hitID; } - if (ret < 0) { + if (ret <= NO_COLLIDER) { *posX = startX; *posY = startY; *posZ = startZ; @@ -450,7 +453,7 @@ s32 npc_raycast_general(s32 flags, f32 startX, f32 startY, f32 startZ, f32 dirX, if (flags & COLLISION_ONLY_ENTITIES) { entityID = test_ray_entities(startX, startY, startZ, dirX, dirY, dirZ, hitX, hitY, hitZ, outDepth, hitNx, hitNy, hitNz); - if (entityID >= 0) { + if (entityID > NO_COLLIDER) { ret = entityID | COLLISION_WITH_ENTITY_BIT; } } else { @@ -462,7 +465,7 @@ s32 npc_raycast_general(s32 flags, f32 startX, f32 startY, f32 startZ, f32 dirX, entityID = test_ray_entities(startX, startY, startZ, dirX, dirY, dirZ, hitX, hitY, hitZ, outDepth, hitNx, hitNy, hitNz); - if (entityID >= 0) { + if (entityID > NO_COLLIDER) { ret = entityID | COLLISION_WITH_ENTITY_BIT; } @@ -479,7 +482,7 @@ void npc_get_slip_vector(f32* outX, f32* outZ, f32 aX, f32 aZ, f32 bX, f32 bZ) { *outZ = (aZ - (dotProduct * bZ)) * 0.5f; } -s32 npc_test_move_with_slipping(s32 ignoreFlags, f32* x, f32* y, f32* z, f32 length, f32 yaw, f32 radius) { +HitID npc_test_move_with_slipping(s32 ignoreFlags, f32* x, f32* y, f32* z, f32 length, f32 yaw, f32 radius) { f32 outX, outY; f32 bX, bZ; f32 hitNy; @@ -506,7 +509,7 @@ s32 npc_test_move_with_slipping(s32 ignoreFlags, f32* x, f32* y, f32* z, f32 len 0.0f, inverseOutCosTheta, &hitX, &hitY, &hitZ, &hitDepth, &bX, &hitNy, &bZ); phi_s5 = FALSE; - if (raycastHitID >= 0 && hitDepth <= temp_f22) { + if (raycastHitID > NO_COLLIDER && hitDepth <= temp_f22) { temp_f0 = atan2(0.0f, 0.0f, sqrtf(SQ(bX) + SQ(bZ)), -hitNy); if (temp_f0 > 60.0f && temp_f0 < 90.0f) { phi_s5 = TRUE; @@ -552,7 +555,7 @@ s32 npc_test_move_without_slipping(s32 ignoreFlags, f32* x, f32* y, f32* z, f32 hitID = npc_raycast_general(ignoreFlags, *x - (radius * dirY * 0.5f), *y, *z - (radius * cosTheta * 0.5f), dirY, 0.0f, cosTheta, &hitX, &hitY, &hitZ, &depth, &hitNx, &hitNy, &hitNz); - if (hitID >= 0 && depth <= originalDepth) { + if (hitID > NO_COLLIDER && depth <= originalDepth) { f32 depthDiff = depth - originalDepth; f32 cosThetaTemp = cosTheta; // needed to match @@ -575,11 +578,11 @@ b32 npc_test_move_taller_with_slipping(s32 ignoreFlags, f32* x, f32* y, f32* z, s32 ret; radius *= 0.5f; - if (npc_test_move_with_slipping(ignoreFlags, &xTemp, &yTemp, &zTemp, fabsf(length), yaw, radius) < 0) { + if (npc_test_move_with_slipping(ignoreFlags, &xTemp, &yTemp, &zTemp, fabsf(length), yaw, radius) <= NO_COLLIDER) { xTemp = *x; yTemp = *y + 10.01f; zTemp = *z; - ret = npc_test_move_with_slipping(ignoreFlags, &xTemp, &yTemp, &zTemp, fabsf(length), yaw, radius) >= 0; + ret = npc_test_move_with_slipping(ignoreFlags, &xTemp, &yTemp, &zTemp, fabsf(length), yaw, radius) > NO_COLLIDER; *x = xTemp; *z = zTemp; } else { @@ -600,7 +603,7 @@ b32 npc_test_move_simple_with_slipping(s32 ignoreFlags, f32* x, f32* y, f32* z, *x = tempX; *z = tempZ; - return hitID >= 0; + return hitID > NO_COLLIDER; } b32 npc_test_move_simple_without_slipping(s32 ignoreFlags, f32* x, f32* y, f32* z, f32 length, f32 yaw, f32 height, @@ -613,11 +616,12 @@ b32 npc_test_move_simple_without_slipping(s32 ignoreFlags, f32* x, f32* y, f32* *x = tempX; *z = tempZ; - return hitID >= 0; + return hitID > NO_COLLIDER; } // traces lateral collision at position +10, +15, +20, and one unit below height // returns number of traces that hit +// used for partner NPCs s32 npc_test_move_complex_with_slipping(s32 ignoreFlags, f32* x, f32* y, f32* z, f32 length, f32 yaw, f32 height, f32 radius) { f32 startX; @@ -630,7 +634,7 @@ s32 npc_test_move_complex_with_slipping(s32 ignoreFlags, f32* x, f32* y, f32* z, startX = *x; startY = *y + height - 1.0f; startZ = *z; - if (npc_test_move_with_slipping(ignoreFlags, &startX, &startY, &startZ, fabsf(length), yaw, radius) >= 0) { + if (npc_test_move_with_slipping(ignoreFlags, &startX, &startY, &startZ, fabsf(length), yaw, radius) > NO_COLLIDER) { *x = startX; *z = startZ; ret = 4; @@ -639,7 +643,7 @@ s32 npc_test_move_complex_with_slipping(s32 ignoreFlags, f32* x, f32* y, f32* z, startX = *x; startY = *y + 20.0f; startZ = *z; - if (npc_test_move_with_slipping(ignoreFlags, &startX, &startY, &startZ, fabsf(length), yaw, radius) >= 0) { + if (npc_test_move_with_slipping(ignoreFlags, &startX, &startY, &startZ, fabsf(length), yaw, radius) > NO_COLLIDER) { *x = startX; *z = startZ; ret = 3; @@ -648,7 +652,7 @@ s32 npc_test_move_complex_with_slipping(s32 ignoreFlags, f32* x, f32* y, f32* z, startX = *x; startY = *y + 15.01f; startZ = *z; - if (npc_test_move_with_slipping(ignoreFlags, &startX, &startY, &startZ, fabsf(length), yaw, radius) >= 0) { + if (npc_test_move_with_slipping(ignoreFlags, &startX, &startY, &startZ, fabsf(length), yaw, radius) > NO_COLLIDER) { *x = startX; *z = startZ; ret = 2; @@ -660,7 +664,7 @@ s32 npc_test_move_complex_with_slipping(s32 ignoreFlags, f32* x, f32* y, f32* z, hitID = npc_test_move_with_slipping(ignoreFlags, &startX, &startY, &startZ, fabsf(length), yaw, radius); *x = startX; *z = startZ; - if (hitID >= 0) { + if (hitID > NO_COLLIDER) { ret = 1; } diff --git a/src/recipes.yaml b/src/recipes.yaml index c01072c2ee0..c0389174eaa 100644 --- a/src/recipes.yaml +++ b/src/recipes.yaml @@ -21,7 +21,7 @@ Products: - [ ITEM_BLAND_MEAL, QUALITY_GOOD ] - [ ITEM_HONEY_SHROOM, QUALITY_OK ] - [ ITEM_MAPLE_SHROOM, QUALITY_OK ] - - [ ITEM_JELLY_SHROOM1, QUALITY_OK ] + - [ ITEM_JELLY_SHROOM, QUALITY_OK ] - [ ITEM_LIFE_SHROOM, QUALITY_OK ] - [ ITEM_VOLT_SHROOM, QUALITY_OK ] - [ ITEM_SLEEPY_SHEEP, QUALITY_ODD ] @@ -118,7 +118,7 @@ DoubleRecipes: - [ ITEM_MUSHROOM, ITEM_FIRE_FLOWER, ITEM_HOT_SHROOM ] - [ ITEM_MUSHROOM, ITEM_HONEY_SYRUP, ITEM_HONEY_SHROOM ] - [ ITEM_MUSHROOM, ITEM_MAPLE_SYRUP, ITEM_MAPLE_SHROOM ] - - [ ITEM_MUSHROOM, ITEM_JAMMIN_JELLY, ITEM_JELLY_SHROOM1 ] + - [ ITEM_MUSHROOM, ITEM_JAMMIN_JELLY, ITEM_JELLY_SHROOM ] - [ ITEM_MUSHROOM, ITEM_GOOMNUT, ITEM_VOLT_SHROOM ] - [ ITEM_MUSHROOM, ITEM_KOOPA_LEAF, ITEM_VOLT_SHROOM ] - [ ITEM_MUSHROOM, ITEM_DRIED_PASTA, ITEM_BLAND_MEAL ] @@ -347,7 +347,7 @@ CookingRecords: - [ ITEM_MAPLE_SHROOM, GF_MAC02_DiscoveredRecipe_27 ] - [ ITEM_BOILED_EGG, GF_MAC02_DiscoveredRecipe_28 ] - [ ITEM_YOSHI_COOKIE, GF_MAC02_DiscoveredRecipe_29 ] - - [ ITEM_JELLY_SHROOM1, GF_MAC02_DiscoveredRecipe_2A ] + - [ ITEM_JELLY_SHROOM, GF_MAC02_DiscoveredRecipe_2A ] - [ ITEM_TASTY_TONIC, GF_MAC02_DiscoveredRecipe_2B ] - [ ITEM_DIZZY_DIAL, GF_MAC02_DiscoveredRecipe_2C ] - [ ITEM_SUPER_SODA, GF_MAC02_DiscoveredRecipe_2D ] diff --git a/src/state_pause.c b/src/state_pause.c index 295f7ecd189..db55030dff7 100644 --- a/src/state_pause.c +++ b/src/state_pause.c @@ -27,7 +27,7 @@ u16* pause_frameBuffers[] = { gFrameBuf0, gFrameBuf1, gFrameBuf2 }; extern ShapeFile gMapShapeData; -NUPiOverlaySegment D_8007795C = { +NUPiOverlaySegment PauseOverlaySegment = { .romStart = pause_ROM_START, .romEnd = pause_ROM_END, .ramStart = pause_VRAM, @@ -105,7 +105,7 @@ void state_step_pause(void) { SavedReverbMode = sfx_get_reverb_mode(); sfx_set_reverb_mode(0); bgm_quiet_max_volume(); - nuPiReadRomOverlay(&D_8007795C); + nuPiReadRomOverlay(&PauseOverlaySegment); pause_init(); gOverrideFlags &= ~GLOBAL_OVERRIDES_DISABLE_DRAW_FRAME; } @@ -143,7 +143,7 @@ void state_step_unpause(void) { MapConfig* mapConfig; void* mapShape; s32 assetSize; - + switch (StepPauseState) { case 0: case 1: @@ -210,7 +210,7 @@ void state_step_unpause(void) { set_time_freeze_mode(TIME_FREEZE_PARTIAL); StepPauseState = 3; gPlayerStatus.prevAlpha = gPlayerStatus.curAlpha - 1; - D_802D9D71 = D_802D9D70 + 1; + ReflectFloorPrevAlpha = ReflectWallPrevAlpha + 1; update_encounters(); update_npcs(); diff --git a/src/trigger.c b/src/trigger.c index fbfaa1335d5..b89a31016cd 100644 --- a/src/trigger.c +++ b/src/trigger.c @@ -190,19 +190,19 @@ void update_triggers(void) { } if (listTrigger->flags & TRIGGER_POINT_BOMB) { - Vec4f* triggerPos; + BombTrigger* bombPos; f32 dist; if (collisionStatus->bombetteExploded < 0) { continue; } - triggerPos = listTrigger->location.pos; - dist = dist3D(triggerPos->x, triggerPos->y, triggerPos->z, + bombPos = listTrigger->location.blast; + dist = dist3D(bombPos->pos.x, bombPos->pos.y, bombPos->pos.z, collisionStatus->bombetteExplosionPos.x, collisionStatus->bombetteExplosionPos.y, collisionStatus->bombetteExplosionPos.z); - if ((triggerPos->yaw * 0.5f) + 50.0f < dist) { + if ((bombPos->diameter * 0.5f) + 50.0f < dist) { continue; } } diff --git a/src/world/action/hammer.c b/src/world/action/hammer.c index 5aa4aafa30a..1a17f93cf75 100644 --- a/src/world/action/hammer.c +++ b/src/world/action/hammer.c @@ -73,7 +73,7 @@ void action_hammer_play_hit_fx(s32 hitID) { sinTheta = sin_rad(theta) * 25.0f; cosTheta = cos_rad(theta) * -25.0f; - if (hitID < 0) { + if (hitID <= NO_COLLIDER) { numParticles = 6; x = playerStatus->pos.x + sinTheta; y = playerStatus->pos.y; @@ -146,7 +146,7 @@ s32 func_802B62A4_E25174(void) { y = playerY; z = playerZ - (outCosTheta * i); ret = player_test_lateral_overlap(PLAYER_COLLISION_3, playerStatus, &x, &y, &z, 4.0f, yaw); - if (ret >= 0) { + if (ret > NO_COLLIDER) { HammerHit->hitPos.x = x; HammerHit->hitPos.y = y; HammerHit->hitPos.z = z; @@ -173,7 +173,7 @@ s32 func_802B62A4_E25174(void) { z = playerZ - (outCosTheta * i); ret = player_test_lateral_overlap(PLAYER_COLLISION_3, playerStatus, &x, &y, &z, 4.0f, yaw); - if (ret >= 0) { + if (ret > NO_COLLIDER) { HammerHit->hitPos.x = x; HammerHit->hitPos.y = y; HammerHit->hitPos.z = z; @@ -182,7 +182,7 @@ s32 func_802B62A4_E25174(void) { } } - if (ret >= 0 && (ret & COLLISION_WITH_ENTITY_BIT)) { + if (ret > NO_COLLIDER && (ret & COLLISION_WITH_ENTITY_BIT)) { s32 hammerLevel = gPlayerData.hammerLevel; switch (get_entity_type(ret)) { @@ -245,21 +245,21 @@ void action_update_hammer(void) { if (gPlayerData.hammerLevel == 2) { soundID = SOUND_HAMMER_SWING_3; anim = ANIM_MarioW1_Smash3_Hit; - if (HammerHit->hitID < 0) { + if (HammerHit->hitID <= NO_COLLIDER) { soundID = SOUND_HAMMER_SWING_3; anim = ANIM_MarioW1_Smash3_Miss; } } else if (gPlayerData.hammerLevel == 1) { soundID = SOUND_HAMMER_SWING_2; anim = ANIM_MarioW1_Smash2_Hit; - if (HammerHit->hitID < 0) { + if (HammerHit->hitID <= NO_COLLIDER) { soundID = SOUND_HAMMER_SWING_2; anim = ANIM_MarioW1_Smash2_Miss; } } else { soundID = SOUND_HAMMER_SWING_1; anim = ANIM_MarioW1_Smash1_Hit; - if (HammerHit->hitID < 0) { + if (HammerHit->hitID <= NO_COLLIDER) { soundID = SOUND_HAMMER_SWING_1; anim = ANIM_MarioW1_Smash1_Miss; } @@ -326,14 +326,14 @@ void func_802B6820_E256F0(void) { result = player_test_lateral_overlap(PLAYER_COLLISION_3, playerStatus, &x, &y, &z, 4.0f, yaw); if (HammerHit->unk_14 == 0) { collisionStatus->lastWallHammered = result; - if (result >= 0) { + if (result > NO_COLLIDER) { if (result & COLLISION_WITH_ENTITY_BIT) { get_entity_by_index(result)->collisionTimer = 0; } } } - if (result >= 0) { + if (result > NO_COLLIDER) { break; } } @@ -357,14 +357,14 @@ void func_802B6820_E256F0(void) { result = player_test_lateral_overlap(PLAYER_COLLISION_3, playerStatus, &x, &y, &z, 4.0f, yaw); if (HammerHit->unk_14 == 0) { collisionStatus->lastWallHammered = result; - if (result >= 0) { + if (result > NO_COLLIDER) { if (result & COLLISION_WITH_ENTITY_BIT) { get_entity_by_index(result)->collisionTimer = 0; } } } - if (result >= 0) { + if (result > NO_COLLIDER) { break; } } @@ -383,27 +383,27 @@ void func_802B6820_E256F0(void) { action_hammer_play_hit_fx(HammerHit->hitID); - if (collisionStatus->lastWallHammered >= 0 && (collisionStatus->lastWallHammered & COLLISION_WITH_ENTITY_BIT)) { + if (collisionStatus->lastWallHammered > NO_COLLIDER && (collisionStatus->lastWallHammered & COLLISION_WITH_ENTITY_BIT)) { get_entity_by_index(collisionStatus->lastWallHammered)->collisionTimer = 0; playerStatus->flags |= PS_FLAG_HAMMER_CHECK; - } else if (HammerHit->hitID < 0) { + } else if (HammerHit->hitID <= NO_COLLIDER) { playerStatus->flags |= PS_FLAG_HAMMER_CHECK; } - if (HammerHit->hitID < 0 && gPlayerData.hammerLevel >= 2) { + if (HammerHit->hitID <= NO_COLLIDER && gPlayerData.hammerLevel >= 2) { gCurrentHiddenPanels.tryFlipTrigger = TRUE; gCurrentHiddenPanels.flipTriggerPosY = playerStatus->pos.y; } } - if (playerStatus->actionSubstate == SUBSTATE_HAMMER_0 && result >= 0 && HammerHit->unk_14 == 0) { + if (playerStatus->actionSubstate == SUBSTATE_HAMMER_0 && result > NO_COLLIDER && HammerHit->unk_14 == 0) { playerStatus->actionSubstate++; } - if (playerStatus->actionSubstate == SUBSTATE_HAMMER_1 && result < 0) { + if (playerStatus->actionSubstate == SUBSTATE_HAMMER_1 && result <= NO_COLLIDER) { playerStatus->actionSubstate = SUBSTATE_HAMMER_2; } HammerHit->timer++; - if (result >= 0) { + if (result > NO_COLLIDER) { HammerHit->unk_14 = 1; } if (HammerHit->timer == 6) { diff --git a/src/world/action/hit_fire.c b/src/world/action/hit_fire.c index fc5d78d0618..762ea8a0667 100644 --- a/src/world/action/hit_fire.c +++ b/src/world/action/hit_fire.c @@ -55,7 +55,7 @@ void action_update_hit_fire(void) { s32 colliderID; playerStatus->pos.y = player_check_collision_below(player_fall_distance(), &colliderID); - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { colliderID = get_collider_flags(colliderID); //TODO surfaceType set_action_state(ACTION_STATE_LAND); playerStatus->blinkTimer = 60; diff --git a/src/world/action/knockback.c b/src/world/action/knockback.c index 0840700ae91..9cacb7f1d80 100644 --- a/src/world/action/knockback.c +++ b/src/world/action/knockback.c @@ -58,7 +58,7 @@ void action_update_knockback(void) { playerStatus->pos.y = player_check_collision_below(player_fall_distance(), &colliderID); - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { colliderID = get_collider_flags(colliderID); //TODO surfaceType set_action_state(ACTION_STATE_LAND); } diff --git a/src/world/action/slide.c b/src/world/action/slide.c index d47e40f8efb..1fc0262b037 100644 --- a/src/world/action/slide.c +++ b/src/world/action/slide.c @@ -86,7 +86,7 @@ void action_update_sliding(void) { posY = playerStatus->pos.y + (playerStatus->colliderHeight * 0.5f); hitID = player_raycast_below_cam_relative(playerStatus, &posX, &posY, &posZ, &depth, &hitRx, &hitRy, &hitDirX, &hitDirZ); D_802B6798 = hitRy; - if (hitID >= 0) { + if (hitID > NO_COLLIDER) { collisionStatus = &gCollisionStatus; surfaceType = get_collider_flags(hitID) & COLLIDER_FLAGS_SURFACE_TYPE_MASK; if (surfaceType == SURFACE_TYPE_SLIDE) { @@ -113,7 +113,7 @@ void action_update_sliding(void) { posZ = playerStatus->pos.z; posY = playerStatus->pos.y + (playerStatus->colliderHeight * 0.5f); hitID = player_raycast_below_cam_relative(playerStatus, &posX, &posY, &posZ, &depth, &hitRx, &hitRy, &hitDirX, &hitDirZ); - if (hitID >= 0) { + if (hitID > NO_COLLIDER) { speed = playerStatus->curSpeed / 3.0f; if (speed < 0.01) { playerStatus->curSpeed = 0.0f; @@ -147,7 +147,7 @@ void action_update_sliding(void) { playerStatus->curSpeed = 0.0f; } playerStatus->pos.y = player_check_collision_below(player_fall_distance(), &hitID); - if (hitID >= 0) { + if (hitID > NO_COLLIDER) { SlideLaunchSpeed = -1; suggest_player_anim_always_forward(ANIM_MarioW2_Collapse); sfx_play_sound_at_player(SOUND_TRIP, SOUND_SPACE_DEFAULT); diff --git a/src/world/action/step_up.c b/src/world/action/step_up.c index 4a8705ba974..bf03822c09e 100644 --- a/src/world/action/step_up.c +++ b/src/world/action/step_up.c @@ -67,7 +67,7 @@ void action_update_step_up(void) { playerStatus->pos.y += playerStatus->gravityIntegrator[0]; } - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { if (playerStatus->prevActionState != ACTION_STATE_SPIN) { set_action_state(playerStatus->prevActionState); } else { diff --git a/src/world/action/use_munchlesia.c b/src/world/action/use_munchlesia.c index 345e27f2fc9..0f8778805ed 100644 --- a/src/world/action/use_munchlesia.c +++ b/src/world/action/use_munchlesia.c @@ -58,7 +58,7 @@ void action_update_use_munchlesia(void) { gCameras[CAM_DEFAULT].targetPos.y = playerStatus->pos.y; gCameras[CAM_DEFAULT].targetPos.z = playerStatus->pos.z; hitPosY = player_check_collision_below(Munchlesia_LaunchVelocity, &colliderID); - if (colliderID >= 0) { + if (colliderID > NO_COLLIDER) { sfx_play_sound_at_player(SOUND_TRIP, SOUND_SPACE_DEFAULT); suggest_player_anim_always_forward(ANIM_MarioW2_Collapse); playerStatus->pos.y = hitPosY; diff --git a/src/world/action/use_spinning_flower.c b/src/world/action/use_spinning_flower.c index 0031f079a64..a1cfa60a6ac 100644 --- a/src/world/action/use_spinning_flower.c +++ b/src/world/action/use_spinning_flower.c @@ -12,9 +12,9 @@ BSS f32 SpinningFlower_AngleToCenter; BSS f32 D_802B6EF0; BSS f32 D_802B6EF4; -extern s16 D_802BCE30; -extern s16 D_802BCE32; -extern s16 D_802BCE34; +extern s16 FlowerGoalPositionY; +extern s16 FlowerGoalPositionZ; +extern s16 FlowerGoalPositionX; enum { SUBSTATE_ATTRACT = 1, @@ -221,11 +221,11 @@ void action_update_use_spinning_flower(void) { gCameras[CAM_DEFAULT].targetPos.x = playerStatus->pos.x; gCameras[CAM_DEFAULT].targetPos.y = playerStatus->pos.y; gCameras[CAM_DEFAULT].targetPos.z = playerStatus->pos.z; - distToCenter = fabsf(dist2D(D_802BCE34, D_802BCE32, playerStatus->pos.x, playerStatus->pos.z)); + distToCenter = fabsf(dist2D(FlowerGoalPositionX, FlowerGoalPositionZ, playerStatus->pos.x, playerStatus->pos.z)); if (distToCenter > 40.0f) { - if (D_802BCE30 + 30 < playerStatus->pos.y) { + if (FlowerGoalPositionY + 30 < playerStatus->pos.y) { playerStatus->actionSubstate++; // SUBSTATE_ASCEND_B - inputAngle = atan2(playerStatus->pos.x, playerStatus->pos.z, D_802BCE34, D_802BCE32); + inputAngle = atan2(playerStatus->pos.x, playerStatus->pos.z, FlowerGoalPositionX, FlowerGoalPositionZ); sin_cos_rad(DEG_TO_RAD(inputAngle), &dx, &dz); playerStatus->curStateTime = 64; SpinningFlower_AngleToCenter = inputAngle; diff --git a/src/world/area_dgb/dgb_09/dgb_09_3_breakable.c b/src/world/area_dgb/dgb_09/dgb_09_3_breakable.c index fc4bbe9c30b..4f1d44676ea 100644 --- a/src/world/area_dgb/dgb_09/dgb_09_3_breakable.c +++ b/src/world/area_dgb/dgb_09/dgb_09_3_breakable.c @@ -3,7 +3,7 @@ BombTrigger N(BombPos_Wall) = { .pos = { 300.0f, 0.0f, 88.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_BlastWall) = { diff --git a/src/world/area_dgb/dgb_12/dgb_12_3_spikes.c b/src/world/area_dgb/dgb_12/dgb_12_3_spikes.c index e7e34e34e65..1d345591255 100644 --- a/src/world/area_dgb/dgb_12/dgb_12_3_spikes.c +++ b/src/world/area_dgb/dgb_12/dgb_12_3_spikes.c @@ -2,7 +2,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o200, .pos = { -503.0, 0.0, -63.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_SetupSpikes) = { diff --git a/src/world/area_dro/dro_01/dro_01_3_npc.c b/src/world/area_dro/dro_01/dro_01_3_npc.c index edc8ea824a3..cf766b84f9f 100644 --- a/src/world/area_dro/dro_01/dro_01_3_npc.c +++ b/src/world/area_dro/dro_01/dro_01_3_npc.c @@ -266,22 +266,22 @@ NpcData N(PassiveNPCs)[] = { .flags = ENEMY_FLAG_PASSIVE | ENEMY_FLAG_IGNORE_WORLD_COLLISION | ENEMY_FLAG_IGNORE_ENTITY_COLLISION | ENEMY_FLAG_FLYING | ENEMY_FLAG_NO_SHADOW_RAYCAST, .drops = NO_DROPS, .animations = { - ANIM_Musician_Composer_Idle, - ANIM_Musician_Composer_Still, - ANIM_Musician_Composer_Still, - ANIM_Musician_Composer_Still, - ANIM_Musician_Composer_Still, - ANIM_Musician_Composer_Still, - ANIM_Musician_Composer_Still, - ANIM_Musician_Composer_Still, - ANIM_Musician_Composer_Still, - ANIM_Musician_Composer_Still, - ANIM_Musician_Composer_Still, - ANIM_Musician_Composer_Still, - ANIM_Musician_Composer_Still, - ANIM_Musician_Composer_Still, - ANIM_Musician_Composer_Still, - ANIM_Musician_Composer_Still, + .idle = ANIM_Musician_Composer_Idle, + .walk = ANIM_Musician_Composer_Still, + .run = ANIM_Musician_Composer_Still, + .chase = ANIM_Musician_Composer_Still, + .anim_4 = ANIM_Musician_Composer_Still, + .anim_5 = ANIM_Musician_Composer_Still, + .death = ANIM_Musician_Composer_Still, + .hit = ANIM_Musician_Composer_Still, + .anim_8 = ANIM_Musician_Composer_Still, + .anim_9 = ANIM_Musician_Composer_Still, + .anim_A = ANIM_Musician_Composer_Still, + .anim_B = ANIM_Musician_Composer_Still, + .anim_C = ANIM_Musician_Composer_Still, + .anim_D = ANIM_Musician_Composer_Still, + .anim_E = ANIM_Musician_Composer_Still, + .anim_F = ANIM_Musician_Composer_Still, }, .tattle = MSG_NpcTattle_Composer, }, diff --git a/src/world/area_dro/dro_01/dro_01_7_foliage.c b/src/world/area_dro/dro_01/dro_01_7_foliage.c index a7aafdd6e6a..8f45efaf9f2 100644 --- a/src/world/area_dro/dro_01/dro_01_7_foliage.c +++ b/src/world/area_dro/dro_01/dro_01_7_foliage.c @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 120.0f, 0.0f, -43.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_dro/dro_02/dro_02_5_npc.c b/src/world/area_dro/dro_02/dro_02_5_npc.c index ca3baefdba4..5bbd20ec71d 100644 --- a/src/world/area_dro/dro_02/dro_02_5_npc.c +++ b/src/world/area_dro/dro_02/dro_02_5_npc.c @@ -360,28 +360,39 @@ NpcData N(PassiveNPCs)[] = { .id = NPC_Archeologist, .pos = { -320.0f, 0.0f, -14.0f }, .yaw = 90, - .territory = { .temp = { -303, 0, 22, 146, 38, -32767, 1, 0, 0, 0, 0, 0, 0, 1 }}, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_RECT, + .centerPos = { -303, 0, 22 }, + .wanderSize = { 146, 38 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 0, 0, 0 }, + .detectSize = { 0 }, + } + }, .init = &N(EVS_NpcInit_Archeologist), .settings = &N(NpcSettings_Archeologist), .flags = ENEMY_FLAG_PASSIVE | ENEMY_FLAG_IGNORE_WORLD_COLLISION | ENEMY_FLAG_IGNORE_ENTITY_COLLISION | ENEMY_FLAG_FLYING | ENEMY_FLAG_NO_SHADOW_RAYCAST, .drops = NO_DROPS, .animations = { - ANIM_Archeologist_Idle, - ANIM_Archeologist_Walk, - ANIM_Archeologist_Run, - ANIM_Archeologist_Run, - ANIM_Archeologist_Idle, - ANIM_Archeologist_Idle, - ANIM_Archeologist_Idle, - ANIM_Archeologist_Idle, - ANIM_Archeologist_Idle, - ANIM_Archeologist_Idle, - ANIM_Archeologist_Idle, - ANIM_Archeologist_Idle, - ANIM_Archeologist_Idle, - ANIM_Archeologist_Idle, - ANIM_Archeologist_Idle, - ANIM_Archeologist_Idle, + .idle = ANIM_Archeologist_Idle, + .walk = ANIM_Archeologist_Walk, + .run = ANIM_Archeologist_Run, + .chase = ANIM_Archeologist_Run, + .anim_4 = ANIM_Archeologist_Idle, + .anim_5 = ANIM_Archeologist_Idle, + .death = ANIM_Archeologist_Idle, + .hit = ANIM_Archeologist_Idle, + .anim_8 = ANIM_Archeologist_Idle, + .anim_9 = ANIM_Archeologist_Idle, + .anim_A = ANIM_Archeologist_Idle, + .anim_B = ANIM_Archeologist_Idle, + .anim_C = ANIM_Archeologist_Idle, + .anim_D = ANIM_Archeologist_Idle, + .anim_E = ANIM_Archeologist_Idle, + .anim_F = ANIM_Archeologist_Idle, }, .tattle = MSG_NpcTattle_Archeologist, }, @@ -389,7 +400,18 @@ NpcData N(PassiveNPCs)[] = { .id = NPC_Dryite_01, .pos = { -20.0f, 0.0f, 40.0f }, .yaw = 270, - .territory = { .temp = { -20, 0, 40, 60, 0, -32767, 0, 0, 0, 0, 0, 0, 0, 1 }}, + .territory = { + .wander = { + .isFlying = TRUE, + .moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED, + .wanderShape = SHAPE_CYLINDER, + .centerPos = { -20, 0, 40 }, + .wanderSize = { 60, 0 }, + .detectShape = SHAPE_CYLINDER, + .detectPos = { 0, 0, 0 }, + .detectSize = { 0, 0 }, + } + }, .init = &N(EVS_NpcInit_MrE), .settings = &N(NpcSettings_Dryite_Wander), .flags = ENEMY_FLAG_PASSIVE | ENEMY_FLAG_IGNORE_WORLD_COLLISION | ENEMY_FLAG_IGNORE_ENTITY_COLLISION | ENEMY_FLAG_FLYING | ENEMY_FLAG_NO_SHADOW_RAYCAST, @@ -428,22 +450,22 @@ NpcData N(PassiveNPCs)[] = { .flags = ENEMY_FLAG_PASSIVE | ENEMY_FLAG_IGNORE_WORLD_COLLISION | ENEMY_FLAG_IGNORE_ENTITY_COLLISION | ENEMY_FLAG_FLYING | ENEMY_FLAG_NO_SHADOW_RAYCAST, .drops = NO_DROPS, .animations = { - ANIM_WorldMerlee_Idle, - ANIM_WorldMerlee_Walk, - ANIM_WorldMerlee_Run, - ANIM_WorldMerlee_Run, - ANIM_WorldMerlee_Idle, - ANIM_WorldMerlee_Idle, - ANIM_WorldMerlee_Idle, - ANIM_WorldMerlee_Idle, - ANIM_WorldMerlee_Idle, - ANIM_WorldMerlee_Idle, - ANIM_WorldMerlee_Idle, - ANIM_WorldMerlee_Idle, - ANIM_WorldMerlee_Idle, - ANIM_WorldMerlee_Idle, - ANIM_WorldMerlee_Idle, - ANIM_WorldMerlee_Idle, + .idle = ANIM_WorldMerlee_Idle, + .walk = ANIM_WorldMerlee_Walk, + .run = ANIM_WorldMerlee_Run, + .chase = ANIM_WorldMerlee_Run, + .anim_4 = ANIM_WorldMerlee_Idle, + .anim_5 = ANIM_WorldMerlee_Idle, + .death = ANIM_WorldMerlee_Idle, + .hit = ANIM_WorldMerlee_Idle, + .anim_8 = ANIM_WorldMerlee_Idle, + .anim_9 = ANIM_WorldMerlee_Idle, + .anim_A = ANIM_WorldMerlee_Idle, + .anim_B = ANIM_WorldMerlee_Idle, + .anim_C = ANIM_WorldMerlee_Idle, + .anim_D = ANIM_WorldMerlee_Idle, + .anim_E = ANIM_WorldMerlee_Idle, + .anim_F = ANIM_WorldMerlee_Idle, }, .tattle = MSG_NpcTattle_Merlee, }, diff --git a/src/world/area_flo/flo_03/flo_03_4_foliage.c b/src/world/area_flo/flo_03/flo_03_4_foliage.c index 0a707f59a36..5c201906640 100644 --- a/src/world/area_flo/flo_03/flo_03_4_foliage.c +++ b/src/world/area_flo/flo_03/flo_03_4_foliage.c @@ -31,7 +31,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -208.0f, 0.0f, -182.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_flo/flo_07/flo_07_3_npc.c b/src/world/area_flo/flo_07/flo_07_3_npc.c index cfcb3a29951..d7244955f78 100644 --- a/src/world/area_flo/flo_07/flo_07_3_npc.c +++ b/src/world/area_flo/flo_07/flo_07_3_npc.c @@ -220,7 +220,7 @@ ShakeTreeConfig N(ShakeTree_CrystalTree) = { BombTrigger N(BombPos_CrystalTree) = { .pos = { -309.0f, 0.0f, 31.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_flo/flo_08/flo_08_3_main.c b/src/world/area_flo/flo_08/flo_08_3_main.c index 223579f4413..bba11f83463 100644 --- a/src/world/area_flo/flo_08/flo_08_3_main.c +++ b/src/world/area_flo/flo_08/flo_08_3_main.c @@ -22,7 +22,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o158, .pos = { -540.0, 0.0, 50.0 }}, { .colliderID = COLLIDER_o132, .pos = { 60.0, 0.0, 50.0 }}, { .colliderID = COLLIDER_o223, .pos = { 60.0, 0.0, 50.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_flo/flo_08/flo_08_5_foliage.c b/src/world/area_flo/flo_08/flo_08_5_foliage.c index 7955e91f6e0..1310cb101fd 100644 --- a/src/world/area_flo/flo_08/flo_08_5_foliage.c +++ b/src/world/area_flo/flo_08/flo_08_5_foliage.c @@ -31,7 +31,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 391.0f, 0.0f, -102.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_flo/flo_09/flo_09_4_foliage.c b/src/world/area_flo/flo_09/flo_09_4_foliage.c index 24467e8022a..84e75bc725d 100644 --- a/src/world/area_flo/flo_09/flo_09_4_foliage.c +++ b/src/world/area_flo/flo_09/flo_09_4_foliage.c @@ -65,7 +65,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -200.0f, 0.0f, 1.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o4, MODEL_o5); @@ -79,7 +79,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 0.0f, 0.0f, 1.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o14, MODEL_o15); @@ -93,7 +93,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { 200.0f, 0.0f, 1.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_flo/flo_10/flo_10_7_foliage.c b/src/world/area_flo/flo_10/flo_10_7_foliage.c index c5c8957ffe6..030e3b063de 100644 --- a/src/world/area_flo/flo_10/flo_10_7_foliage.c +++ b/src/world/area_flo/flo_10/flo_10_7_foliage.c @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 137.0f, 0.0f, -283.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_flo/flo_14/flo_14_2_main.c b/src/world/area_flo/flo_14/flo_14_2_main.c index b1aae776cb5..9875188688b 100644 --- a/src/world/area_flo/flo_14/flo_14_2_main.c +++ b/src/world/area_flo/flo_14/flo_14_2_main.c @@ -30,7 +30,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o153, .pos = { 410.0, 60.0, -95.0 }}, { .colliderID = COLLIDER_o154, .pos = { 550.0, 0.0, 50.0 }}, { .colliderID = COLLIDER_o158, .pos = { -50.0, 0.0, 110.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_flo/flo_16/flo_16_2_main.c b/src/world/area_flo/flo_16/flo_16_2_main.c index c4e311c5fd9..3f6c7e51011 100644 --- a/src/world/area_flo/flo_16/flo_16_2_main.c +++ b/src/world/area_flo/flo_16/flo_16_2_main.c @@ -19,7 +19,7 @@ EvtScript N(EVS_BindExitTriggers) = { LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o190, .pos = { -310.0, 0.0, 0.0 }}, { .colliderID = COLLIDER_o191, .pos = { 305.0, 100.0, 0.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_flo/flo_17/flo_17_2_main.c b/src/world/area_flo/flo_17/flo_17_2_main.c index 02922295c2a..afa493f82c1 100644 --- a/src/world/area_flo/flo_17/flo_17_2_main.c +++ b/src/world/area_flo/flo_17/flo_17_2_main.c @@ -38,7 +38,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o129, .pos = { 280.0, 0.0, 50.0 }}, { .colliderID = COLLIDER_o134, .pos = { 525.0, 0.0, -70.0 }}, { .colliderID = COLLIDER_o133, .pos = { 525.0, 0.0, 50.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_flo/flo_18/flo_18_2_main.c b/src/world/area_flo/flo_18/flo_18_2_main.c index de0d0f46567..a0f214ca5b5 100644 --- a/src/world/area_flo/flo_18/flo_18_2_main.c +++ b/src/world/area_flo/flo_18/flo_18_2_main.c @@ -20,7 +20,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o138, .pos = { -200.0, 0.0, 120.0 }}, { .colliderID = COLLIDER_o140, .pos = { 0.0, 0.0, 120.0 }}, { .colliderID = COLLIDER_o142, .pos = { 170.0, 0.0, 120.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_flo/flo_18/flo_18_3_machine.c b/src/world/area_flo/flo_18/flo_18_3_machine.c index ce12b7e1e27..22b35d02bbc 100644 --- a/src/world/area_flo/flo_18/flo_18_3_machine.c +++ b/src/world/area_flo/flo_18/flo_18_3_machine.c @@ -625,22 +625,22 @@ EvtScript N(EVS_DamageMachine) = { BombTrigger N(Machine_BombTrigger_01) = { .pos = { 5.0f, 0.0f, -10.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(Machine_BombTrigger_02) = { .pos = { -5.0f, 0.0f, -20.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(Machine_BombTrigger_03) = { .pos = { 50.0f, 0.0f, -10.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(Machine_BombTrigger_04) = { .pos = { 105.0f, 0.0f, -10.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupMachine) = { diff --git a/src/world/area_flo/flo_18/flo_18_4_npc.c b/src/world/area_flo/flo_18/flo_18_4_npc.c index 1195f9e5889..b86444fff53 100644 --- a/src/world/area_flo/flo_18/flo_18_4_npc.c +++ b/src/world/area_flo/flo_18/flo_18_4_npc.c @@ -467,22 +467,22 @@ EvtScript N(EVS_BombReaction_Lakitu_03) = { BombTrigger N(Npc_BombTrigger_01) = { .pos = { 5.0f, 0.0f, -10.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(Npc_BombTrigger_02) = { .pos = { -5.0f, 0.0f, -20.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(Npc_BombTrigger_03) = { .pos = { 50.0f, 0.0f, -10.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(Npc_BombTrigger_04) = { .pos = { 105.0f, 0.0f, -10.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupMachineDamageReactions) = { diff --git a/src/world/area_flo/flo_22/flo_22_5_foliage.c b/src/world/area_flo/flo_22/flo_22_5_foliage.c index 5aab6d36941..f0940b2213c 100644 --- a/src/world/area_flo/flo_22/flo_22_5_foliage.c +++ b/src/world/area_flo/flo_22/flo_22_5_foliage.c @@ -10,7 +10,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 93.0f, 0.0f, -89.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o52, MODEL_o53, MODEL_o55); @@ -21,7 +21,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 150.0f, 0.0f, 135.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_flo/flo_24/flo_24_3_foliage.c b/src/world/area_flo/flo_24/flo_24_3_foliage.c index 0bd9750165f..30d443f8f8e 100644 --- a/src/world/area_flo/flo_24/flo_24_3_foliage.c +++ b/src/world/area_flo/flo_24/flo_24_3_foliage.c @@ -31,7 +31,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 1.0f, 0.0f, -192.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_flo/flo_25/flo_25_5_foliage.c b/src/world/area_flo/flo_25/flo_25_5_foliage.c index 1652b4eb30b..8be6466c87a 100644 --- a/src/world/area_flo/flo_25/flo_25_5_foliage.c +++ b/src/world/area_flo/flo_25/flo_25_5_foliage.c @@ -31,7 +31,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -388.0f, 0.0f, -92.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_hos/hos_03/hos_03_5_foliage.c b/src/world/area_hos/hos_03/hos_03_5_foliage.c index 06178d116e3..3d9787787a3 100644 --- a/src/world/area_hos/hos_03/hos_03_5_foliage.c +++ b/src/world/area_hos/hos_03/hos_03_5_foliage.c @@ -124,7 +124,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -629.0f, 35.0f, 296.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o43, MODEL_o44, MODEL_o45); @@ -146,7 +146,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { -488.0f, 35.0f, 324.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_hos/hos_05/hos_05_3_misc.c b/src/world/area_hos/hos_05/hos_05_3_misc.c index cd4e42cc430..56233a3311a 100644 --- a/src/world/area_hos/hos_05/hos_05_3_misc.c +++ b/src/world/area_hos/hos_05/hos_05_3_misc.c @@ -35,10 +35,10 @@ API_CALLABLE(N(func_80240690_A2A8D0)) { angle = (script->varTable[1] * 180.0f) / PI; magnitude = (rand_int(10) / vt2) + 3.0f; - script->varTable[10] = Float_TO_FIXED(magnitude * cos_rad(angle)); - script->varTable[11] = Float_TO_FIXED(rand_int(15) + 5); - script->varTable[12] = Float_TO_FIXED(magnitude * sin_rad(angle)); - script->varTable[13] = Float_TO_FIXED((f32)(rand_int(10) + 10) * -0.05); + script->varTable[10] = FLOAT_TO_FIXED(magnitude * cos_rad(angle)); + script->varTable[11] = FLOAT_TO_FIXED(rand_int(15) + 5); + script->varTable[12] = FLOAT_TO_FIXED(magnitude * sin_rad(angle)); + script->varTable[13] = FLOAT_TO_FIXED((f32)(rand_int(10) + 10) * -0.05); return ApiStatus_DONE2; } diff --git a/src/world/area_hos/hos_06/hos_06_5_merluvlee.c b/src/world/area_hos/hos_06/hos_06_5_merluvlee.c index bf55c016868..50481a57988 100644 --- a/src/world/area_hos/hos_06/hos_06_5_merluvlee.c +++ b/src/world/area_hos/hos_06/hos_06_5_merluvlee.c @@ -34,7 +34,7 @@ BadgeHint N(BadgeHintData)[] = { { MSG_MerluvleeHint_PowerBounce, ITEM_POWER_BOUNCE, STORY_CH1_SPOTTED_BY_KOOPA_BROS }, { MSG_MerluvleeHint_DizzyStomp, ITEM_DIZZY_STOMP, STORY_CH5_ENTERED_MT_LAVA_LAVA }, { MSG_MerluvleeHint_MegaJump, ITEM_MEGA_JUMP, STORY_CH7_MAYOR_MURDER_MYSTERY }, - { MSG_MerluvleeHint_PowerSmash, ITEM_POWER_SMASH1, STORY_CH2_GOT_SUPER_HAMMER }, + { MSG_MerluvleeHint_PowerSmash, ITEM_POWER_SMASH, STORY_CH2_GOT_SUPER_HAMMER }, { MSG_MerluvleeHint_SmashCharge, ITEM_SMASH_CHARGE, STORY_CH1_SPOTTED_BY_KOOPA_BROS }, { MSG_MerluvleeHint_SuperSmashCharge, ITEM_S_SMASH_CHG, STORY_CH5_RETURNED_TO_TOAD_TOWN }, { MSG_MerluvleeHint_SpinSmash, ITEM_SPIN_SMASH, STORY_CH3_STAR_SPRIT_DEPARTED }, @@ -48,9 +48,9 @@ BadgeHint N(BadgeHintData)[] = { { MSG_MerluvleeHint_QuickChange, ITEM_QUICK_CHANGE, STORY_CH3_GOT_SUPER_BOOTS }, { MSG_MerluvleeHint_Refund, ITEM_REFUND, STORY_CH1_SPOTTED_BY_KOOPA_BROS }, { MSG_MerluvleeHint_TripleDip, ITEM_TRIPLE_DIP, STORY_CH7_RAISED_FROZEN_STAIRS }, - { MSG_MerluvleeHint_DeepFocus1, ITEM_DEEP_FOCUS1, STORY_CH2_STAR_SPRIT_DEPARTED }, - { MSG_MerluvleeHint_DeepFocus2, ITEM_DEEP_FOCUS2, STORY_CH4_FOUND_HIDDEN_DOOR }, - { MSG_MerluvleeHint_DeepFocus3, ITEM_DEEP_FOCUS3, STORY_CH8_REACHED_BOWSERS_CASTLE }, + { MSG_MerluvleeHint_DeepFocus1, ITEM_DEEP_FOCUS_A, STORY_CH2_STAR_SPRIT_DEPARTED }, + { MSG_MerluvleeHint_DeepFocus2, ITEM_DEEP_FOCUS_B, STORY_CH4_FOUND_HIDDEN_DOOR }, + { MSG_MerluvleeHint_DeepFocus3, ITEM_DEEP_FOCUS_C, STORY_CH8_REACHED_BOWSERS_CASTLE }, { MSG_MerluvleeHint_HPPlus1, ITEM_HP_PLUS_A, STORY_CH3_INVITED_TO_BOOS_MANSION }, { MSG_MerluvleeHint_HPPlus2, ITEM_HP_PLUS_B, STORY_REQ_ANY_TIME }, { MSG_MerluvleeHint_FPPlus1, ITEM_FP_PLUS_A, STORY_CH3_INVITED_TO_BOOS_MANSION }, diff --git a/src/world/area_hos/hos_06/hos_06_6_chest.c b/src/world/area_hos/hos_06/hos_06_6_chest.c index 6ce3311b369..9af1627faa9 100644 --- a/src/world/area_hos/hos_06/hos_06_6_chest.c +++ b/src/world/area_hos/hos_06/hos_06_6_chest.c @@ -32,7 +32,7 @@ EvtScript N(EVS_Chest_ShowGotItem) = { s32 N(ChestItems)[] = { ITEM_POWER_RUSH, ITEM_SHOOTING_STAR, - ITEM_DEEP_FOCUS1, + ITEM_DEEP_FOCUS_A, ITEM_LAST_STAND, ITEM_JAMMIN_JELLY, }; @@ -188,7 +188,7 @@ EvtScript N(EVS_Interact_MagicChest_Mario) = { CaseEq(0) Call(ShowMessageAtScreenPos, MSG_Menus_00D4, 160, 40) CaseOrEq(ITEM_POWER_RUSH) - CaseOrEq(ITEM_DEEP_FOCUS1) + CaseOrEq(ITEM_DEEP_FOCUS_A) CaseOrEq(ITEM_LAST_STAND) SetGroup(EVT_GROUP_00) Call(SetTimeFreezeMode, TIME_FREEZE_FULL) diff --git a/src/world/area_isk/isk_04/isk_04_3_obstructions.c b/src/world/area_isk/isk_04/isk_04_3_obstructions.c index 135532f03b3..5024cbaa5d8 100644 --- a/src/world/area_isk/isk_04/isk_04_3_obstructions.c +++ b/src/world/area_isk/isk_04/isk_04_3_obstructions.c @@ -10,7 +10,7 @@ s32 N(ItemList_RuinsKey)[] = { BombTrigger N(BombPos_Wall) = { .pos = { 510.0f, 25.0f, -184.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_OnBlast_Wall) = { diff --git a/src/world/area_isk/isk_05/isk_05_2_entity.c b/src/world/area_isk/isk_05/isk_05_2_entity.c index 1747c96e9b6..0bf7f2153f5 100644 --- a/src/world/area_isk/isk_05/isk_05_2_entity.c +++ b/src/world/area_isk/isk_05/isk_05_2_entity.c @@ -11,7 +11,7 @@ EvtScript N(D_80242210_97FCE0) = { EvtScript N(EVS_MakeEntities) = { Call(MakeItemEntity, ITEM_PYRAMID_STONE, 316, 82, -481, ITEM_SPAWN_MODE_KEY, GF_ISK05_Item_PyramidStone) IfEq(GF_ISK05_Hammer2Block, FALSE) - Call(MakeEntity, Ref(Entity_Hammer2Block_WideX), 431, 0, -478, 45, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Hammer2BlockWideX), 431, 0, -478, 45, MAKE_ENTITY_END) Call(AssignScript, Ref(N(D_80242210_97FCE0))) EndIf PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 415, 196, -290, Float(0.3), LVar0) diff --git a/src/world/area_isk/isk_07/isk_07_2_entity.c b/src/world/area_isk/isk_07/isk_07_2_entity.c index 01e5b8b1190..27e4e3fe7cb 100644 --- a/src/world/area_isk/isk_07/isk_07_2_entity.c +++ b/src/world/area_isk/isk_07/isk_07_2_entity.c @@ -20,7 +20,7 @@ EvtScript N(EVS_MakeEntities) = { Set(MV_LockEntityID, LVar0) EndIf IfEq(GF_ISK07_Hammer2Block, FALSE) - Call(MakeEntity, Ref(Entity_Hammer2Block_WideX), 470, -250, 270, 150, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Hammer2BlockWideX), 470, -250, 270, 150, MAKE_ENTITY_END) Call(AssignScript, Ref(N(EVS_SmashBlock_Stone))) EndIf IfEq(GF_ISK07_OpenedSarcophagi, FALSE) diff --git a/src/world/area_isk/isk_08/isk_08_3_entity.c b/src/world/area_isk/isk_08/isk_08_3_entity.c index 6c7db83d955..59b8847261d 100644 --- a/src/world/area_isk/isk_08/isk_08_3_entity.c +++ b/src/world/area_isk/isk_08/isk_08_3_entity.c @@ -12,7 +12,7 @@ EvtScript N(EVS_SetupFlames) = { BombTrigger N(BombPos_Wall) = { .pos = { -569.0f, -520.0f, 207.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_OnBlast_Wall) = { diff --git a/src/world/area_isk/isk_10/isk_10_3_bombable.c b/src/world/area_isk/isk_10/isk_10_3_bombable.c index 3c97cdbe6da..c2f44d97848 100644 --- a/src/world/area_isk/isk_10/isk_10_3_bombable.c +++ b/src/world/area_isk/isk_10/isk_10_3_bombable.c @@ -3,12 +3,12 @@ BombTrigger N(BombPos_UpperWall) = { .pos = { -593.0f, -520.0f, 104.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(BombPos_LowerWall) = { .pos = { -569.0f, -780.0f, -99.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_OnBlast_UpperWall) = { diff --git a/src/world/area_isk/isk_13/isk_13_2_entity.c b/src/world/area_isk/isk_13/isk_13_2_entity.c index 5faea5afe7f..82466b32937 100644 --- a/src/world/area_isk/isk_13/isk_13_2_entity.c +++ b/src/world/area_isk/isk_13/isk_13_2_entity.c @@ -11,7 +11,7 @@ EvtScript N(EVS_OnSmash_Block) = { EvtScript N(EVS_MakeEntities) = { Call(MakeItemEntity, ITEM_LUNAR_STONE, 460, -568, -342, ITEM_SPAWN_MODE_KEY, GF_ISK13_Item_LunarStone) IfEq(GF_ISK13_Hammer2Block, FALSE) - Call(MakeEntity, Ref(Entity_Hammer2Block_WideX), 568, -650, -302, 25, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Hammer2BlockWideX), 568, -650, -302, 25, MAKE_ENTITY_END) Call(AssignScript, Ref(N(EVS_OnSmash_Block))) EndIf PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 415, -453, -291, Float(0.3), LVar0) diff --git a/src/world/area_isk/isk_14/isk_14_2_entity.c b/src/world/area_isk/isk_14/isk_14_2_entity.c index db6c9ff4652..4b55bd7b8de 100644 --- a/src/world/area_isk/isk_14/isk_14_2_entity.c +++ b/src/world/area_isk/isk_14/isk_14_2_entity.c @@ -12,7 +12,7 @@ EvtScript N(EVS_OnSmash_Block) = { EvtScript N(EVS_MakeEntities) = { Call(MakeItemEntity, ITEM_DIAMOND_STONE, -389, -698, -424, ITEM_SPAWN_MODE_KEY, GF_ISK14_Item_DiamondStone) IfEq(GF_ISK14_Hammer2Block, FALSE) - Call(MakeEntity, Ref(Entity_Hammer2Block_WideX), -507, -780, -396, 143, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Hammer2BlockWideX), -507, -780, -396, 143, MAKE_ENTITY_END) Call(AssignScript, Ref(N(EVS_OnSmash_Block))) EndIf PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -459, -583, -214, Float(0.3), LVar0) diff --git a/src/world/area_iwa/iwa_00/iwa_00_2_entity.c b/src/world/area_iwa/iwa_00/iwa_00_2_entity.c index 42fc013fc08..e2b52795abb 100644 --- a/src/world/area_iwa/iwa_00/iwa_00_2_entity.c +++ b/src/world/area_iwa/iwa_00/iwa_00_2_entity.c @@ -9,7 +9,7 @@ EvtScript N(EVS_OnSmashBlock) = { EvtScript N(EVS_MakeEntities) = { IfEq(GF_IWA01_Hammer1Block, FALSE) - Call(MakeEntity, Ref(Entity_Hammer1Block_WideZ), 900, -30, 220, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Hammer1BlockWideZ), 900, -30, 220, 0, MAKE_ENTITY_END) Call(AssignScript, Ref(N(EVS_OnSmashBlock))) EndIf Call(MakeItemEntity, ITEM_COIN, 405, 25, 25, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA00_Item_CoinA) diff --git a/src/world/area_iwa/iwa_10/iwa_10_5_entity.c b/src/world/area_iwa/iwa_10/iwa_10_5_entity.c index 37d7b863571..6e8babd9cc9 100644 --- a/src/world/area_iwa/iwa_10/iwa_10_5_entity.c +++ b/src/world/area_iwa/iwa_10/iwa_10_5_entity.c @@ -13,7 +13,7 @@ EvtScript N(EVS_OnSmashBlock) = { EvtScript N(EVS_MakeEntities) = { IfEq(GF_IWA10_Hammer1Block, FALSE) - Call(MakeEntity, Ref(Entity_Hammer2Block_WideZ), -1040, 160, -425, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Hammer2BlockWideZ), -1040, 160, -425, 0, MAKE_ENTITY_END) Call(AssignScript, Ref(N(EVS_OnSmashBlock))) EndIf EVT_MAKE_SUPER_BLOCK(-1350, 220, -210, 0) diff --git a/src/world/area_jan/jan_00/jan_00_5_foliage.c b/src/world/area_jan/jan_00/jan_00_5_foliage.c index 206e28114ce..accb7d447c6 100644 --- a/src/world/area_jan/jan_00/jan_00_5_foliage.c +++ b/src/world/area_jan/jan_00/jan_00_5_foliage.c @@ -26,7 +26,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(D_80247A1C_B27F5C) = { .pos = { 481.0f, 0.0f, -165.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_80247A2C) = { diff --git a/src/world/area_jan/jan_01/jan_01_5_foliage.c b/src/world/area_jan/jan_01/jan_01_5_foliage.c index e7978909b91..e7e576775dd 100644 --- a/src/world/area_jan/jan_01/jan_01_5_foliage.c +++ b/src/world/area_jan/jan_01/jan_01_5_foliage.c @@ -12,7 +12,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 160.0f, 0.0f, -287.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o85, MODEL_o86); @@ -38,7 +38,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { -628.0f, 0.0f, -95.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o79, MODEL_o80); @@ -64,7 +64,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { -391.0f, 0.0f, -135.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree4_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o82, MODEL_o83); @@ -90,7 +90,7 @@ ShakeTreeConfig N(ShakeTree_Tree4) = { BombTrigger N(BombPos_Tree4) = { .pos = { -341.0f, 0.0f, -115.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree5_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o88, MODEL_o89); @@ -116,7 +116,7 @@ ShakeTreeConfig N(ShakeTree_Tree5) = { BombTrigger N(BombPos_Tree5) = { .pos = { 68.0f, 0.0f, -155.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree6_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o104, MODEL_o105); @@ -142,7 +142,7 @@ ShakeTreeConfig N(ShakeTree_Tree6) = { BombTrigger N(BombPos_Tree6) = { .pos = { 251.0f, 0.0f, -135.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree7_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o113, MODEL_o114); @@ -187,7 +187,7 @@ ShakeTreeConfig N(ShakeTree_Tree7B) = { BombTrigger N(BombPos_Tree7) = { .pos = { 431.0f, 0.0f, -155.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_jan/jan_02/jan_02_5_foliage.c b/src/world/area_jan/jan_02/jan_02_5_foliage.c index b89d298b0d3..50ec2650161 100644 --- a/src/world/area_jan/jan_02/jan_02_5_foliage.c +++ b/src/world/area_jan/jan_02/jan_02_5_foliage.c @@ -12,7 +12,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -220.0f, 15.0f, 292.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o260, MODEL_o261); @@ -38,7 +38,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { -586.0f, 0.0f, -215.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o281, MODEL_o282); @@ -65,7 +65,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { 581.0f, 0.0f, -240.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree4_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o257); @@ -78,7 +78,7 @@ ShakeTreeConfig N(ShakeTree_Tree4) = { BombTrigger N(BombPos_Tree4) = { .pos = { -636.0f, 0.0f, -235.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_jan/jan_03/jan_03_4_npc.c b/src/world/area_jan/jan_03/jan_03_4_npc.c index 4503b738c82..ea3c19fe45a 100644 --- a/src/world/area_jan/jan_03/jan_03_4_npc.c +++ b/src/world/area_jan/jan_03/jan_03_4_npc.c @@ -86,7 +86,7 @@ s32 N(FoodItemList)[] = { ITEM_BLAND_MEAL, ITEM_HONEY_SHROOM, ITEM_MAPLE_SHROOM, - ITEM_JELLY_SHROOM1, + ITEM_JELLY_SHROOM, ITEM_SHROOM_CAKE, ITEM_SHROOM_STEAK, ITEM_HONEY_SUPER, diff --git a/src/world/area_jan/jan_03/jan_03_7_foliage.c b/src/world/area_jan/jan_03/jan_03_7_foliage.c index d0f4e544eda..912d8f5aaf2 100644 --- a/src/world/area_jan/jan_03/jan_03_7_foliage.c +++ b/src/world/area_jan/jan_03/jan_03_7_foliage.c @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 576.0f, 0.0f, -135.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_jan/jan_04/jan_04_4_npc.c b/src/world/area_jan/jan_04/jan_04_4_npc.c index abf5501486d..e32d0c0310f 100644 --- a/src/world/area_jan/jan_04/jan_04_4_npc.c +++ b/src/world/area_jan/jan_04/jan_04_4_npc.c @@ -124,7 +124,7 @@ EvtScript N(EVS_Sushie_ShoutAtChildren) = { BombTrigger N(BombPos_SushieTree) = { .pos = { 30.0f, 0.0f, -110.0f }, - .radius = 0.0f + .diameter = 0.0f }; #include "world/common/util/ChangeNpcToPartner.inc.c" diff --git a/src/world/area_jan/jan_04/jan_04_6_trees.c b/src/world/area_jan/jan_04/jan_04_6_trees.c index 811b557afc6..69cd4c5f456 100644 --- a/src/world/area_jan/jan_04/jan_04_6_trees.c +++ b/src/world/area_jan/jan_04/jan_04_6_trees.c @@ -23,7 +23,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -447.0f, 0.0f, -145.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o101, MODEL_o102, MODEL_o103, MODEL_o104, MODEL_o105); @@ -59,7 +59,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 367.0f, 0.0f, -260.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o63, MODEL_o64, MODEL_o65, MODEL_o66, MODEL_o67); @@ -81,7 +81,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { 30.0f, 0.0f, -110.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupTrees) = { diff --git a/src/world/area_jan/jan_05/jan_05_5_npc.c b/src/world/area_jan/jan_05/jan_05_5_npc.c index 908d6f6ffb4..6b964a05ba1 100644 --- a/src/world/area_jan/jan_05/jan_05_5_npc.c +++ b/src/world/area_jan/jan_05/jan_05_5_npc.c @@ -283,7 +283,11 @@ NpcData N(NpcData_SpearGuy)[] = { } }, .flags = ENEMY_FLAG_IGNORE_ENTITY_COLLISION | ENEMY_FLAG_FLYING, - SPEAR_GUY_WANDER_NPC_DATA + .settings = &N(NpcSettings_SpearGuy_Wander), + .drops = SPEAR_GUY_DROPS, + .animations = SPEAR_GUY_ANIMS, + .extraAnimations = N(ExtraAnims_SpearGuy), + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, }, SPEAR_GUY_HITBOX(NPC_SpearGuy_Hitbox) }; @@ -303,7 +307,12 @@ NpcData N(NpcData_HurtPlant) = { .id = NPC_HurtPlant, .pos = { 375.0f, 0.0f, 260.0f }, .yaw = 270, - HURT_PLANT_NPC_DATA + .settings = &N(NpcSettings_HurtPlant), + .flags = HURT_PLANT_FLAGS, + .drops = HURT_PLANT_DROPS, + .animations = HURT_PLANT_ANIMS, + .extraAnimations = N(ExtraAnims_HurtPlant), + .tattle = MSG_NpcTattle_HeartPlant, }; NpcData N(NpcData_MBush) = { diff --git a/src/world/area_jan/jan_05/jan_05_6_trees.c b/src/world/area_jan/jan_05/jan_05_6_trees.c index f91e6e66d1f..b6df55e3c5e 100644 --- a/src/world/area_jan/jan_05/jan_05_6_trees.c +++ b/src/world/area_jan/jan_05/jan_05_6_trees.c @@ -43,7 +43,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 127.0f, 0.0f, -420.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o89, MODEL_o90, MODEL_o91, MODEL_o92, MODEL_o93); @@ -78,7 +78,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 442.0f, 0.0f, -165.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o83, MODEL_o84, MODEL_o85, MODEL_o86, MODEL_o87); @@ -100,7 +100,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { -270.0f, 0.0f, -310.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupTrees) = { diff --git a/src/world/area_jan/jan_06/jan_06_4_trees.c b/src/world/area_jan/jan_06/jan_06_4_trees.c index a85ef094ad5..81f274e7b8e 100644 --- a/src/world/area_jan/jan_06/jan_06_4_trees.c +++ b/src/world/area_jan/jan_06/jan_06_4_trees.c @@ -37,7 +37,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -285.0f, 0.0f, -360.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_g36); @@ -59,7 +59,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 452.0f, 0.0f, -135.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupTrees) = { diff --git a/src/world/area_jan/jan_07/jan_07_4_trees.c b/src/world/area_jan/jan_07/jan_07_4_trees.c index 5875ed3b0e5..6668bc685d6 100644 --- a/src/world/area_jan/jan_07/jan_07_4_trees.c +++ b/src/world/area_jan/jan_07/jan_07_4_trees.c @@ -36,7 +36,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -192.0f, 0.0f, -105.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupTrees) = { diff --git a/src/world/area_jan/jan_08/jan_08_5_npc.c b/src/world/area_jan/jan_08/jan_08_5_npc.c index 90bdda186e6..9336effb301 100644 --- a/src/world/area_jan/jan_08/jan_08_5_npc.c +++ b/src/world/area_jan/jan_08/jan_08_5_npc.c @@ -159,7 +159,11 @@ NpcData N(NpcData_SpearGuy)[] = { } }, .flags = ENEMY_FLAG_IGNORE_ENTITY_COLLISION, - SPEAR_GUY_WANDER_NPC_DATA + .settings = &N(NpcSettings_SpearGuy_Wander), + .drops = SPEAR_GUY_DROPS, + .animations = SPEAR_GUY_ANIMS, + .extraAnimations = N(ExtraAnims_SpearGuy), + .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, }, SPEAR_GUY_HITBOX(NPC_SpearGuy_Hitbox) }; @@ -168,14 +172,23 @@ NpcData N(NpcData_HurtPlant) = { .id = NPC_HurtPlant, .pos = { 400.0f, 0.0f, 235.0f }, .yaw = 270, - HURT_PLANT_NPC_DATA + .settings = &N(NpcSettings_HurtPlant), + .flags = HURT_PLANT_FLAGS, + .drops = HURT_PLANT_DROPS, + .animations = HURT_PLANT_ANIMS, + .extraAnimations = N(ExtraAnims_HurtPlant), + .tattle = MSG_NpcTattle_HeartPlant, }; NpcData N(NpcData_MBush_01) = { .id = NPC_MBush_01, .pos = { -407.0f, 0.0f, -42.0f }, .yaw = 90, - MBUSH_NPC_DATA + .settings = &N(NpcSettings_MBush), + .flags = MBUSH_FLAGS, + .drops = MBUSH_DROPS, + .animations = MBUSH_ANIMS, + .tattle = MSG_NpcTattle_MBush, .init = &N(EVS_NpcInit_MBush_01), }; @@ -183,21 +196,33 @@ NpcData N(NpcData_MBush_02) = { .id = NPC_MBush_02, .pos = { -120.0f, 0.0f, -395.0f }, .yaw = 90, - MBUSH_NPC_DATA + .settings = &N(NpcSettings_MBush), + .flags = MBUSH_FLAGS, + .drops = MBUSH_DROPS, + .animations = MBUSH_ANIMS, + .tattle = MSG_NpcTattle_MBush, }; NpcData N(NpcData_HeartPlant_01) = { .id = NPC_HeartPlant_01, .pos = { -219.0f, 0.0f, 420.0f }, .yaw = 270, - HEART_PLANT_NPC_DATA + .settings = &N(NpcSettings_HeartPlant), + .flags = HEART_PLANT_FLAGS, + .drops = NO_DROPS, + .animations = HEART_PLANT_ANIMS, + .tattle = MSG_NpcTattle_HeartPlant, }; NpcData N(NpcData_HeartPlant_02) = { .id = NPC_HeartPlant_02, .pos = { -157.0f, 0.0f, 452.0f }, .yaw = 270, - HEART_PLANT_NPC_DATA + .settings = &N(NpcSettings_HeartPlant), + .flags = HEART_PLANT_FLAGS, + .drops = NO_DROPS, + .animations = HEART_PLANT_ANIMS, + .tattle = MSG_NpcTattle_HeartPlant, }; NpcData N(NpcData_YoshiKid) = { diff --git a/src/world/area_jan/jan_08/jan_08_6_trees.c b/src/world/area_jan/jan_08/jan_08_6_trees.c index 490865a4114..3b2ab2f378a 100644 --- a/src/world/area_jan/jan_08/jan_08_6_trees.c +++ b/src/world/area_jan/jan_08/jan_08_6_trees.c @@ -23,7 +23,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -357.0f, 0.0f, -270.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o138, MODEL_o139, MODEL_o140, MODEL_o141, MODEL_o142); @@ -58,7 +58,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { -145.0f, 0.0f, -460.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o150, MODEL_o151, MODEL_o152, MODEL_o153, MODEL_o154); @@ -93,7 +93,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { 341.0f, 0.0f, -124.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupTrees) = { diff --git a/src/world/area_jan/jan_09/jan_09_3_npc.c b/src/world/area_jan/jan_09/jan_09_3_npc.c index 368c845b8ef..4f9069c610b 100644 --- a/src/world/area_jan/jan_09/jan_09_3_npc.c +++ b/src/world/area_jan/jan_09/jan_09_3_npc.c @@ -33,14 +33,22 @@ NpcData N(NpcData_MBush_01) = { .id = NPC_MBush_01, .pos = { 335.0f, 0.0f, -40.0f }, .yaw = 90, - MBUSH_NPC_DATA + .settings = &N(NpcSettings_MBush), + .flags = MBUSH_FLAGS, + .drops = MBUSH_DROPS, + .animations = MBUSH_ANIMS, + .tattle = MSG_NpcTattle_MBush, }; NpcData N(NpcData_MBush_02) = { .id = NPC_MBush_02, .pos = { 415.0f, 0.0f, -65.0f }, .yaw = 90, - MBUSH_NPC_DATA + .settings = &N(NpcSettings_MBush), + .flags = MBUSH_FLAGS, + .drops = MBUSH_DROPS, + .animations = MBUSH_ANIMS, + .tattle = MSG_NpcTattle_MBush, }; NpcGroupList N(DefaultNPCs) = { diff --git a/src/world/area_jan/jan_09/jan_09_4_trees.c b/src/world/area_jan/jan_09/jan_09_4_trees.c index 0bc64ff1dfc..14d798bd092 100644 --- a/src/world/area_jan/jan_09/jan_09_4_trees.c +++ b/src/world/area_jan/jan_09/jan_09_4_trees.c @@ -23,7 +23,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -421.0f, 0.0f, -234.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o136, MODEL_o137, MODEL_o138, MODEL_o139, MODEL_o140); @@ -58,7 +58,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 14.0f, 90.0f, -459.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o130, MODEL_o131, MODEL_o132, MODEL_o133, MODEL_o134); @@ -93,7 +93,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { 455.0f, 0.0f, -150.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupTrees) = { diff --git a/src/world/area_jan/jan_10/jan_10_5_trees.c b/src/world/area_jan/jan_10/jan_10_5_trees.c index 979c96edb33..51cf544d872 100644 --- a/src/world/area_jan/jan_10/jan_10_5_trees.c +++ b/src/world/area_jan/jan_10/jan_10_5_trees.c @@ -43,7 +43,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -557.0f, 0.0f, 29.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupTrees) = { diff --git a/src/world/area_jan/jan_12/jan_12_3_trees.c b/src/world/area_jan/jan_12/jan_12_3_trees.c index 650d422c269..abb344c5704 100644 --- a/src/world/area_jan/jan_12/jan_12_3_trees.c +++ b/src/world/area_jan/jan_12/jan_12_3_trees.c @@ -36,7 +36,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -214.0f, 30.0f, -111.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o65, MODEL_o66, MODEL_o67); @@ -58,7 +58,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 360.0f, 0.0f, -95.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupTrees) = { diff --git a/src/world/area_jan/jan_13/jan_13_2_puzzle.c b/src/world/area_jan/jan_13/jan_13_2_puzzle.c index 509633b1977..a8929613214 100644 --- a/src/world/area_jan/jan_13/jan_13_2_puzzle.c +++ b/src/world/area_jan/jan_13/jan_13_2_puzzle.c @@ -28,8 +28,8 @@ void N(setup_gfx_geyser)(void) { } API_CALLABLE(N(GetRatioFromPercent)) { - script->varTable[2] = Float_TO_FIXED(script->varTable[1] / 100.0f); - script->varTable[3] = Float_TO_FIXED(script->varTable[1] / 100.0f); + script->varTable[2] = FLOAT_TO_FIXED(script->varTable[1] / 100.0f); + script->varTable[3] = FLOAT_TO_FIXED(script->varTable[1] / 100.0f); return ApiStatus_DONE2; } diff --git a/src/world/area_jan/jan_13/jan_13_3_trees.c b/src/world/area_jan/jan_13/jan_13_3_trees.c index bffe7cd59a5..b06c0604397 100644 --- a/src/world/area_jan/jan_13/jan_13_3_trees.c +++ b/src/world/area_jan/jan_13/jan_13_3_trees.c @@ -36,7 +36,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -348.0f, 0.0f, -107.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o50, MODEL_o51, MODEL_o52); @@ -58,7 +58,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 304.0f, 0.0f, -111.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupTrees) = { diff --git a/src/world/area_jan/jan_14/jan_14_3_trees.c b/src/world/area_jan/jan_14/jan_14_3_trees.c index 1cf2885f8f3..c8c88e85663 100644 --- a/src/world/area_jan/jan_14/jan_14_3_trees.c +++ b/src/world/area_jan/jan_14/jan_14_3_trees.c @@ -23,7 +23,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -348.0f, 0.0f, -107.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o65, MODEL_o67); @@ -45,7 +45,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { -194.0f, 0.0f, -11.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o69, MODEL_o70, MODEL_o71); @@ -67,7 +67,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { 14.0f, 0.0f, -91.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree4_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o57, MODEL_o58, MODEL_o59); @@ -89,7 +89,7 @@ ShakeTreeConfig N(ShakeTree_Tree4) = { BombTrigger N(BombPos_Tree4) = { .pos = { 404.0f, 0.0f, -91.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree5_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o73, MODEL_o75); @@ -111,7 +111,7 @@ ShakeTreeConfig N(ShakeTree_Tree5) = { BombTrigger N(BombPos_Tree5) = { .pos = { 511.0f, 0.0f, -7.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupTrees) = { diff --git a/src/world/area_jan/jan_15/jan_15_3_trees.c b/src/world/area_jan/jan_15/jan_15_3_trees.c index c850cae87b8..7f0ad3b5636 100644 --- a/src/world/area_jan/jan_15/jan_15_3_trees.c +++ b/src/world/area_jan/jan_15/jan_15_3_trees.c @@ -23,7 +23,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -94.0f, 0.0f, -102.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o65, MODEL_o66, MODEL_o67); @@ -58,7 +58,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 204.0f, 0.0f, -101.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupTrees) = { diff --git a/src/world/area_jan/jan_22/jan_22_2_main.c b/src/world/area_jan/jan_22/jan_22_2_main.c index a1a1b72e81c..4a22bef9bef 100644 --- a/src/world/area_jan/jan_22/jan_22_2_main.c +++ b/src/world/area_jan/jan_22/jan_22_2_main.c @@ -76,7 +76,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o70, .pos = { 750.0, 0.0, 50.0 }}, { .colliderID = COLLIDER_o119, .pos = { 960.0, 0.0, 50.0 }}, { .colliderID = COLLIDER_o276, .pos = { 960.0, 0.0, 50.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(D_8024202C_B861AC) = { diff --git a/src/world/area_jan/jan_22/jan_22_7_trees.c b/src/world/area_jan/jan_22/jan_22_7_trees.c index 169ceaebdf2..f5863a8d909 100644 --- a/src/world/area_jan/jan_22/jan_22_7_trees.c +++ b/src/world/area_jan/jan_22/jan_22_7_trees.c @@ -30,7 +30,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -385.0f, 0.0f, -39.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o93); @@ -43,7 +43,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { -328.0f, 0.0f, -123.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupTrees) = { diff --git a/src/world/area_kgr/kgr_01/kgr_01_2_wiggle.c b/src/world/area_kgr/kgr_01/kgr_01_2_wiggle.c index 89869df9958..08c0bb61798 100644 --- a/src/world/area_kgr/kgr_01/kgr_01_2_wiggle.c +++ b/src/world/area_kgr/kgr_01/kgr_01_2_wiggle.c @@ -85,7 +85,7 @@ API_CALLABLE(N(GetEffectiveTongueOffset)) { percent = 100.0f; } amplitude = (amplitude * percent) / 100.0f; - script->varTable[0] = Float_TO_FIXED(amplitude); + script->varTable[0] = FLOAT_TO_FIXED(amplitude); return ApiStatus_DONE2; } diff --git a/src/world/area_kkj/kkj_10/kkj_10_2_entity.c b/src/world/area_kkj/kkj_10/kkj_10_2_entity.c index c7f4c4c399e..cb0f9c3997f 100644 --- a/src/world/area_kkj/kkj_10/kkj_10_2_entity.c +++ b/src/world/area_kkj/kkj_10/kkj_10_2_entity.c @@ -4,7 +4,7 @@ #include "world/common/todo/RemovePadlock.inc.c" s32 N(PeachKeyList)[] = { - ITEM_PEACH_KEY1, + ITEM_PEACH_KEY, ITEM_NONE }; diff --git a/src/world/area_kkj/kkj_11/kkj_11_2_entity.c b/src/world/area_kkj/kkj_11/kkj_11_2_entity.c index 8acd131415b..27033825e6c 100644 --- a/src/world/area_kkj/kkj_11/kkj_11_2_entity.c +++ b/src/world/area_kkj/kkj_11/kkj_11_2_entity.c @@ -2,7 +2,7 @@ #include "entity.h" s32 N(PeachKeyList)[] = { - ITEM_PEACH_KEY1, + ITEM_PEACH_KEY, ITEM_NONE }; diff --git a/src/world/area_kkj/kkj_12/kkj_12_2_npc.c b/src/world/area_kkj/kkj_12/kkj_12_2_npc.c index cc1fe18f190..e85a277aedf 100644 --- a/src/world/area_kkj/kkj_12/kkj_12_2_npc.c +++ b/src/world/area_kkj/kkj_12/kkj_12_2_npc.c @@ -97,7 +97,7 @@ EvtScript N(EVS_NpcInteract_Koopatrol_02) = { Call(AdjustCam, CAM_DEFAULT, Float(5.0 / DT), 0, Float(350.0), Float(15.0), Float(-7.0)) Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0144) Wait(10 * DT) - Set(LVar0, ITEM_PEACH_KEY1) + Set(LVar0, ITEM_PEACH_KEY) Call(ShowGotItem, LVar0, TRUE, 0) Call(AddKeyItem, LVar0) Set(GF_KKJ11_TrickedGuard, TRUE) diff --git a/src/world/area_kkj/kkj_17/kkj_17_2_entity.c b/src/world/area_kkj/kkj_17/kkj_17_2_entity.c index e8f3cfc5fb1..219cb451a4b 100644 --- a/src/world/area_kkj/kkj_17/kkj_17_2_entity.c +++ b/src/world/area_kkj/kkj_17/kkj_17_2_entity.c @@ -9,13 +9,13 @@ EvtScript N(EVS_AutoRemoveDeepFocus) = { Wait(1) EndLoop Wait(10) - Call(RemoveBadge, ITEM_DEEP_FOCUS1) + Call(RemoveBadge, ITEM_DEEP_FOCUS_A) Return End }; EvtScript N(EVS_MakeEntities) = { - Call(MakeItemEntity, ITEM_DEEP_FOCUS1, 100, 0, -30, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KKJ17_Item_DeepFocus) + Call(MakeItemEntity, ITEM_DEEP_FOCUS_A, 100, 0, -30, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KKJ17_Item_DeepFocus) IfLt(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) IfEq(GF_KKJ17_Item_DeepFocus, FALSE) Exec(N(EVS_AutoRemoveDeepFocus)) diff --git a/src/world/area_kkj/kkj_17/kkj_17_3_chest.c b/src/world/area_kkj/kkj_17/kkj_17_3_chest.c index 9cb7bd01b34..bf8f9ae7c9f 100644 --- a/src/world/area_kkj/kkj_17/kkj_17_3_chest.c +++ b/src/world/area_kkj/kkj_17/kkj_17_3_chest.c @@ -31,7 +31,7 @@ EvtScript N(EVS_Chest_ShowGotItem) = { s32 N(ChestItems)[] = { ITEM_POWER_RUSH, ITEM_SHOOTING_STAR, - ITEM_DEEP_FOCUS1, + ITEM_DEEP_FOCUS_A, ITEM_LAST_STAND, ITEM_JAMMIN_JELLY, }; diff --git a/src/world/area_kkj/kkj_18/kkj_18_4_gourmet.c b/src/world/area_kkj/kkj_18/kkj_18_4_gourmet.c index e31b951724d..0795d04c497 100644 --- a/src/world/area_kkj/kkj_18/kkj_18_4_gourmet.c +++ b/src/world/area_kkj/kkj_18/kkj_18_4_gourmet.c @@ -447,7 +447,7 @@ EvtScript N(EVS_Scene_GiveKitchenKey) = { Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_009F) Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Inspect) Wait(30 * DT) - Set(LVar0, ITEM_PEACH_KEY1) + Set(LVar0, ITEM_PEACH_KEY) Call(ShowGotItem, LVar0, TRUE, 0) Call(AddKeyItem, LVar0) Set(GF_KKJ18_GourmetGuy_GaveKey, TRUE) diff --git a/src/world/area_kmr/kmr_02/kmr_02_5_entity.c b/src/world/area_kmr/kmr_02/kmr_02_5_entity.c index bc75a86b582..fc48c95ed83 100644 --- a/src/world/area_kmr/kmr_02/kmr_02_5_entity.c +++ b/src/world/area_kmr/kmr_02/kmr_02_5_entity.c @@ -124,7 +124,7 @@ EvtScript N(EVS_MakeEntities) = { Switch(GB_StoryProgress) CaseLt(STORY_CH0_GATE_CRUSHED) CaseLt(STORY_CH0_SMASHED_GATE_BLOCK) - Call(MakeEntity, Ref(Entity_Hammer1Block_WideX), 326, 0, 261, 270, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Hammer1BlockWideX), 326, 0, 261, 270, MAKE_ENTITY_END) Call(AssignScript, Ref(N(EVS_OnSmash_GateBlock))) CaseLt(STORY_CH0_TWINK_GAVE_LUCKY_STAR) Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) diff --git a/src/world/area_kmr/kmr_02/kmr_02_8_foliage.c b/src/world/area_kmr/kmr_02/kmr_02_8_foliage.c index cf97d334d79..a5d1e04b532 100644 --- a/src/world/area_kmr/kmr_02/kmr_02_8_foliage.c +++ b/src/world/area_kmr/kmr_02/kmr_02_8_foliage.c @@ -91,7 +91,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 387.0f, 0.0f, 92.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_kmr/kmr_03/kmr_03_5_foliage.c b/src/world/area_kmr/kmr_03/kmr_03_5_foliage.c index c9b464000cc..35281ebd90e 100644 --- a/src/world/area_kmr/kmr_03/kmr_03_5_foliage.c +++ b/src/world/area_kmr/kmr_03/kmr_03_5_foliage.c @@ -55,7 +55,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -42.0f, 0.0f, -13.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_kmr/kmr_04/kmr_04_5_foliage.c b/src/world/area_kmr/kmr_04/kmr_04_5_foliage.c index 0292630322a..53d7bcef0a7 100644 --- a/src/world/area_kmr/kmr_04/kmr_04_5_foliage.c +++ b/src/world/area_kmr/kmr_04/kmr_04_5_foliage.c @@ -365,7 +365,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -352.0f, 0.0f, 10.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o194); @@ -400,7 +400,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { -92.0f, 0.0f, -295.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_OnShakeTree3) = { @@ -454,7 +454,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { 248.0f, 0.0f, -122.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_kmr/kmr_05/kmr_05_5_foliage.c b/src/world/area_kmr/kmr_05/kmr_05_5_foliage.c index ae00a8c455e..a176fb09e8e 100644 --- a/src/world/area_kmr/kmr_05/kmr_05_5_foliage.c +++ b/src/world/area_kmr/kmr_05/kmr_05_5_foliage.c @@ -61,7 +61,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 488.0f, 245.0f, -196.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_kmr/kmr_10/kmr_10_5_foliage.c b/src/world/area_kmr/kmr_10/kmr_10_5_foliage.c index abf300e4252..4e6a9010c49 100644 --- a/src/world/area_kmr/kmr_10/kmr_10_5_foliage.c +++ b/src/world/area_kmr/kmr_10/kmr_10_5_foliage.c @@ -36,7 +36,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 328.0f, 10.0f, -36.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_kmr/kmr_11/kmr_11_7_foliage.c b/src/world/area_kmr/kmr_11/kmr_11_7_foliage.c index cdb32dea4fd..b56c02f7139 100644 --- a/src/world/area_kmr/kmr_11/kmr_11_7_foliage.c +++ b/src/world/area_kmr/kmr_11/kmr_11_7_foliage.c @@ -77,7 +77,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -665.0f, 0.0f, -149.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o458); @@ -112,7 +112,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 320.0f, 0.0f, -496.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_kmr/kmr_20/kmr_20_4_documents.c b/src/world/area_kmr/kmr_20/kmr_20_4_documents.c index 4299604e424..19e508de070 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_4_documents.c +++ b/src/world/area_kmr/kmr_20/kmr_20_4_documents.c @@ -11,10 +11,10 @@ #define SET_PACKED_FLAG(base, i) \ get_global_byte((i / 8) + EVT_INDEX_OF_GAME_BYTE(base)) | (1 << (i % 8)) -extern HudScript HES_Item_Unused_08B; -extern HudScript HES_Item_Unused_08B_disabled; -extern HudScript HES_Item_Unused_08C; -extern HudScript HES_Item_Unused_08C_disabled; +extern HudScript HES_Item_Postcard; +extern HudScript HES_Item_Postcard_disabled; +extern HudScript HES_Item_EmptyBook; +extern HudScript HES_Item_EmptyBook_disabled; BSS PopupMenu N(ChooseDocumentPopupMenu); BSS IMG_BIN N(LetterBackgroundImg)[0x3D86] ALIGNED(16); @@ -168,7 +168,7 @@ API_CALLABLE(N(ReadLetters)){ } if (cond) { - menu->ptrIcon[numEntries] = &HES_Item_Unused_08B; + menu->ptrIcon[numEntries] = &HES_Item_Postcard; menu->userIndex[numEntries] = i; menu->enabled[numEntries] = TRUE; menu->nameMsg[numEntries] = N(LetterSenderStringIDs)[i]; @@ -178,7 +178,7 @@ API_CALLABLE(N(ReadLetters)){ menu->value[numEntries] = 0; if (temp) { menu->value[numEntries] = 1; - menu->ptrIcon[numEntries] = &HES_Item_Unused_08B_disabled; + menu->ptrIcon[numEntries] = &HES_Item_Postcard_disabled; } numEntries++; } @@ -349,7 +349,7 @@ API_CALLABLE(N(ReadDiary)){ numEntries = 0; for (i = 0; i < ARRAY_COUNT(N(DiaryStoryRequirements)); i++) { if (evt_get_variable(NULL, GB_StoryProgress) >= N(DiaryStoryRequirements)[i]) { - menu->ptrIcon[numEntries] = &HES_Item_Unused_08C; + menu->ptrIcon[numEntries] = &HES_Item_EmptyBook; menu->userIndex[numEntries] = i; menu->enabled[numEntries] = TRUE; menu->nameMsg[numEntries] = 0; @@ -359,7 +359,7 @@ API_CALLABLE(N(ReadDiary)){ menu->value[numEntries] = 0; if (flags) { menu->value[numEntries] = 1; - menu->ptrIcon[numEntries] = &HES_Item_Unused_08C_disabled; + menu->ptrIcon[numEntries] = &HES_Item_EmptyBook_disabled; } numEntries++; } diff --git a/src/world/area_kmr/kmr_20/kmr_20_6_trees.c b/src/world/area_kmr/kmr_20/kmr_20_6_trees.c index 4af0bbf2ffd..ad9ee2d2b01 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_6_trees.c +++ b/src/world/area_kmr/kmr_20/kmr_20_6_trees.c @@ -23,7 +23,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -106.0f, 0.0f, 201.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupTrees) = { diff --git a/src/world/area_kpa/kpa_11/kpa_11_2_main.c b/src/world/area_kpa/kpa_11/kpa_11_2_main.c index 93e727c1cdc..d5c901faf77 100644 --- a/src/world/area_kpa/kpa_11/kpa_11_2_main.c +++ b/src/world/area_kpa/kpa_11/kpa_11_2_main.c @@ -64,7 +64,7 @@ EvtScript N(D_80240F84_A53844) = { LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o1234, .pos = { 1400.0, 30.0, -325.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_kpa/kpa_12/kpa_12_2_main.c b/src/world/area_kpa/kpa_12/kpa_12_2_main.c index 3ffa1124f00..b980b9c263a 100644 --- a/src/world/area_kpa/kpa_12/kpa_12_2_main.c +++ b/src/world/area_kpa/kpa_12/kpa_12_2_main.c @@ -67,7 +67,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o175, .pos = { 700.0, 30.0, -150.0 }}, { .colliderID = COLLIDER_o144, .pos = { 855.0, 30.0, -100.0 }}, { .colliderID = COLLIDER_o305, .pos = { 1445.0, 30.0, -135.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_kpa/kpa_13/kpa_13_2_main.c b/src/world/area_kpa/kpa_13/kpa_13_2_main.c index ab2f25f2298..1bc9f2bd107 100644 --- a/src/world/area_kpa/kpa_13/kpa_13_2_main.c +++ b/src/world/area_kpa/kpa_13/kpa_13_2_main.c @@ -43,7 +43,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o1066, .pos = { 1655.0, 30.0, -175.0 }}, { .colliderID = COLLIDER_o1068, .pos = { 1755.0, 30.0, -175.0 }}, { .colliderID = COLLIDER_o1042, .pos = { 1860.0, 30.0, -120.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_kpa/kpa_133/kpa_133_2_main.c b/src/world/area_kpa/kpa_133/kpa_133_2_main.c index 54298bab27d..47c57d5b89e 100644 --- a/src/world/area_kpa/kpa_133/kpa_133_2_main.c +++ b/src/world/area_kpa/kpa_133/kpa_133_2_main.c @@ -42,7 +42,7 @@ EvtScript N(EVS_EnterMap) = { BombTrigger N(BombPos_Wall) = { .pos = { 388.0f, 240.0f, -25.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_BlastWall) = { diff --git a/src/world/area_kpa/kpa_14/kpa_14_2_main.c b/src/world/area_kpa/kpa_14/kpa_14_2_main.c index d54528986ee..91a821a5726 100644 --- a/src/world/area_kpa/kpa_14/kpa_14_2_main.c +++ b/src/world/area_kpa/kpa_14/kpa_14_2_main.c @@ -100,7 +100,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o198, .pos = { 1400.0, 30.0, -135.0 }}, { .colliderID = COLLIDER_o200, .pos = { 1590.0, 30.0, -90.0 }}, { .colliderID = COLLIDER_o199, .pos = { 1940.0, 30.0, -135.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Touch_LeftOfLavaFall) = { diff --git a/src/world/area_kpa/kpa_16/kpa_16_2_main.c b/src/world/area_kpa/kpa_16/kpa_16_2_main.c index 9c9b8874006..ce60e86c05a 100644 --- a/src/world/area_kpa/kpa_16/kpa_16_2_main.c +++ b/src/world/area_kpa/kpa_16/kpa_16_2_main.c @@ -102,7 +102,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o197, .pos = { 470.0, 30.0, -30.0 }}, { .colliderID = COLLIDER_o202, .pos = { 470.0, 30.0, -30.0 }}, { .colliderID = COLLIDER_o785, .pos = { 500.0, 230.0, -140.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_kpa/kpa_17/kpa_17_3_main.c b/src/world/area_kpa/kpa_17/kpa_17_3_main.c index ef062b5b4db..b39d202a081 100644 --- a/src/world/area_kpa/kpa_17/kpa_17_3_main.c +++ b/src/world/area_kpa/kpa_17/kpa_17_3_main.c @@ -35,7 +35,7 @@ EvtScript N(EVS_EnterMap) = { BombTrigger N(BombPos_Wall) = { .pos = { 1186.0f, 30.0f, -562.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_kpa/kpa_60/kpa_60_2_entity.c b/src/world/area_kpa/kpa_60/kpa_60_2_entity.c index 70646f48348..3e76d21bc11 100644 --- a/src/world/area_kpa/kpa_60/kpa_60_2_entity.c +++ b/src/world/area_kpa/kpa_60/kpa_60_2_entity.c @@ -43,7 +43,7 @@ EvtScript N(EVS_MakeEntities) = { Else BindTrigger(Ref(N(EVS_ExitDoor_kpa_70_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) EndIf - Call(MakeEntity, Ref(Entity_RedBlock), -532, 145, -59, 0, ITEM_DEEP_FOCUS3, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_RedBlock), -532, 145, -59, 0, ITEM_DEEP_FOCUS_C, MAKE_ENTITY_END) Call(AssignBlockFlag, GF_KPA62_BadgeBlock_DeepFocus3) Return End diff --git a/src/world/area_kpa/kpa_60/kpa_60_3_main.c b/src/world/area_kpa/kpa_60/kpa_60_3_main.c index f452844d126..51ab6e75137 100644 --- a/src/world/area_kpa/kpa_60/kpa_60_3_main.c +++ b/src/world/area_kpa/kpa_60/kpa_60_3_main.c @@ -195,7 +195,7 @@ EvtScript N(EVS_TexPan_Lava) = { LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o1559, .pos = { -455.0, -15.0, 35.0 }}, { .colliderID = COLLIDER_o1560, .pos = { -545.0, 10.0, 15.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_kpa/kpa_62/kpa_62_2_entity.c b/src/world/area_kpa/kpa_62/kpa_62_2_entity.c index 84751c0c9b2..13155c7da2a 100644 --- a/src/world/area_kpa/kpa_62/kpa_62_2_entity.c +++ b/src/world/area_kpa/kpa_62/kpa_62_2_entity.c @@ -43,7 +43,7 @@ EvtScript N(EVS_MakeEntities) = { Else BindTrigger(Ref(N(EVS_ExitDoors_kpa_70_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) EndIf - Call(MakeEntity, Ref(Entity_RedBlock), -532, 145, -59, 0, ITEM_DEEP_FOCUS3, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_RedBlock), -532, 145, -59, 0, ITEM_DEEP_FOCUS_C, MAKE_ENTITY_END) Call(AssignBlockFlag, GF_KPA62_BadgeBlock_DeepFocus3) Return End diff --git a/src/world/area_kpa/kpa_62/kpa_62_3_main.c b/src/world/area_kpa/kpa_62/kpa_62_3_main.c index 6b32397ce7c..f19fdd1b224 100644 --- a/src/world/area_kpa/kpa_62/kpa_62_3_main.c +++ b/src/world/area_kpa/kpa_62/kpa_62_3_main.c @@ -198,7 +198,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o1559, .pos = { -455.0, -15.0, 35.0 }}, { .colliderID = COLLIDER_o1560, .pos = { -545.0, 10.0, 15.0 }}, { .colliderID = COLLIDER_o1692, .pos = { -426.0, -35.0, 70.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_kpa/kpa_91/kpa_91_3_npc.c b/src/world/area_kpa/kpa_91/kpa_91_3_npc.c index 610eda52ba6..9f4113aff3f 100644 --- a/src/world/area_kpa/kpa_91/kpa_91_3_npc.c +++ b/src/world/area_kpa/kpa_91/kpa_91_3_npc.c @@ -206,13 +206,13 @@ EvtScript N(EVS_NpcDefeat_Koopatrol) = { CaseEq(OUTCOME_PLAYER_WON) Set(GF_KPA91_Defeated_Guard, TRUE) Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - Call(MakeItemEntity, ITEM_PRISON_KEY1, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA91_Item_PrisonKey1) + Call(MakeItemEntity, ITEM_PRISON_KEY, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA91_Item_PrisonKey1) Call(DoNpcDefeat) CaseEq(OUTCOME_PLAYER_FLED) CaseEq(OUTCOME_ENEMY_FLED) Set(GF_KPA91_Defeated_Guard, TRUE) Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - Call(MakeItemEntity, ITEM_PRISON_KEY1, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA91_Item_PrisonKey1) + Call(MakeItemEntity, ITEM_PRISON_KEY, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA91_Item_PrisonKey1) Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) Call(RemoveNpc, NPC_SELF) EndSwitch diff --git a/src/world/area_kpa/kpa_91/kpa_91_4_entity.c b/src/world/area_kpa/kpa_91/kpa_91_4_entity.c index 2afe3e16726..b7445ddd111 100644 --- a/src/world/area_kpa/kpa_91/kpa_91_4_entity.c +++ b/src/world/area_kpa/kpa_91/kpa_91_4_entity.c @@ -5,7 +5,7 @@ #include "world/common/todo/GetEntityPosition.inc.c" s32 N(KeyList_PrisonCell)[] = { - ITEM_PRISON_KEY1, + ITEM_PRISON_KEY, ITEM_NONE }; @@ -44,7 +44,7 @@ EvtScript N(EVS_MakeEntities) = { BindTrigger(Ref(N(EVS_OpenCellDoor)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) EndIf IfEq(GF_KPA91_Defeated_Guard, TRUE) - Call(MakeItemEntity, ITEM_PRISON_KEY1, 60, 0, 55, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA91_Item_PrisonKey1) + Call(MakeItemEntity, ITEM_PRISON_KEY, 60, 0, 55, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA91_Item_PrisonKey1) EndIf Return End diff --git a/src/world/area_kpa/kpa_95/kpa_95_2_entity.c b/src/world/area_kpa/kpa_95/kpa_95_2_entity.c index 20e16c9ba65..d5dfa2567a0 100644 --- a/src/world/area_kpa/kpa_95/kpa_95_2_entity.c +++ b/src/world/area_kpa/kpa_95/kpa_95_2_entity.c @@ -5,7 +5,7 @@ #include "world/common/todo/GetEntityPosition.inc.c" s32 N(KeyList_PrisonCell)[] = { - ITEM_PRISON_KEY1, + ITEM_PRISON_KEY, ITEM_NONE }; @@ -44,7 +44,7 @@ EvtScript N(EVS_MakeEntities) = { BindTrigger(Ref(N(EVS_OpenCellDoor)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) EndIf IfEq(GF_KPA95_Defeated_Guard, TRUE) - Call(MakeItemEntity, ITEM_PRISON_KEY1, -70, 0, 55, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA95_Item_PrisonKey1) + Call(MakeItemEntity, ITEM_PRISON_KEY, -70, 0, 55, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA95_Item_PrisonKey1) EndIf Return End diff --git a/src/world/area_kpa/kpa_95/kpa_95_4_npc.c b/src/world/area_kpa/kpa_95/kpa_95_4_npc.c index e02bd668e93..7eca9add476 100644 --- a/src/world/area_kpa/kpa_95/kpa_95_4_npc.c +++ b/src/world/area_kpa/kpa_95/kpa_95_4_npc.c @@ -207,13 +207,13 @@ EvtScript N(EVS_NpcDefeat_Koopatrol) = { CaseEq(OUTCOME_PLAYER_WON) Set(GF_KPA95_Defeated_Guard, TRUE) Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - Call(MakeItemEntity, ITEM_PRISON_KEY1, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA95_Item_PrisonKey1) + Call(MakeItemEntity, ITEM_PRISON_KEY, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA95_Item_PrisonKey1) Call(DoNpcDefeat) CaseEq(OUTCOME_PLAYER_FLED) CaseEq(OUTCOME_ENEMY_FLED) Set(GF_KPA95_Defeated_Guard, TRUE) Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - Call(MakeItemEntity, ITEM_PRISON_KEY1, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA95_Item_PrisonKey1) + Call(MakeItemEntity, ITEM_PRISON_KEY, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA95_Item_PrisonKey1) Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) Call(RemoveNpc, NPC_SELF) EndSwitch diff --git a/src/world/area_kzn/kzn_02/kzn_02_1_main.c b/src/world/area_kzn/kzn_02/kzn_02_1_main.c index 4d1f914ea71..015435c0c64 100644 --- a/src/world/area_kzn/kzn_02/kzn_02_1_main.c +++ b/src/world/area_kzn/kzn_02/kzn_02_1_main.c @@ -93,7 +93,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o78, .pos = { 250.0, 20.0, 15.0 }}, { .colliderID = COLLIDER_o83, .pos = { 790.0, 20.0, 0.0 }}, { .colliderID = COLLIDER_o84, .pos = { 790.0, 20.0, 0.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_kzn/kzn_06/kzn_06_1_main.c b/src/world/area_kzn/kzn_06/kzn_06_1_main.c index 084e45dd37d..3a2bfafccd1 100644 --- a/src/world/area_kzn/kzn_06/kzn_06_1_main.c +++ b/src/world/area_kzn/kzn_06/kzn_06_1_main.c @@ -46,7 +46,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o394, .pos = { -210.0, 75.0, 100.0 }}, { .colliderID = COLLIDER_o440, .pos = { 60.0, 75.0, 100.0 }}, { .colliderID = COLLIDER_o437, .pos = { 60.0, 75.0, 100.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_kzn/kzn_06/kzn_06_2_entity.c b/src/world/area_kzn/kzn_06/kzn_06_2_entity.c index 6743d5a12f8..8b1b2f64017 100644 --- a/src/world/area_kzn/kzn_06/kzn_06_2_entity.c +++ b/src/world/area_kzn/kzn_06/kzn_06_2_entity.c @@ -14,7 +14,7 @@ EvtScript N(EVS_MakeEntities) = { Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 325, 205, -30, 0, ITEM_LIFE_SHROOM, MAKE_ENTITY_END) Call(AssignBlockFlag, GF_KZN06_HiddenItem_LifeShroom) IfEq(GF_KZN06_Hammer3Block, FALSE) - Call(MakeEntity, Ref(Entity_Hammer3Block_WideZ), 385, 5, 180, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Hammer3BlockWideZ), 385, 5, 180, 0, MAKE_ENTITY_END) Call(AssignScript, Ref(N(EVS_OnBreakBlock))) EndIf IfLt(GB_StoryProgress, STORY_CH5_LAVA_STREAM_BLOCKED) diff --git a/src/world/area_kzn/kzn_07/kzn_07_2_main.c b/src/world/area_kzn/kzn_07/kzn_07_2_main.c index b6b0855acfd..ea29f4d33a5 100644 --- a/src/world/area_kzn/kzn_07/kzn_07_2_main.c +++ b/src/world/area_kzn/kzn_07/kzn_07_2_main.c @@ -47,7 +47,7 @@ EvtScript N(EVS_SetupTexPanners) = { LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o365, .pos = { 120.0, 0.0, 100.0 }}, { .colliderID = COLLIDER_o411, .pos = { -120.0, 0.0, 100.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_kzn/kzn_07/kzn_07_3_entity.c b/src/world/area_kzn/kzn_07/kzn_07_3_entity.c index fdeae6e80df..ca7636125fd 100644 --- a/src/world/area_kzn/kzn_07/kzn_07_3_entity.c +++ b/src/world/area_kzn/kzn_07/kzn_07_3_entity.c @@ -37,7 +37,7 @@ EvtScript N(EVS_MakeEntities) = { Call(AssignChestFlag, GF_KZN07_GiantChest) Exec(N(EVS_MonitorChestStatus)) IfEq(GF_KZN07_Hammer3Block, FALSE) - Call(MakeEntity, Ref(Entity_Hammer3Block_WideZ), 175, 35, -185, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Hammer3BlockWideZ), 175, 35, -185, 0, MAKE_ENTITY_END) Call(AssignScript, Ref(N(EVS_OnBreakBlock))) EndIf Call(CreatePushBlockGrid, 0, 15, 5, -62, 0, 35, 0) diff --git a/src/world/area_kzn/kzn_08/kzn_08_1_main.c b/src/world/area_kzn/kzn_08/kzn_08_1_main.c index 3ab878eca4d..e8ab5e512a8 100644 --- a/src/world/area_kzn/kzn_08/kzn_08_1_main.c +++ b/src/world/area_kzn/kzn_08/kzn_08_1_main.c @@ -98,7 +98,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o322, .pos = { -10.0, 0.0, 100.0 }}, { .colliderID = COLLIDER_o446, .pos = { -10.0, 0.0, 100.0 }}, { .colliderID = COLLIDER_o454, .pos = { -90.0, 0.0, -45.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; // unused diff --git a/src/world/area_kzn/kzn_11/kzn_11_1_main.c b/src/world/area_kzn/kzn_11/kzn_11_1_main.c index a01926b545c..2ceba2a6dd2 100644 --- a/src/world/area_kzn/kzn_11/kzn_11_1_main.c +++ b/src/world/area_kzn/kzn_11/kzn_11_1_main.c @@ -49,7 +49,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o211, .pos = { -400.0, 20.0, 0.0 }}, { .colliderID = COLLIDER_o212, .pos = { 230.0, 20.0, 0.0 }}, { .colliderID = COLLIDER_o83, .pos = { 790.0, 20.0, 0.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_kzn/kzn_18/kzn_18_1_main.c b/src/world/area_kzn/kzn_18/kzn_18_1_main.c index 0b83900dff8..ff8482ec8f0 100644 --- a/src/world/area_kzn/kzn_18/kzn_18_1_main.c +++ b/src/world/area_kzn/kzn_18/kzn_18_1_main.c @@ -52,7 +52,7 @@ EvtScript N(EVS_StartTexPanners_Lava) = { LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o382, .pos = { 50.0, 200.0, -185.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_EnterMap) = { diff --git a/src/world/area_kzn/kzn_20/kzn_20_2_main.c b/src/world/area_kzn/kzn_20/kzn_20_2_main.c index aa269bfdca3..c488795198a 100644 --- a/src/world/area_kzn/kzn_20/kzn_20_2_main.c +++ b/src/world/area_kzn/kzn_20/kzn_20_2_main.c @@ -30,7 +30,7 @@ EvtScript N(EVS_UpdateTexPan_Lava) = { LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o919, .pos = { -30.0, 125.0, -15.0 }}, { .colliderID = COLLIDER_o870, .pos = { 30.0, 150.0, 0.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_DetermineLavaLevel) = { @@ -149,7 +149,7 @@ EvtScript N(EVS_UpdateLavaWaves) = { BombTrigger N(WeakWallBombTrigger) = { .pos = { 175.0, 150.0, 15.0 }, - .radius = 0.0 + .diameter = 0.0 }; EvtScript N(EVS_OnBreakWall) = { diff --git a/src/world/area_kzn/kzn_22/kzn_22_2_main.c b/src/world/area_kzn/kzn_22/kzn_22_2_main.c index e3b97e46795..d16e6bdb989 100644 --- a/src/world/area_kzn/kzn_22/kzn_22_2_main.c +++ b/src/world/area_kzn/kzn_22/kzn_22_2_main.c @@ -133,7 +133,7 @@ EvtScript N(EVS_UpdateLavaLevel) = { LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o582, .pos = { 200.0, 150.0, 180.0 }}, { .colliderID = COLLIDER_o357, .pos = { 200.0, 150.0, 180.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_mac/mac_01/mac_01_13_foliage.c b/src/world/area_mac/mac_01/mac_01_13_foliage.c index cdc28af48ad..ae5ad6ac51e 100644 --- a/src/world/area_mac/mac_01/mac_01_13_foliage.c +++ b/src/world/area_mac/mac_01/mac_01_13_foliage.c @@ -35,7 +35,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -512.0f, 20.0f, -154.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o115); @@ -57,7 +57,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { -157.0f, 20.0f, -458.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_mac/mac_02/mac_02_4_foliage.c b/src/world/area_mac/mac_02/mac_02_4_foliage.c index 36f402679e3..2f1efa71ee9 100644 --- a/src/world/area_mac/mac_02/mac_02_4_foliage.c +++ b/src/world/area_mac/mac_02/mac_02_4_foliage.c @@ -21,7 +21,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 98.0f, 20.0f, -531.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o115); @@ -43,7 +43,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { -323.0f, 20.0f, -190.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o415); @@ -65,7 +65,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { 598.0f, 0.0f, -67.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(UnusedTree_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o419); @@ -87,7 +87,7 @@ ShakeTreeConfig N(ShakeTree_UnusedTree) = { BombTrigger N(BombPos_UnusedTree) = { .pos = { -608.0f, 20.0f, -156.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree4_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o414); @@ -109,7 +109,7 @@ ShakeTreeConfig N(ShakeTree_Tree4) = { BombTrigger N(BombPos_Tree4) = { .pos = { 351.0f, 20.0f, 555.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_mac/mac_03/mac_03_6_foliage.c b/src/world/area_mac/mac_03/mac_03_6_foliage.c index ef940a2f8ff..4161f15346a 100644 --- a/src/world/area_mac/mac_03/mac_03_6_foliage.c +++ b/src/world/area_mac/mac_03/mac_03_6_foliage.c @@ -60,7 +60,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 79.0f, 20.0f, -504.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o238); @@ -82,7 +82,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 554.0f, 20.0f, -289.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o239); @@ -106,7 +106,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { //@bug x-position should be -265 BombTrigger N(BombPos_Tree3) = { .pos = { 265.0f, 20.0f, -535.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_mac/mac_04/mac_04_4_foliage.c b/src/world/area_mac/mac_04/mac_04_4_foliage.c index 957b3481eec..6faff5cb19d 100644 --- a/src/world/area_mac/mac_04/mac_04_4_foliage.c +++ b/src/world/area_mac/mac_04/mac_04_4_foliage.c @@ -21,7 +21,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 470.0f, 20.0f, -242.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o290); @@ -43,7 +43,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 50.0f, 20.0f, -141.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o288); @@ -65,7 +65,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { -293.0f, 20.0f, 86.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_mim/mim_01/mim_01_4_hint.c b/src/world/area_mim/mim_01/mim_01_4_hint.c index bc35edd9599..526eef71a7d 100644 --- a/src/world/area_mim/mim_01/mim_01_4_hint.c +++ b/src/world/area_mim/mim_01/mim_01_4_hint.c @@ -12,9 +12,9 @@ API_CALLABLE(N(GetFlowerNormal)) { N(GetFirstTriangleNormal)(mdl->modelNode->displayData->displayList, &x, &y, &z); - evt_set_variable(script, *args++, Float_TO_FIXED(x)); - evt_set_variable(script, *args++, Float_TO_FIXED(y)); - evt_set_variable(script, *args++, Float_TO_FIXED(z)); + evt_set_variable(script, *args++, FLOAT_TO_FIXED(x)); + evt_set_variable(script, *args++, FLOAT_TO_FIXED(y)); + evt_set_variable(script, *args++, FLOAT_TO_FIXED(z)); return ApiStatus_DONE2; } diff --git a/src/world/area_mim/mim_03/mim_03_4_hint.c b/src/world/area_mim/mim_03/mim_03_4_hint.c index e1108c02cd3..ed5b04c142e 100644 --- a/src/world/area_mim/mim_03/mim_03_4_hint.c +++ b/src/world/area_mim/mim_03/mim_03_4_hint.c @@ -12,9 +12,9 @@ API_CALLABLE(N(GetFlowerNormal)) { N(GetFirstTriangleNormal)(mdl->modelNode->displayData->displayList, &x, &y, &z); - evt_set_variable(script, *args++, Float_TO_FIXED(x)); - evt_set_variable(script, *args++, Float_TO_FIXED(y)); - evt_set_variable(script, *args++, Float_TO_FIXED(z)); + evt_set_variable(script, *args++, FLOAT_TO_FIXED(x)); + evt_set_variable(script, *args++, FLOAT_TO_FIXED(y)); + evt_set_variable(script, *args++, FLOAT_TO_FIXED(z)); return ApiStatus_DONE2; } diff --git a/src/world/area_mim/mim_06/mim_06_4_hint.c b/src/world/area_mim/mim_06/mim_06_4_hint.c index 4f38d8dd677..f23453ad803 100644 --- a/src/world/area_mim/mim_06/mim_06_4_hint.c +++ b/src/world/area_mim/mim_06/mim_06_4_hint.c @@ -12,9 +12,9 @@ API_CALLABLE(N(GetFlowerNormal)) { N(GetFirstTriangleNormal)(mdl->modelNode->displayData->displayList, &x, &y, &z); - evt_set_variable(script, *args++, Float_TO_FIXED(x)); - evt_set_variable(script, *args++, Float_TO_FIXED(y)); - evt_set_variable(script, *args++, Float_TO_FIXED(z)); + evt_set_variable(script, *args++, FLOAT_TO_FIXED(x)); + evt_set_variable(script, *args++, FLOAT_TO_FIXED(y)); + evt_set_variable(script, *args++, FLOAT_TO_FIXED(z)); return ApiStatus_DONE2; } diff --git a/src/world/area_nok/nok_01/nok_01_8_foliage.c b/src/world/area_nok/nok_01/nok_01_8_foliage.c index c2d20d76041..3edf8f3a501 100644 --- a/src/world/area_nok/nok_01/nok_01_8_foliage.c +++ b/src/world/area_nok/nok_01/nok_01_8_foliage.c @@ -184,7 +184,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 198.0f, 0.0f, 147.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_nok/nok_02/nok_02_9_foliage.c b/src/world/area_nok/nok_02/nok_02_9_foliage.c index d25c8a618f7..ace1a014037 100644 --- a/src/world/area_nok/nok_02/nok_02_9_foliage.c +++ b/src/world/area_nok/nok_02/nok_02_9_foliage.c @@ -121,7 +121,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 443.0f, 0.0f, 68.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_nok/nok_12/nok_12_5_foliage.c b/src/world/area_nok/nok_12/nok_12_5_foliage.c index c3b847b1c73..886f9f665b5 100644 --- a/src/world/area_nok/nok_12/nok_12_5_foliage.c +++ b/src/world/area_nok/nok_12/nok_12_5_foliage.c @@ -13,7 +13,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -422.0f, 0.0f, -120.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_nok/nok_15/nok_15_2_main.c b/src/world/area_nok/nok_15/nok_15_2_main.c index b474dea9274..8e76355931f 100644 --- a/src/world/area_nok/nok_15/nok_15_2_main.c +++ b/src/world/area_nok/nok_15/nok_15_2_main.c @@ -9,7 +9,7 @@ EvtScript N(EVS_ExitWalk_trd_00_4) = EVT_EXIT_WALK_NOK(60, nok_15_ENTRY_2, "trd_ BombTrigger N(BombPos_Wall) = { .pos = { -26.0f, 0.0f, -531.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_BlastWall) = { diff --git a/src/world/area_nok/nok_15/nok_15_5_foliage.c b/src/world/area_nok/nok_15/nok_15_5_foliage.c index fc4cfc9d096..9447754aff9 100644 --- a/src/world/area_nok/nok_15/nok_15_5_foliage.c +++ b/src/world/area_nok/nok_15/nok_15_5_foliage.c @@ -26,7 +26,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -592.0f, 0.0f, -118.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_obk/obk_02/obk_02_4_bombable.c b/src/world/area_obk/obk_02/obk_02_4_bombable.c index 4f337cb57c8..71217171276 100644 --- a/src/world/area_obk/obk_02/obk_02_4_bombable.c +++ b/src/world/area_obk/obk_02/obk_02_4_bombable.c @@ -3,7 +3,7 @@ BombTrigger N(BombPos_Wall) = { .pos = { 237.0f, -210.0f, 53.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_OnBlast_Wall) = { diff --git a/src/world/area_obk/obk_06/obk_06_3_bombable.c b/src/world/area_obk/obk_06/obk_06_3_bombable.c index 62adf3b6b41..a0859b4eb11 100644 --- a/src/world/area_obk/obk_06/obk_06_3_bombable.c +++ b/src/world/area_obk/obk_06/obk_06_3_bombable.c @@ -3,7 +3,7 @@ BombTrigger N(BombPos_Wall) = { .pos = { -237.0f, 0.0f, 50.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_OnBlast_Wall) = { diff --git a/src/world/area_omo/omo_02/omo_02_5_barricade.c b/src/world/area_omo/omo_02/omo_02_5_barricade.c index ee951a4ec01..a6ae7fc0d94 100644 --- a/src/world/area_omo/omo_02/omo_02_5_barricade.c +++ b/src/world/area_omo/omo_02/omo_02_5_barricade.c @@ -180,7 +180,7 @@ API_CALLABLE(N(AnimateBarricadeParts)) { BombTrigger N(BombPos_Barricade) = { .pos = { -520.0f, 0.0f, 0.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_Scene_BreakBarricade) = { diff --git a/src/world/area_omo/omo_11/omo_11_4_entity.c b/src/world/area_omo/omo_11/omo_11_4_entity.c index c081453dac7..ac7b7363907 100644 --- a/src/world/area_omo/omo_11/omo_11_4_entity.c +++ b/src/world/area_omo/omo_11/omo_11_4_entity.c @@ -16,7 +16,7 @@ EvtScript N(EVS_MakeEntities) = { Call(AssignBlockFlag, GF_OMO11_HiddenItem_SnowmanDoll) Call(MakeEntity, Ref(Entity_YellowBlock), -100, 60, -45, 0, ITEM_COIN, MAKE_ENTITY_END) Call(AssignBlockFlag, GF_OMO11_ItemBlock_CoinB) - Call(MakeEntity, Ref(Entity_HiddenRedBlock), -150, 60, -45, 0, ITEM_DEEP_FOCUS2, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenRedBlock), -150, 60, -45, 0, ITEM_DEEP_FOCUS_B, MAKE_ENTITY_END) Call(AssignBlockFlag, GF_OMO11_HiddenBadge_DeepFocus2) Call(MakeEntity, Ref(Entity_YellowBlock), -200, 60, -45, 0, ITEM_COIN, MAKE_ENTITY_END) Call(AssignBlockFlag, GF_OMO11_ItemBlock_CoinA) diff --git a/src/world/area_omo/omo_12/omo_12_3_npc.c b/src/world/area_omo/omo_12/omo_12_3_npc.c index 3b60013a1d6..4f235068324 100644 --- a/src/world/area_omo/omo_12/omo_12_3_npc.c +++ b/src/world/area_omo/omo_12/omo_12_3_npc.c @@ -188,7 +188,7 @@ Vec3f N(WattLeftFlightPath)[] = { BombTrigger N(BombPos_Lantern_Unused) = { .pos = { 0.0f, 0.0f, 20.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_Scene_ReleaseWatt) = { diff --git a/src/world/area_pra/common/Reflection.inc.c b/src/world/area_pra/common/Reflection.inc.c index b0d65a0baf5..625c2bd1a7a 100644 --- a/src/world/area_pra/common/Reflection.inc.c +++ b/src/world/area_pra/common/Reflection.inc.c @@ -95,7 +95,7 @@ void N(worker_reflect_player_wall)(void) { spr_update_player_sprite(PLAYER_SPRITE_AUX2, anim, 1.0f); if (!(playerStatus->flags & PS_FLAG_SPINNING)) { - if (playerStatus->curAlpha != D_802D9D70) { + if (playerStatus->curAlpha != ReflectWallPrevAlpha) { if (playerStatus->curAlpha < 254) { renderMode = RENDER_MODE_SURFACE_XLU_LAYER1; set_player_imgfx_comp(PLAYER_SPRITE_AUX2, -1, IMGFX_SET_ALPHA, 0, 0, 0, playerStatus->curAlpha, 0); @@ -104,10 +104,10 @@ void N(worker_reflect_player_wall)(void) { set_player_imgfx_comp(PLAYER_SPRITE_AUX2, -1, IMGFX_CLEAR, 0, 0, 0, 0, 0); } } - D_802D9D70 = playerStatus->curAlpha; + ReflectWallPrevAlpha = playerStatus->curAlpha; } else { renderMode = RENDER_MODE_SURFACE_XLU_LAYER1; - D_802D9D70 = 0; + ReflectWallPrevAlpha = 0; } renderTaskPtr->renderMode = renderMode; @@ -170,7 +170,7 @@ void N(worker_reflect_player_floor)(void) { spr_update_player_sprite(PLAYER_SPRITE_AUX1, playerStatus->trueAnimation, 1.0f); if (!(playerStatus->flags & PS_FLAG_SPINNING)) { - if (playerStatus->curAlpha != D_802D9D71) { + if (playerStatus->curAlpha != ReflectFloorPrevAlpha) { if (playerStatus->curAlpha < 254) { renderMode = RENDER_MODE_SURFACE_XLU_LAYER1; set_player_imgfx_comp(PLAYER_SPRITE_AUX1, -1, IMGFX_SET_ALPHA, 0, 0, 0, playerStatus->curAlpha, 0); @@ -179,10 +179,10 @@ void N(worker_reflect_player_floor)(void) { set_player_imgfx_comp(PLAYER_SPRITE_AUX1, -1, IMGFX_CLEAR, 0, 0, 0, 0, 0); } } - D_802D9D71 = playerStatus->curAlpha; + ReflectFloorPrevAlpha = playerStatus->curAlpha; } else { renderMode = RENDER_MODE_SURFACE_XLU_LAYER1; - D_802D9D71 = 0; + ReflectFloorPrevAlpha = 0; } renderTaskPtr->renderMode = renderMode; diff --git a/src/world/area_pra/pra_09/pra_09_2_main.c b/src/world/area_pra/pra_09/pra_09_2_main.c index e7f61d7ff3b..79d69acd9c1 100644 --- a/src/world/area_pra/pra_09/pra_09_2_main.c +++ b/src/world/area_pra/pra_09/pra_09_2_main.c @@ -52,7 +52,7 @@ EvtScript N(EVS_EnterMap) = { BombTrigger N(BombPos_Wall) = { .pos = { 487.0f, 0.0f, 80.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_BlastWall) = { diff --git a/src/world/area_pra/pra_13/pra_13_2_main.c b/src/world/area_pra/pra_13/pra_13_2_main.c index 5960015d6e6..8ebd3a6d0b4 100644 --- a/src/world/area_pra/pra_13/pra_13_2_main.c +++ b/src/world/area_pra/pra_13/pra_13_2_main.c @@ -118,12 +118,12 @@ EvtScript N(EVS_EnterMap) = { BombTrigger N(BombPos_NearWall) = { .pos = { 487.0f, 0.0f, 80.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(BombPos_FarWall) = { .pos = { 487.0f, 0.0f, -80.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_BlastWall_Near) = { diff --git a/src/world/area_pra/pra_14/pra_14_2_main.c b/src/world/area_pra/pra_14/pra_14_2_main.c index 2fe02899502..d1f56219b2b 100644 --- a/src/world/area_pra/pra_14/pra_14_2_main.c +++ b/src/world/area_pra/pra_14/pra_14_2_main.c @@ -23,12 +23,12 @@ EvtScript N(EVS_EnterMap) = { BombTrigger N(BombPos_WallA) = { .pos = { 13.0f, 0.0f, 70.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(BombPos_WallB) = { .pos = { 13.0f, 0.0f, -70.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_BlastWallA) = { diff --git a/src/world/area_pra/pra_33/pra_33_2_main.c b/src/world/area_pra/pra_33/pra_33_2_main.c index 38a7f80b7e3..9fcb29adee8 100644 --- a/src/world/area_pra/pra_33/pra_33_2_main.c +++ b/src/world/area_pra/pra_33/pra_33_2_main.c @@ -79,7 +79,7 @@ EvtScript N(EVS_EnterMap) = { BombTrigger N(BombPos_Wall) = { .pos = { 487.0f, 0.0f, -80.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_BlastWall) = { diff --git a/src/world/area_pra/pra_35/pra_35_2_main.c b/src/world/area_pra/pra_35/pra_35_2_main.c index a5525367c67..e0c4dc68a57 100644 --- a/src/world/area_pra/pra_35/pra_35_2_main.c +++ b/src/world/area_pra/pra_35/pra_35_2_main.c @@ -79,7 +79,7 @@ EvtScript N(EVS_EnterMap) = { BombTrigger N(D_802432A8_D904F8) = { .pos = { 13.0f, 0.0f, -80.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(D_802432B8_D90508) = { diff --git a/src/world/area_sam/sam_02/sam_02_2_main.c b/src/world/area_sam/sam_02/sam_02_2_main.c index 6a2d11f5a1a..277b416b308 100644 --- a/src/world/area_sam/sam_02/sam_02_2_main.c +++ b/src/world/area_sam/sam_02/sam_02_2_main.c @@ -17,7 +17,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 230.0f, 20.0f, -370.0f }, - .radius = 0.0f + .diameter = 0.0f }; //@bug model count is 2, but only one is supplied. the extra comma is needed. @@ -30,7 +30,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 264.0f, 24.0f, 316.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_ExitWalk_sam_01_0) = EVT_EXIT_WALK(60, sam_02_ENTRY_0, "sam_01", sam_01_ENTRY_0); diff --git a/src/world/area_sam/sam_04/sam_04_2_main.c b/src/world/area_sam/sam_04/sam_04_2_main.c index 3f603d728ca..a7d3a0563f6 100644 --- a/src/world/area_sam/sam_04/sam_04_2_main.c +++ b/src/world/area_sam/sam_04/sam_04_2_main.c @@ -99,7 +99,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -411.0f, 0.0f, 163.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_miki2); @@ -119,7 +119,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { 426.0f, 0.0f, -105.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree4_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_ki4); @@ -132,7 +132,7 @@ ShakeTreeConfig N(ShakeTree_Tree4) = { BombTrigger N(BombPos_Tree4) = { .pos = { 315.0f, 0.0f, -115.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree5_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_ki5); @@ -145,7 +145,7 @@ ShakeTreeConfig N(ShakeTree_Tree5) = { BombTrigger N(BombPos_Tree5) = { .pos = { 314.0f, 0.0f, -114.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree6_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_ki6); @@ -158,7 +158,7 @@ ShakeTreeConfig N(ShakeTree_Tree6) = { BombTrigger N(BombPos_Tree6) = { .pos = { -294.0f, 0.0f, -213.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_Main) = { diff --git a/src/world/area_sam/sam_06/sam_06_2_main.c b/src/world/area_sam/sam_06/sam_06_2_main.c index c6a5900c6d4..2413065cfe0 100644 --- a/src/world/area_sam/sam_06/sam_06_2_main.c +++ b/src/world/area_sam/sam_06/sam_06_2_main.c @@ -15,7 +15,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -185.0f, 90.0f, -225.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_ki3); @@ -28,7 +28,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { -451.0f, 60.0f, 80.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_ki5b); @@ -41,7 +41,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { -405.0f, 0.0f, 228.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree4_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_ki6b); @@ -54,7 +54,7 @@ ShakeTreeConfig N(ShakeTree_Tree4) = { BombTrigger N(BombPos_Tree4) = { .pos = { 291.0f, 0.0f, 385.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree5_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_ki10); @@ -67,7 +67,7 @@ ShakeTreeConfig N(ShakeTree_Tree5) = { BombTrigger N(BombPos_Tree5) = { .pos = { 108.0f, 83.0f, 115.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_ExitWalk_sam_05_1) = EVT_EXIT_WALK(60, sam_06_ENTRY_0, "sam_05", sam_05_ENTRY_1); diff --git a/src/world/area_sam/sam_07/sam_07_4_frozen_pit.c b/src/world/area_sam/sam_07/sam_07_4_frozen_pit.c index 78041a6114c..366499f332a 100644 --- a/src/world/area_sam/sam_07/sam_07_4_frozen_pit.c +++ b/src/world/area_sam/sam_07/sam_07_4_frozen_pit.c @@ -232,9 +232,9 @@ EvtScript N(EVS_UseGreenSwitch) = { End }; -BombTriggerF N(BombPos_Ice) = { +BombTrigger N(BombPos_Ice) = { .pos = { -940.0f, -130.0f, -75.0f }, - .radius = 60.0f + .diameter = 60.0f }; EvtScript N(EVS_SetupPit) = { diff --git a/src/world/area_sam/sam_10/sam_10_4_stairs.c b/src/world/area_sam/sam_10/sam_10_4_stairs.c index 83994eb358e..3666e14a5ab 100644 --- a/src/world/area_sam/sam_10/sam_10_4_stairs.c +++ b/src/world/area_sam/sam_10/sam_10_4_stairs.c @@ -207,7 +207,7 @@ EvtScript N(EVS_ItemPrompt_StarStoneSocket) = { BombTrigger N(BombPos_Wall) = { .pos = { 337.0f, -20.0f, -103.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_BlastWall) = { diff --git a/src/world/area_sam/sam_11/sam_11_2_main.c b/src/world/area_sam/sam_11/sam_11_2_main.c index 16e9b71cc5f..b1000e26851 100644 --- a/src/world/area_sam/sam_11/sam_11_2_main.c +++ b/src/world/area_sam/sam_11/sam_11_2_main.c @@ -21,7 +21,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 447.0f, 0.0f, -144.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o192); @@ -34,7 +34,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { -440.0f, 0.0f, -178.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o190); @@ -47,7 +47,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { -450.0f, 0.0f, -80.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_ExitWalk_sam_02_1) = { diff --git a/src/world/area_sam/sam_11/sam_11_6_pond.c b/src/world/area_sam/sam_11/sam_11_6_pond.c index c729deaa2f4..665a35e6bf3 100644 --- a/src/world/area_sam/sam_11/sam_11_6_pond.c +++ b/src/world/area_sam/sam_11/sam_11_6_pond.c @@ -433,10 +433,9 @@ EvtScript N(EVS_TouchPond_After) = { End }; -// @bug radius is f32 here, should be s32 -BombTriggerF N(BombTrigger_Pond) = { +BombTrigger N(BombTrigger_Pond) = { .pos = { 0.0f, -10.0f, 220.0f }, - .radius = 300.0 + .diameter = 300.0 }; EvtScript N(EVS_SetupPond) = { diff --git a/src/world/area_sbk/sbk_06/sbk_06_3_foliage.c b/src/world/area_sbk/sbk_06/sbk_06_3_foliage.c index 5b8a1e029db..d42a4f0b3c6 100644 --- a/src/world/area_sbk/sbk_06/sbk_06_3_foliage.c +++ b/src/world/area_sbk/sbk_06/sbk_06_3_foliage.c @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 228.0f, 0.0f, -306.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_sbk/sbk_14/sbk_14_2_entity.c b/src/world/area_sbk/sbk_14/sbk_14_2_entity.c index cefb461f64e..63255129722 100644 --- a/src/world/area_sbk/sbk_14/sbk_14_2_entity.c +++ b/src/world/area_sbk/sbk_14/sbk_14_2_entity.c @@ -1,7 +1,7 @@ #include "sbk_14.h" #include "entity.h" -TweesterPath N(D_80240440_936B20) = { +TweesterPath N(DefaultTweesterPath) = { -65, 0, 217, -262, 0, -64, 57, 0, -286, @@ -9,8 +9,8 @@ TweesterPath N(D_80240440_936B20) = { TWEESTER_PATH_LOOP }; -TweesterPath* N(D_80240474_936B54)[] = { - &N(D_80240440_936B20), +TweesterPath* N(TweesterPaths)[] = { + &N(DefaultTweesterPath), PTR_LIST_END }; @@ -24,7 +24,7 @@ EvtScript N(D_8024047C_936B5C) = { }; EvtScript N(EVS_MakeEntities) = { - Call(MakeEntity, Ref(Entity_Tweester), 327, 0, 8, 0, Ref(N(D_80240474_936B54)), MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Tweester), 327, 0, 8, 0, Ref(N(TweesterPaths)), MAKE_ENTITY_END) Call(AssignScript, Ref(N(D_8024047C_936B5C))) Call(MakeEntity, Ref(Entity_MulticoinBlock), 0, 60, -100, 0, MAKE_ENTITY_END) Call(AssignBlockFlag, GF_SBK14_MultiCoinBrick) diff --git a/src/world/area_sbk/sbk_16/sbk_16_2_foliage.c b/src/world/area_sbk/sbk_16/sbk_16_2_foliage.c index d40e5b031f4..c1eb1f6eac8 100644 --- a/src/world/area_sbk/sbk_16/sbk_16_2_foliage.c +++ b/src/world/area_sbk/sbk_16/sbk_16_2_foliage.c @@ -12,7 +12,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -351.0f, 0.0f, -101.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o58); @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 228.0f, 0.0f, -306.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_sbk/sbk_23/sbk_23_2_entity.c b/src/world/area_sbk/sbk_23/sbk_23_2_entity.c index b7628351b1c..450683c5a45 100644 --- a/src/world/area_sbk/sbk_23/sbk_23_2_entity.c +++ b/src/world/area_sbk/sbk_23/sbk_23_2_entity.c @@ -1,7 +1,7 @@ #include "sbk_23.h" #include "entity.h" -TweesterPath N(D_802403C0_93AB20) = { +TweesterPath N(DefaultTweesterPath) = { -65, 0, 217, -262, 0, -64, 57, 0, -286, @@ -9,12 +9,12 @@ TweesterPath N(D_802403C0_93AB20) = { TWEESTER_PATH_LOOP }; -TweesterPath* N(D_802403F4_93AB54)[] = { - &N(D_802403C0_93AB20), +TweesterPath* N(TweesterPaths)[] = { + &N(DefaultTweesterPath), PTR_LIST_END }; -EvtScript N(D_802403FC_93AB5C) = { +EvtScript N(EVS_GotoMap_sbk_14_4) = { Call(DisablePlayerInput, TRUE) Call(DisablePlayerPhysics, TRUE) Call(GotoMap, Ref("sbk_14"), sbk_14_ENTRY_4) @@ -24,8 +24,8 @@ EvtScript N(D_802403FC_93AB5C) = { }; EvtScript N(EVS_MakeEntities) = { - Call(MakeEntity, Ref(Entity_Tweester), 327, 0, 8, 0, Ref(N(D_802403F4_93AB54)), MAKE_ENTITY_END) - Call(AssignScript, Ref(N(D_802403FC_93AB5C))) + Call(MakeEntity, Ref(Entity_Tweester), 327, 0, 8, 0, Ref(N(TweesterPaths)), MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_GotoMap_sbk_14_4))) Return End }; diff --git a/src/world/area_sbk/sbk_24/sbk_24_4_foliage.c b/src/world/area_sbk/sbk_24/sbk_24_4_foliage.c index b779e47c344..5d7b4ba32eb 100644 --- a/src/world/area_sbk/sbk_24/sbk_24_4_foliage.c +++ b/src/world/area_sbk/sbk_24/sbk_24_4_foliage.c @@ -12,7 +12,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 265.0f, 0.0f, -146.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o56); @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 401.0f, 0.0f, -119.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o58); @@ -38,7 +38,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { 362.0f, 0.0f, -234.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_sbk/sbk_25/sbk_25_3_foliage.c b/src/world/area_sbk/sbk_25/sbk_25_3_foliage.c index dca40cf343f..e7b0c66dbbf 100644 --- a/src/world/area_sbk/sbk_25/sbk_25_3_foliage.c +++ b/src/world/area_sbk/sbk_25/sbk_25_3_foliage.c @@ -12,7 +12,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -398.0f, 0.0f, -104.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o60); @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { -238.0f, 0.0f, -179.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_sbk/sbk_26/sbk_26_3_foliage.c b/src/world/area_sbk/sbk_26/sbk_26_3_foliage.c index fe49f92d6a3..89003ef40c0 100644 --- a/src/world/area_sbk/sbk_26/sbk_26_3_foliage.c +++ b/src/world/area_sbk/sbk_26/sbk_26_3_foliage.c @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -178.0f, 0.0f, 164.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_sbk/sbk_30/sbk_30_4_foliage.c b/src/world/area_sbk/sbk_30/sbk_30_4_foliage.c index 73a71d4df39..7663beb3626 100644 --- a/src/world/area_sbk/sbk_30/sbk_30_4_foliage.c +++ b/src/world/area_sbk/sbk_30/sbk_30_4_foliage.c @@ -31,7 +31,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree) = { .pos = { 266.0f, 0.0f, -209.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_sbk/sbk_33/sbk_33_1_entity.c b/src/world/area_sbk/sbk_33/sbk_33_1_entity.c index 6f2c9777574..64cde824066 100644 --- a/src/world/area_sbk/sbk_33/sbk_33_1_entity.c +++ b/src/world/area_sbk/sbk_33/sbk_33_1_entity.c @@ -14,7 +14,7 @@ TweesterPath* N(TweesterPaths)[] = { PTR_LIST_END }; -EvtScript N(D_802400FC_945ACC) = { +EvtScript N(EVS_GotoMap_sbk_24_4) = { Call(DisablePlayerInput, TRUE) Call(DisablePlayerPhysics, TRUE) Call(GotoMap, Ref("sbk_24"), sbk_24_ENTRY_4) @@ -27,7 +27,7 @@ EvtScript N(EVS_MakeEntities) = { Call(MakeEntity, Ref(Entity_HiddenPanel), 0, 0, 225, 0, MODEL_stage, MAKE_ENTITY_END) Call(AssignPanelFlag, GF_SBK33_HiddenPanel) Call(MakeEntity, Ref(Entity_Tweester), 327, 0, 8, 0, Ref(N(TweesterPaths)), MAKE_ENTITY_END) - Call(AssignScript, Ref(N(D_802400FC_945ACC))) + Call(AssignScript, Ref(N(EVS_GotoMap_sbk_24_4))) Return End }; diff --git a/src/world/area_sbk/sbk_34/sbk_34_3_foliage.c b/src/world/area_sbk/sbk_34/sbk_34_3_foliage.c index e0713c2829b..238b6b36319 100644 --- a/src/world/area_sbk/sbk_34/sbk_34_3_foliage.c +++ b/src/world/area_sbk/sbk_34/sbk_34_3_foliage.c @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 131.0f, 0.0f, -89.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_sbk/sbk_35/sbk_35_3_foliage.c b/src/world/area_sbk/sbk_35/sbk_35_3_foliage.c index 6800076e439..10f4f4d7b59 100644 --- a/src/world/area_sbk/sbk_35/sbk_35_3_foliage.c +++ b/src/world/area_sbk/sbk_35/sbk_35_3_foliage.c @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -398.0f, 0.0f, 104.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o59); @@ -38,7 +38,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { -108.0f, 0.0f, -406.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o61); @@ -51,7 +51,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { 211.0f, 0.0f, -111.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_sbk/sbk_36/sbk_36_2_foliage.c b/src/world/area_sbk/sbk_36/sbk_36_2_foliage.c index ebf084a1a10..8957ae616b9 100644 --- a/src/world/area_sbk/sbk_36/sbk_36_2_foliage.c +++ b/src/world/area_sbk/sbk_36/sbk_36_2_foliage.c @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -422.0f, 0.0f, 91.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o71); @@ -51,7 +51,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { -322.0f, 0.0f, -111.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o75); @@ -64,7 +64,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { -244.0f, 0.0f, 77.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree4_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o69); @@ -77,7 +77,7 @@ ShakeTreeConfig N(ShakeTree_Tree4) = { BombTrigger N(BombPos_Tree4) = { .pos = { -128.0f, 0.0f, -111.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree5_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o57); @@ -90,7 +90,7 @@ ShakeTreeConfig N(ShakeTree_Tree5) = { BombTrigger N(BombPos_Tree5) = { .pos = { 58.0f, 0.0f, 101.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree6_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o59); @@ -116,7 +116,7 @@ ShakeTreeConfig N(ShakeTree_Tree6) = { BombTrigger N(BombPos_Tree6) = { .pos = { 158.0f, 0.0f, -101.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree7_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o67); @@ -129,7 +129,7 @@ ShakeTreeConfig N(ShakeTree_Tree7) = { BombTrigger N(BombPos_Tree7) = { .pos = { 236.0f, 0.0f, 87.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree8_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o63); @@ -142,7 +142,7 @@ ShakeTreeConfig N(ShakeTree_Tree8) = { BombTrigger N(BombPos_Tree8) = { .pos = { 351.0f, 0.0f, -101.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree9_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o65); @@ -169,7 +169,7 @@ ShakeTreeConfig N(ShakeTree_Tree9) = { BombTrigger N(BombPos_Tree9) = { .pos = { 438.0f, 0.0f, 101.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_sbk/sbk_41/sbk_41_2_entity.c b/src/world/area_sbk/sbk_41/sbk_41_2_entity.c index 4be25b161e1..6c2d6198d69 100644 --- a/src/world/area_sbk/sbk_41/sbk_41_2_entity.c +++ b/src/world/area_sbk/sbk_41/sbk_41_2_entity.c @@ -14,7 +14,7 @@ TweesterPath* N(TweesterPaths)[] = { PTR_LIST_END }; -EvtScript N(EVS_RideTweester) = { +EvtScript N(EVS_GotoMap_sbk_32_4) = { Call(DisablePlayerInput, TRUE) Call(DisablePlayerPhysics, TRUE) Call(GotoMap, Ref("sbk_32"), sbk_32_ENTRY_4) @@ -25,7 +25,7 @@ EvtScript N(EVS_RideTweester) = { EvtScript N(EVS_MakeEntities) = { Call(MakeEntity, Ref(Entity_Tweester), 327, 0, 8, 0, Ref(N(TweesterPaths)), MAKE_ENTITY_END) - Call(AssignScript, Ref(N(EVS_RideTweester))) + Call(AssignScript, Ref(N(EVS_GotoMap_sbk_32_4))) Return End }; diff --git a/src/world/area_sbk/sbk_46/sbk_46_3_foliage.c b/src/world/area_sbk/sbk_46/sbk_46_3_foliage.c index e7294d51188..be3db020671 100644 --- a/src/world/area_sbk/sbk_46/sbk_46_3_foliage.c +++ b/src/world/area_sbk/sbk_46/sbk_46_3_foliage.c @@ -12,7 +12,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -228.0f, 0.0f, -306.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o64); @@ -38,7 +38,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { -178.0f, 0.0f, 164.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o60); @@ -51,7 +51,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { 351.0f, 0.0f, -101.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_sbk/sbk_54/sbk_54_2_entity.c b/src/world/area_sbk/sbk_54/sbk_54_2_entity.c index 81da2498ecd..26ca29dc3c5 100644 --- a/src/world/area_sbk/sbk_54/sbk_54_2_entity.c +++ b/src/world/area_sbk/sbk_54/sbk_54_2_entity.c @@ -1,7 +1,7 @@ #include "sbk_54.h" #include "entity.h" -TweesterPath N(TweesterPath1) = { +TweesterPath N(DefaultTweesterPath) = { -65, 0, 217, -262, 0, -64, 57, 0, -286, @@ -10,11 +10,11 @@ TweesterPath N(TweesterPath1) = { }; TweesterPath* N(TweesterPaths)[] = { - &N(TweesterPath1), + &N(DefaultTweesterPath), PTR_LIST_END }; -EvtScript N(EVS_RideTweester) = { +EvtScript N(EVS_GotoMap_sbk_45_4) = { Call(DisablePlayerInput, TRUE) Call(DisablePlayerPhysics, TRUE) Call(GotoMap, Ref("sbk_45"), sbk_45_ENTRY_4) @@ -25,7 +25,7 @@ EvtScript N(EVS_RideTweester) = { EvtScript N(EVS_MakeEntities) = { Call(MakeEntity, Ref(Entity_Tweester), 327, 0, 8, 0, Ref(N(TweesterPaths)), MAKE_ENTITY_END) - Call(AssignScript, Ref(N(EVS_RideTweester))) + Call(AssignScript, Ref(N(EVS_GotoMap_sbk_45_4))) Return End }; diff --git a/src/world/area_sbk/sbk_55/sbk_55_3_foliage.c b/src/world/area_sbk/sbk_55/sbk_55_3_foliage.c index 508b22ec98f..647432656c3 100644 --- a/src/world/area_sbk/sbk_55/sbk_55_3_foliage.c +++ b/src/world/area_sbk/sbk_55/sbk_55_3_foliage.c @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 77.0f, 0.0f, -126.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_sbk/sbk_56/sbk_56_3_foliage.c b/src/world/area_sbk/sbk_56/sbk_56_3_foliage.c index 7b1418390f2..da6fde68216 100644 --- a/src/world/area_sbk/sbk_56/sbk_56_3_foliage.c +++ b/src/world/area_sbk/sbk_56/sbk_56_3_foliage.c @@ -26,7 +26,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -259.0f, 0.0f, -160.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_ki); @@ -53,7 +53,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 171.0f, 0.0f, -291.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o52); @@ -79,7 +79,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { -436.0f, 0.0f, 224.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree4_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_y_ha); @@ -92,7 +92,7 @@ ShakeTreeConfig N(ShakeTree_Tree4) = { BombTrigger N(BombPos_Tree4) = { .pos = { -320.0f, 0.0f, -21.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree5_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o54); @@ -105,7 +105,7 @@ ShakeTreeConfig N(ShakeTree_Tree5) = { BombTrigger N(BombPos_Tree5) = { .pos = { -242.0f, 0.0f, 88.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree6_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o56); @@ -118,7 +118,7 @@ ShakeTreeConfig N(ShakeTree_Tree6) = { BombTrigger N(BombPos_Tree6) = { .pos = { -203.0f, 0.0f, -214.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree7_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o58); @@ -131,7 +131,7 @@ ShakeTreeConfig N(ShakeTree_Tree7) = { BombTrigger N(BombPos_Tree7) = { .pos = { -101.0f, 0.0f, -376.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree8_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o60); @@ -144,7 +144,7 @@ ShakeTreeConfig N(ShakeTree_Tree8) = { BombTrigger N(BombPos_Tree8) = { .pos = { 104.0f, 0.0f, -386.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree9_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o62); @@ -170,7 +170,7 @@ ShakeTreeConfig N(ShakeTree_Tree9) = { BombTrigger N(BombPos_Tree9) = { .pos = { 266.0f, 0.0f, 124.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree10_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o64); @@ -183,7 +183,7 @@ ShakeTreeConfig N(ShakeTree_Tree10) = { BombTrigger N(BombPos_Tree10) = { .pos = { 362.0f, 0.0f, -74.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_sbk/sbk_66/sbk_66_3_foliage.c b/src/world/area_sbk/sbk_66/sbk_66_3_foliage.c index 6f49b76e861..d7971f7ae25 100644 --- a/src/world/area_sbk/sbk_66/sbk_66_3_foliage.c +++ b/src/world/area_sbk/sbk_66/sbk_66_3_foliage.c @@ -12,7 +12,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombTrigger_Tree1) = { .pos = { -326.0f, 0.0f, -204.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o58); @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombTrigger_Tree2) = { .pos = { 116.0f, 0.0f, -394.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o56); @@ -51,7 +51,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombTrigger_Tree3) = { .pos = { 398.0f, 0.0f, -116.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/area_tik/tik_05/tik_05_4_entity.c b/src/world/area_tik/tik_05/tik_05_4_entity.c index d71f0f00229..1ddd1a6deb1 100644 --- a/src/world/area_tik/tik_05/tik_05_4_entity.c +++ b/src/world/area_tik/tik_05/tik_05_4_entity.c @@ -54,11 +54,11 @@ EvtScript N(EVS_BreakBlock_DropSpring) = { End }; -EvtScript N(EVS_OpenChest) = EVT_OPEN_CHEST_BADGE(ITEM_POWER_SMASH1, GF_TIK05_Chest_PowerSmash1); +EvtScript N(EVS_OpenChest) = EVT_OPEN_CHEST_BADGE(ITEM_POWER_SMASH, GF_TIK05_Chest_PowerSmash); EvtScript N(EVS_MakeEntities) = { Call(MakeEntity, Ref(Entity_Chest), -185, 60, -25, 0, 0, MAKE_ENTITY_END) - Call(AssignChestFlag, GF_TIK05_Chest_PowerSmash1) + Call(AssignChestFlag, GF_TIK05_Chest_PowerSmash) Call(AssignScript, Ref(N(EVS_OpenChest))) Call(MakeEntity, Ref(Entity_BrickBlock), 25, 50, 0, 0, MAKE_ENTITY_END) Call(AssignScript, Ref(N(EVS_BreakBlock_DropSpring))) diff --git a/src/world/area_tik/tik_14/tik_14_4_entity.c b/src/world/area_tik/tik_14/tik_14_4_entity.c index badf6bfb0c7..ebbea0de693 100644 --- a/src/world/area_tik/tik_14/tik_14_4_entity.c +++ b/src/world/area_tik/tik_14/tik_14_4_entity.c @@ -4,7 +4,7 @@ BombTrigger N(BombPos_Wall) = { .pos = { 35.0f, 0.0f, 45.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_OnBlast_Wall) = { diff --git a/src/world/area_tik/tik_15/tik_15_3_entity.c b/src/world/area_tik/tik_15/tik_15_3_entity.c index 4f355a2249e..f5785755231 100644 --- a/src/world/area_tik/tik_15/tik_15_3_entity.c +++ b/src/world/area_tik/tik_15/tik_15_3_entity.c @@ -4,7 +4,7 @@ BombTrigger N(BombPos_Wall) = { .pos = { -230.0f, -10.0f, 0.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_OnBlast_Wall) = { diff --git a/src/world/area_tik/tik_20/tik_20_2_main.c b/src/world/area_tik/tik_20/tik_20_2_main.c index 4a8ee89d38a..b711b5122ca 100644 --- a/src/world/area_tik/tik_20/tik_20_2_main.c +++ b/src/world/area_tik/tik_20/tik_20_2_main.c @@ -27,7 +27,7 @@ EvtScript N(EVS_BindExitTriggers) = { LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_yuka, .pos = { -190.0, 30.0, -85.0 }}, { .colliderID = COLLIDER_yuka2, .pos = { 200.0, 30.0, -70.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; #define DROPLET_MODEL MODEL_sizuku diff --git a/src/world/area_trd/trd_02/trd_02_1_main.c b/src/world/area_trd/trd_02/trd_02_1_main.c index 03a2486b59c..7299edb557a 100644 --- a/src/world/area_trd/trd_02/trd_02_1_main.c +++ b/src/world/area_trd/trd_02/trd_02_1_main.c @@ -120,7 +120,7 @@ EvtScript N(EVS_Scene_LowerStairs) = { BombTrigger N(D_8024240C_9A33EC) = { .pos = { 255.0f, 50.0f, -80.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(D_8024241C_9A33FC) = { diff --git a/src/world/area_trd/trd_03/trd_03_1_main.c b/src/world/area_trd/trd_03/trd_03_1_main.c index 9fc069f3a33..3c1bd5168e3 100644 --- a/src/world/area_trd/trd_03/trd_03_1_main.c +++ b/src/world/area_trd/trd_03/trd_03_1_main.c @@ -76,12 +76,12 @@ EvtScript N(EVS_EnterMap) = { BombTrigger N(BombPos_MiddleCell) = { .pos = { -160.0f, 0.0f, -10.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(BombPos_RightCell) = { .pos = { 360.0f, 0.0f, -10.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_BombWall_MiddleCell) = { diff --git a/src/world/area_trd/trd_05/trd_05_1_main.c b/src/world/area_trd/trd_05/trd_05_1_main.c index d4913e0a92f..abd4509feb4 100644 --- a/src/world/area_trd/trd_05/trd_05_1_main.c +++ b/src/world/area_trd/trd_05/trd_05_1_main.c @@ -56,7 +56,7 @@ EvtScript N(EVS_EnterMap) = { BombTrigger N(BombPos_Wall) = { .pos = { 300.0f, 0.0f, 0.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_BombWall) = { diff --git a/src/world/area_trd/trd_06/trd_06_1_main.c b/src/world/area_trd/trd_06/trd_06_1_main.c index 1cfaab2fb4f..8708a52ef13 100644 --- a/src/world/area_trd/trd_06/trd_06_1_main.c +++ b/src/world/area_trd/trd_06/trd_06_1_main.c @@ -41,7 +41,7 @@ EvtScript N(EVS_EnterMap) = { BombTrigger N(BombPos_CellWall) = { .pos = { 160.0f, 0.0f, 160.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_BombWall_Cell) = { diff --git a/src/world/area_trd/trd_07/trd_07_3_magic_doors.c b/src/world/area_trd/trd_07/trd_07_3_magic_doors.c index 8b9add7f765..108e24974d4 100644 --- a/src/world/area_trd/trd_07/trd_07_3_magic_doors.c +++ b/src/world/area_trd/trd_07/trd_07_3_magic_doors.c @@ -7,10 +7,10 @@ API_CALLABLE(N(GetPointsWithCamRelativeOffset)) { f32 posZ = evt_get_float_variable(script, *args++); f32 angle = evt_get_float_variable(script, *args++); - script->varTable[0] = Float_TO_FIXED(posX + (sin_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 270.0f)) * 1000.0f)); - script->varTable[1] = Float_TO_FIXED(posZ - (cos_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 270.0f)) * 1000.0f)); - script->varTable[2] = Float_TO_FIXED(posX + (sin_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 90.0f)) * 1000.0f)); - script->varTable[3] = Float_TO_FIXED(posZ - (cos_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 90.0f)) * 1000.0f)); + script->varTable[0] = FLOAT_TO_FIXED(posX + (sin_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 270.0f)) * 1000.0f)); + script->varTable[1] = FLOAT_TO_FIXED(posZ - (cos_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 270.0f)) * 1000.0f)); + script->varTable[2] = FLOAT_TO_FIXED(posX + (sin_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 90.0f)) * 1000.0f)); + script->varTable[3] = FLOAT_TO_FIXED(posZ - (cos_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 90.0f)) * 1000.0f)); return ApiStatus_DONE2; } diff --git a/src/world/area_trd/trd_09/trd_09_2_entity.c b/src/world/area_trd/trd_09/trd_09_2_entity.c index 7d13cff9451..119ecc4f375 100644 --- a/src/world/area_trd/trd_09/trd_09_2_entity.c +++ b/src/world/area_trd/trd_09/trd_09_2_entity.c @@ -9,7 +9,7 @@ EvtScript N(EVS_BombRock) = { EvtScript N(EVS_MakeEntities) = { IfEq(GF_TRD09_BombedRock, FALSE) - Call(MakeEntity, Ref(Entity_BombableRock2), -470, -75, 139, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BombableRockWide), -470, -75, 139, 0, MAKE_ENTITY_END) Call(AssignScript, Ref(N(EVS_BombRock))) EndIf Call(MakeEntity, Ref(Entity_HeartBlock), 1400, -15, 135, 0, MAKE_ENTITY_END) diff --git a/src/world/common/complete/Quizmo.inc.c b/src/world/common/complete/Quizmo.inc.c index 3dfc464536d..6d4236aba49 100644 --- a/src/world/common/complete/Quizmo.inc.c +++ b/src/world/common/complete/Quizmo.inc.c @@ -11,22 +11,22 @@ #define QUIZMO_ANIMS \ { \ - ANIM_ChuckQuizmo_Idle, \ - ANIM_ChuckQuizmo_Walk, \ - ANIM_ChuckQuizmo_Run, \ - ANIM_ChuckQuizmo_Run, \ - ANIM_ChuckQuizmo_Idle, \ - ANIM_ChuckQuizmo_Idle, \ - ANIM_ChuckQuizmo_Still, \ - ANIM_ChuckQuizmo_Still, \ - ANIM_ChuckQuizmo_Run, \ - ANIM_ChuckQuizmo_Run, \ - ANIM_ChuckQuizmo_Run, \ - ANIM_ChuckQuizmo_Run, \ - ANIM_ChuckQuizmo_Run, \ - ANIM_ChuckQuizmo_Run, \ - ANIM_ChuckQuizmo_Run, \ - ANIM_ChuckQuizmo_Run, \ + .idle = ANIM_ChuckQuizmo_Idle, \ + .walk = ANIM_ChuckQuizmo_Walk, \ + .run = ANIM_ChuckQuizmo_Run, \ + .chase = ANIM_ChuckQuizmo_Run, \ + .anim_4 = ANIM_ChuckQuizmo_Idle, \ + .anim_5 = ANIM_ChuckQuizmo_Idle, \ + .death = ANIM_ChuckQuizmo_Still, \ + .hit = ANIM_ChuckQuizmo_Still, \ + .anim_8 = ANIM_ChuckQuizmo_Run, \ + .anim_9 = ANIM_ChuckQuizmo_Run, \ + .anim_A = ANIM_ChuckQuizmo_Run, \ + .anim_B = ANIM_ChuckQuizmo_Run, \ + .anim_C = ANIM_ChuckQuizmo_Run, \ + .anim_D = ANIM_ChuckQuizmo_Run, \ + .anim_E = ANIM_ChuckQuizmo_Run, \ + .anim_F = ANIM_ChuckQuizmo_Run, \ } extern s16 MessagePlural; @@ -455,7 +455,7 @@ API_CALLABLE(N(Quizmo_GetCamVfov)) { Bytecode* args = script->ptrReadPos; s32 cameraID = evt_get_variable(script, *args++); - evt_set_variable(script, *args++, Float_TO_FIXED(gCameras[cameraID].vfov)); + evt_set_variable(script, *args++, FLOAT_TO_FIXED(gCameras[cameraID].vfov)); return ApiStatus_DONE2; } diff --git a/src/world/common/enemy/HeartPlant.inc.c b/src/world/common/enemy/HeartPlant.inc.c index 227caf662c9..1edda0d3c4c 100644 --- a/src/world/common/enemy/HeartPlant.inc.c +++ b/src/world/common/enemy/HeartPlant.inc.c @@ -48,9 +48,6 @@ NpcSettings N(NpcSettings_HeartPlant) = { .onInteract = &N(EVS_NpcInteract_HeartPlant), }; -#define HEART_PLANT_NPC_DATA \ - .settings = &N(NpcSettings_HeartPlant), \ - .flags = ENEMY_FLAG_PASSIVE | ENEMY_FLAG_4 | ENEMY_FLAG_IGNORE_WORLD_COLLISION | ENEMY_FLAG_IGNORE_ENTITY_COLLISION | ENEMY_FLAG_FLYING | ENEMY_FLAG_8000 | ENEMY_FLAG_400000, \ - .drops = NO_DROPS, \ - .animations = HEART_PLANT_ANIMS, \ - .tattle = MSG_NpcTattle_HeartPlant, \ +#define HEART_PLANT_FLAGS \ + ENEMY_FLAG_PASSIVE | ENEMY_FLAG_4 | ENEMY_FLAG_IGNORE_WORLD_COLLISION | ENEMY_FLAG_IGNORE_ENTITY_COLLISION | \ + ENEMY_FLAG_FLYING | ENEMY_FLAG_8000 | ENEMY_FLAG_400000 diff --git a/src/world/common/enemy/HurtPlant.inc.c b/src/world/common/enemy/HurtPlant.inc.c index bfc881c9ea1..74c1e205b5a 100644 --- a/src/world/common/enemy/HurtPlant.inc.c +++ b/src/world/common/enemy/HurtPlant.inc.c @@ -67,10 +67,6 @@ AnimID N(ExtraAnims_HurtPlant)[] = { ANIM_LIST_END }; -#define HURT_PLANT_NPC_DATA \ - .settings = &N(NpcSettings_HurtPlant), \ - .flags = ENEMY_FLAG_PASSIVE | ENEMY_FLAG_IGNORE_WORLD_COLLISION | ENEMY_FLAG_IGNORE_ENTITY_COLLISION | ENEMY_FLAG_FLYING | ENEMY_FLAG_8000 | ENEMY_FLAG_400000, \ - .drops = HURT_PLANT_DROPS, \ - .animations = HURT_PLANT_ANIMS, \ - .extraAnimations = N(ExtraAnims_HurtPlant), \ - .tattle = MSG_NpcTattle_HeartPlant, \ +#define HURT_PLANT_FLAGS \ + ENEMY_FLAG_PASSIVE | ENEMY_FLAG_IGNORE_WORLD_COLLISION | ENEMY_FLAG_IGNORE_ENTITY_COLLISION | \ + ENEMY_FLAG_FLYING | ENEMY_FLAG_8000 | ENEMY_FLAG_400000 diff --git a/src/world/common/enemy/MBush.inc.c b/src/world/common/enemy/MBush.inc.c index 93378293e3a..2fe36060961 100644 --- a/src/world/common/enemy/MBush.inc.c +++ b/src/world/common/enemy/MBush.inc.c @@ -95,9 +95,6 @@ NpcSettings N(NpcSettings_MBush) = { .onDefeat = &N(EVS_NpcDefeat_MBush), }; -#define MBUSH_NPC_DATA \ - .settings = &N(NpcSettings_MBush), \ - .flags = ENEMY_FLAG_PASSIVE | ENEMY_FLAG_IGNORE_WORLD_COLLISION | ENEMY_FLAG_IGNORE_ENTITY_COLLISION | ENEMY_FLAG_FLYING | ENEMY_FLAG_8000 | ENEMY_FLAG_400000, \ - .drops = MBUSH_DROPS, \ - .animations = MBUSH_ANIMS, \ - .tattle = MSG_NpcTattle_MBush, \ +#define MBUSH_FLAGS \ + ENEMY_FLAG_PASSIVE | ENEMY_FLAG_IGNORE_WORLD_COLLISION | ENEMY_FLAG_IGNORE_ENTITY_COLLISION | \ + ENEMY_FLAG_FLYING | ENEMY_FLAG_8000 | ENEMY_FLAG_400000 diff --git a/src/world/common/enemy/SpearGuy_Wander.inc.c b/src/world/common/enemy/SpearGuy_Wander.inc.c index 189ff242d9e..05e0b70113a 100644 --- a/src/world/common/enemy/SpearGuy_Wander.inc.c +++ b/src/world/common/enemy/SpearGuy_Wander.inc.c @@ -90,10 +90,3 @@ NpcSettings N(NpcSettings_SpearGuy_Hitbox) = { .onDefeat = &N(EVS_NpcDefeat_SpearGuy_Hitbox), .actionFlags = AI_ACTION_08, }; - -#define SPEAR_GUY_WANDER_NPC_DATA \ - .settings = &N(NpcSettings_SpearGuy_Wander), \ - .drops = SPEAR_GUY_DROPS, \ - .animations = SPEAR_GUY_ANIMS, \ - .extraAnimations = N(ExtraAnims_SpearGuy), \ - .aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION, \ diff --git a/src/world/common/enemy/ai/FlyingAI.inc.c b/src/world/common/enemy/ai/FlyingAI.inc.c index 23f2fbbede7..2d427a3c20f 100644 --- a/src/world/common/enemy/ai/FlyingAI.inc.c +++ b/src/world/common/enemy/ai/FlyingAI.inc.c @@ -207,19 +207,19 @@ void N(FlyingAI_Loiter)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVo if (enemy->varTable[1] > 0) { f32 undulateAmplitude = (f32)enemy->varTable[1] / 100.0; f32 undulateAmount = sin_deg(enemy->varTable[2]); - s32 hitResult; + s32 hasCollision; if (npc->flags & NPC_FLAG_FLYING) { - hitResult = FALSE; + hasCollision = FALSE; } else { posX = npc->pos.x; posY = npc->pos.y; posZ = npc->pos.z; posW = 1000.0f; - hitResult = npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW); + hasCollision = npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW); } - if (hitResult) { + if (hasCollision) { npc->pos.y = posY + hoverHeight + (undulateAmount * undulateAmplitude); } else { npc->pos.y = temp_f26 + (undulateAmount * undulateAmplitude); diff --git a/src/world/common/npc/Dryite.h b/src/world/common/npc/Dryite.h index 0d5e5dfda89..7d8887a304d 100644 --- a/src/world/common/npc/Dryite.h +++ b/src/world/common/npc/Dryite.h @@ -3,80 +3,80 @@ #define DRYITE_GREEN_ANIMS \ { \ - ANIM_Dryite_Green_Idle, \ - ANIM_Dryite_Green_Walk, \ - ANIM_Dryite_Green_Run, \ - ANIM_Dryite_Green_Run, \ - ANIM_Dryite_Green_Idle, \ - ANIM_Dryite_Green_Idle, \ - ANIM_Dryite_Green_Still, \ - ANIM_Dryite_Green_Still, \ - ANIM_Dryite_Green_Idle, \ - ANIM_Dryite_Green_Idle, \ - ANIM_Dryite_Green_Idle, \ - ANIM_Dryite_Green_Idle, \ - ANIM_Dryite_Green_Idle, \ - ANIM_Dryite_Green_Idle, \ - ANIM_Dryite_Green_Idle, \ - ANIM_Dryite_Green_Idle, \ + .idle = ANIM_Dryite_Green_Idle, \ + .walk = ANIM_Dryite_Green_Walk, \ + .run = ANIM_Dryite_Green_Run, \ + .chase = ANIM_Dryite_Green_Run, \ + .anim_4 = ANIM_Dryite_Green_Idle, \ + .anim_5 = ANIM_Dryite_Green_Idle, \ + .death = ANIM_Dryite_Green_Still, \ + .hit = ANIM_Dryite_Green_Still, \ + .anim_8 = ANIM_Dryite_Green_Idle, \ + .anim_9 = ANIM_Dryite_Green_Idle, \ + .anim_A = ANIM_Dryite_Green_Idle, \ + .anim_B = ANIM_Dryite_Green_Idle, \ + .anim_C = ANIM_Dryite_Green_Idle, \ + .anim_D = ANIM_Dryite_Green_Idle, \ + .anim_E = ANIM_Dryite_Green_Idle, \ + .anim_F = ANIM_Dryite_Green_Idle, \ } #define DRYITE_BROWN_ANIMS \ { \ - ANIM_Dryite_Brown_Idle, \ - ANIM_Dryite_Brown_Walk, \ - ANIM_Dryite_Brown_Run, \ - ANIM_Dryite_Brown_Run, \ - ANIM_Dryite_Brown_Idle, \ - ANIM_Dryite_Brown_Idle, \ - ANIM_Dryite_Brown_Still, \ - ANIM_Dryite_Brown_Still, \ - ANIM_Dryite_Brown_Idle, \ - ANIM_Dryite_Brown_Idle, \ - ANIM_Dryite_Brown_Idle, \ - ANIM_Dryite_Brown_Idle, \ - ANIM_Dryite_Brown_Idle, \ - ANIM_Dryite_Brown_Idle, \ - ANIM_Dryite_Brown_Idle, \ - ANIM_Dryite_Brown_Idle, \ + .idle = ANIM_Dryite_Brown_Idle, \ + .walk = ANIM_Dryite_Brown_Walk, \ + .run = ANIM_Dryite_Brown_Run, \ + .chase = ANIM_Dryite_Brown_Run, \ + .anim_4 = ANIM_Dryite_Brown_Idle, \ + .anim_5 = ANIM_Dryite_Brown_Idle, \ + .death = ANIM_Dryite_Brown_Still, \ + .hit = ANIM_Dryite_Brown_Still, \ + .anim_8 = ANIM_Dryite_Brown_Idle, \ + .anim_9 = ANIM_Dryite_Brown_Idle, \ + .anim_A = ANIM_Dryite_Brown_Idle, \ + .anim_B = ANIM_Dryite_Brown_Idle, \ + .anim_C = ANIM_Dryite_Brown_Idle, \ + .anim_D = ANIM_Dryite_Brown_Idle, \ + .anim_E = ANIM_Dryite_Brown_Idle, \ + .anim_F = ANIM_Dryite_Brown_Idle, \ } #define DRYITE_BLUE_ANIMS \ { \ - ANIM_Dryite_Blue_Idle, \ - ANIM_Dryite_Blue_Walk, \ - ANIM_Dryite_Blue_Run, \ - ANIM_Dryite_Blue_Run, \ - ANIM_Dryite_Blue_Idle, \ - ANIM_Dryite_Blue_Idle, \ - ANIM_Dryite_Blue_Still, \ - ANIM_Dryite_Blue_Still, \ - ANIM_Dryite_Blue_Idle, \ - ANIM_Dryite_Blue_Idle, \ - ANIM_Dryite_Blue_Idle, \ - ANIM_Dryite_Blue_Idle, \ - ANIM_Dryite_Blue_Idle, \ - ANIM_Dryite_Blue_Idle, \ - ANIM_Dryite_Blue_Idle, \ - ANIM_Dryite_Blue_Idle, \ + .idle = ANIM_Dryite_Blue_Idle, \ + .walk = ANIM_Dryite_Blue_Walk, \ + .run = ANIM_Dryite_Blue_Run, \ + .chase = ANIM_Dryite_Blue_Run, \ + .anim_4 = ANIM_Dryite_Blue_Idle, \ + .anim_5 = ANIM_Dryite_Blue_Idle, \ + .death = ANIM_Dryite_Blue_Still, \ + .hit = ANIM_Dryite_Blue_Still, \ + .anim_8 = ANIM_Dryite_Blue_Idle, \ + .anim_9 = ANIM_Dryite_Blue_Idle, \ + .anim_A = ANIM_Dryite_Blue_Idle, \ + .anim_B = ANIM_Dryite_Blue_Idle, \ + .anim_C = ANIM_Dryite_Blue_Idle, \ + .anim_D = ANIM_Dryite_Blue_Idle, \ + .anim_E = ANIM_Dryite_Blue_Idle, \ + .anim_F = ANIM_Dryite_Blue_Idle, \ } #define DRYITE_YELLOW_ANIMS \ { \ - ANIM_Dryite_Yellow_Idle, \ - ANIM_Dryite_Yellow_Walk, \ - ANIM_Dryite_Yellow_Run, \ - ANIM_Dryite_Yellow_Run, \ - ANIM_Dryite_Yellow_Idle, \ - ANIM_Dryite_Yellow_Idle, \ - ANIM_Dryite_Yellow_Still, \ - ANIM_Dryite_Yellow_Still, \ - ANIM_Dryite_Yellow_Idle, \ - ANIM_Dryite_Yellow_Idle, \ - ANIM_Dryite_Yellow_Idle, \ - ANIM_Dryite_Yellow_Idle, \ - ANIM_Dryite_Yellow_Idle, \ - ANIM_Dryite_Yellow_Idle, \ - ANIM_Dryite_Yellow_Idle, \ - ANIM_Dryite_Yellow_Idle, \ + .idle = ANIM_Dryite_Yellow_Idle, \ + .walk = ANIM_Dryite_Yellow_Walk, \ + .run = ANIM_Dryite_Yellow_Run, \ + .chase = ANIM_Dryite_Yellow_Run, \ + .anim_4 = ANIM_Dryite_Yellow_Idle, \ + .anim_5 = ANIM_Dryite_Yellow_Idle, \ + .death = ANIM_Dryite_Yellow_Still, \ + .hit = ANIM_Dryite_Yellow_Still, \ + .anim_8 = ANIM_Dryite_Yellow_Idle, \ + .anim_9 = ANIM_Dryite_Yellow_Idle, \ + .anim_A = ANIM_Dryite_Yellow_Idle, \ + .anim_B = ANIM_Dryite_Yellow_Idle, \ + .anim_C = ANIM_Dryite_Yellow_Idle, \ + .anim_D = ANIM_Dryite_Yellow_Idle, \ + .anim_E = ANIM_Dryite_Yellow_Idle, \ + .anim_F = ANIM_Dryite_Yellow_Idle, \ } diff --git a/src/world/common/npc/Mouser.h b/src/world/common/npc/Mouser.h index 75455a38866..786f1dec813 100644 --- a/src/world/common/npc/Mouser.h +++ b/src/world/common/npc/Mouser.h @@ -6,80 +6,80 @@ #define MOUSER_BLUE_ANIMS \ { \ - ANIM_Mouser_Blue_Idle, \ - ANIM_Mouser_Blue_Run, \ - ANIM_Mouser_Blue_Run, \ - ANIM_Mouser_Blue_Run, \ - ANIM_Mouser_Blue_Idle, \ - ANIM_Mouser_Blue_Idle, \ - ANIM_Mouser_Blue_Idle, \ - ANIM_Mouser_Blue_Idle, \ - ANIM_Mouser_Blue_Idle, \ - ANIM_Mouser_Blue_Idle, \ - ANIM_Mouser_Blue_Idle, \ - ANIM_Mouser_Blue_Idle, \ - ANIM_Mouser_Blue_Idle, \ - ANIM_Mouser_Blue_Idle, \ - ANIM_Mouser_Blue_Idle, \ - ANIM_Mouser_Blue_Idle, \ + .idle = ANIM_Mouser_Blue_Idle, \ + .walk = ANIM_Mouser_Blue_Run, \ + .run = ANIM_Mouser_Blue_Run, \ + .chase = ANIM_Mouser_Blue_Run, \ + .anim_4 = ANIM_Mouser_Blue_Idle, \ + .anim_5 = ANIM_Mouser_Blue_Idle, \ + .death = ANIM_Mouser_Blue_Idle, \ + .hit = ANIM_Mouser_Blue_Idle, \ + .anim_8 = ANIM_Mouser_Blue_Idle, \ + .anim_9 = ANIM_Mouser_Blue_Idle, \ + .anim_A = ANIM_Mouser_Blue_Idle, \ + .anim_B = ANIM_Mouser_Blue_Idle, \ + .anim_C = ANIM_Mouser_Blue_Idle, \ + .anim_D = ANIM_Mouser_Blue_Idle, \ + .anim_E = ANIM_Mouser_Blue_Idle, \ + .anim_F = ANIM_Mouser_Blue_Idle, \ } #define MOUSER_PURPLE_ANIMS \ { \ - ANIM_Mouser_Purple_Idle, \ - ANIM_Mouser_Purple_Run, \ - ANIM_Mouser_Purple_Run, \ - ANIM_Mouser_Purple_Idle, \ - ANIM_Mouser_Purple_Idle, \ - ANIM_Mouser_Purple_Idle, \ - ANIM_Mouser_Purple_Idle, \ - ANIM_Mouser_Purple_Idle, \ - ANIM_Mouser_Purple_Idle, \ - ANIM_Mouser_Purple_Idle, \ - ANIM_Mouser_Purple_Idle, \ - ANIM_Mouser_Purple_Idle, \ - ANIM_Mouser_Purple_Idle, \ - ANIM_Mouser_Purple_Idle, \ - ANIM_Mouser_Purple_Idle, \ - ANIM_Mouser_Purple_Idle, \ + .idle = ANIM_Mouser_Purple_Idle, \ + .walk = ANIM_Mouser_Purple_Run, \ + .run = ANIM_Mouser_Purple_Run, \ + .chase = ANIM_Mouser_Purple_Idle, \ + .anim_4 = ANIM_Mouser_Purple_Idle, \ + .anim_5 = ANIM_Mouser_Purple_Idle, \ + .death = ANIM_Mouser_Purple_Idle, \ + .hit = ANIM_Mouser_Purple_Idle, \ + .anim_8 = ANIM_Mouser_Purple_Idle, \ + .anim_9 = ANIM_Mouser_Purple_Idle, \ + .anim_A = ANIM_Mouser_Purple_Idle, \ + .anim_B = ANIM_Mouser_Purple_Idle, \ + .anim_C = ANIM_Mouser_Purple_Idle, \ + .anim_D = ANIM_Mouser_Purple_Idle, \ + .anim_E = ANIM_Mouser_Purple_Idle, \ + .anim_F = ANIM_Mouser_Purple_Idle, \ } #define MOUSTAFA_ANIMS \ { \ - ANIM_Moustafa_Idle, \ - ANIM_Moustafa_Idle, \ - ANIM_Moustafa_Run, \ - ANIM_Moustafa_Run, \ - ANIM_Moustafa_Idle, \ - ANIM_Moustafa_Idle, \ - ANIM_Moustafa_Idle, \ - ANIM_Moustafa_Idle, \ - ANIM_Moustafa_Idle, \ - ANIM_Moustafa_Idle, \ - ANIM_Moustafa_Idle, \ - ANIM_Moustafa_Idle, \ - ANIM_Moustafa_Idle, \ - ANIM_Moustafa_Idle, \ - ANIM_Moustafa_Idle, \ - ANIM_Moustafa_Idle, \ + .idle = ANIM_Moustafa_Idle, \ + .walk = ANIM_Moustafa_Idle, \ + .run = ANIM_Moustafa_Run, \ + .chase = ANIM_Moustafa_Run, \ + .anim_4 = ANIM_Moustafa_Idle, \ + .anim_5 = ANIM_Moustafa_Idle, \ + .death = ANIM_Moustafa_Idle, \ + .hit = ANIM_Moustafa_Idle, \ + .anim_8 = ANIM_Moustafa_Idle, \ + .anim_9 = ANIM_Moustafa_Idle, \ + .anim_A = ANIM_Moustafa_Idle, \ + .anim_B = ANIM_Moustafa_Idle, \ + .anim_C = ANIM_Moustafa_Idle, \ + .anim_D = ANIM_Moustafa_Idle, \ + .anim_E = ANIM_Moustafa_Idle, \ + .anim_F = ANIM_Moustafa_Idle, \ } #define DISGUISED_MOUSTAFA_ANIMS \ { \ - ANIM_DisguisedMoustafa_Idle, \ - ANIM_DisguisedMoustafa_Idle, \ - ANIM_DisguisedMoustafa_Idle, \ - ANIM_DisguisedMoustafa_Idle, \ - ANIM_DisguisedMoustafa_Idle, \ - ANIM_DisguisedMoustafa_Idle, \ - ANIM_DisguisedMoustafa_Idle, \ - ANIM_DisguisedMoustafa_Idle, \ - ANIM_DisguisedMoustafa_Idle, \ - ANIM_DisguisedMoustafa_Idle, \ - ANIM_DisguisedMoustafa_Idle, \ - ANIM_DisguisedMoustafa_Idle, \ - ANIM_DisguisedMoustafa_Idle, \ - ANIM_DisguisedMoustafa_Idle, \ - ANIM_DisguisedMoustafa_Idle, \ - ANIM_DisguisedMoustafa_Idle, \ + .idle = ANIM_DisguisedMoustafa_Idle, \ + .walk = ANIM_DisguisedMoustafa_Idle, \ + .run = ANIM_DisguisedMoustafa_Idle, \ + .chase = ANIM_DisguisedMoustafa_Idle, \ + .anim_4 = ANIM_DisguisedMoustafa_Idle, \ + .anim_5 = ANIM_DisguisedMoustafa_Idle, \ + .death = ANIM_DisguisedMoustafa_Idle, \ + .hit = ANIM_DisguisedMoustafa_Idle, \ + .anim_8 = ANIM_DisguisedMoustafa_Idle, \ + .anim_9 = ANIM_DisguisedMoustafa_Idle, \ + .anim_A = ANIM_DisguisedMoustafa_Idle, \ + .anim_B = ANIM_DisguisedMoustafa_Idle, \ + .anim_C = ANIM_DisguisedMoustafa_Idle, \ + .anim_D = ANIM_DisguisedMoustafa_Idle, \ + .anim_E = ANIM_DisguisedMoustafa_Idle, \ + .anim_F = ANIM_DisguisedMoustafa_Idle, \ } diff --git a/src/world/dead/area_flo/flo_03/flo_03_4_foliage.c b/src/world/dead/area_flo/flo_03/flo_03_4_foliage.c index 0a707f59a36..5c201906640 100644 --- a/src/world/dead/area_flo/flo_03/flo_03_4_foliage.c +++ b/src/world/dead/area_flo/flo_03/flo_03_4_foliage.c @@ -31,7 +31,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -208.0f, 0.0f, -182.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/dead/area_flo/flo_07/flo_07_3_npc.c b/src/world/dead/area_flo/flo_07/flo_07_3_npc.c index 960fc853e8c..eafe6202ee0 100644 --- a/src/world/dead/area_flo/flo_07/flo_07_3_npc.c +++ b/src/world/dead/area_flo/flo_07/flo_07_3_npc.c @@ -220,7 +220,7 @@ ShakeTreeConfig N(ShakeTree_CrystalTree) = { BombTrigger N(BombPos_CrystalTree) = { .pos = { -309.0f, 0.0f, 31.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/dead/area_flo/flo_08/flo_08_3_main.c b/src/world/dead/area_flo/flo_08/flo_08_3_main.c index 170fb456d7c..8bf3ce1a430 100644 --- a/src/world/dead/area_flo/flo_08/flo_08_3_main.c +++ b/src/world/dead/area_flo/flo_08/flo_08_3_main.c @@ -22,7 +22,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o158, .pos = { -540.0, 0.0, 50.0 }}, { .colliderID = COLLIDER_o132, .pos = { 60.0, 0.0, 50.0 }}, { .colliderID = COLLIDER_o223, .pos = { 60.0, 0.0, 50.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/dead/area_flo/flo_08/flo_08_5_foliage.c b/src/world/dead/area_flo/flo_08/flo_08_5_foliage.c index 7955e91f6e0..1310cb101fd 100644 --- a/src/world/dead/area_flo/flo_08/flo_08_5_foliage.c +++ b/src/world/dead/area_flo/flo_08/flo_08_5_foliage.c @@ -31,7 +31,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 391.0f, 0.0f, -102.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/dead/area_flo/flo_09/flo_09_4_foliage.c b/src/world/dead/area_flo/flo_09/flo_09_4_foliage.c index 24467e8022a..84e75bc725d 100644 --- a/src/world/dead/area_flo/flo_09/flo_09_4_foliage.c +++ b/src/world/dead/area_flo/flo_09/flo_09_4_foliage.c @@ -65,7 +65,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { -200.0f, 0.0f, 1.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o4, MODEL_o5); @@ -79,7 +79,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = { BombTrigger N(BombPos_Tree2) = { .pos = { 0.0f, 0.0f, 1.0f }, - .radius = 0.0f + .diameter = 0.0f }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o14, MODEL_o15); @@ -93,7 +93,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = { BombTrigger N(BombPos_Tree3) = { .pos = { 200.0f, 0.0f, 1.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/dead/area_flo/flo_10/flo_10_7_foliage.c b/src/world/dead/area_flo/flo_10/flo_10_7_foliage.c index c5c8957ffe6..030e3b063de 100644 --- a/src/world/dead/area_flo/flo_10/flo_10_7_foliage.c +++ b/src/world/dead/area_flo/flo_10/flo_10_7_foliage.c @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = { BombTrigger N(BombPos_Tree1) = { .pos = { 137.0f, 0.0f, -283.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupFoliage) = { diff --git a/src/world/dead/area_flo/flo_14/flo_14_2_main.c b/src/world/dead/area_flo/flo_14/flo_14_2_main.c index b1aae776cb5..9875188688b 100644 --- a/src/world/dead/area_flo/flo_14/flo_14_2_main.c +++ b/src/world/dead/area_flo/flo_14/flo_14_2_main.c @@ -30,7 +30,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o153, .pos = { 410.0, 60.0, -95.0 }}, { .colliderID = COLLIDER_o154, .pos = { 550.0, 0.0, 50.0 }}, { .colliderID = COLLIDER_o158, .pos = { -50.0, 0.0, 110.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/dead/area_flo/flo_16/flo_16_2_main.c b/src/world/dead/area_flo/flo_16/flo_16_2_main.c index c4e311c5fd9..3f6c7e51011 100644 --- a/src/world/dead/area_flo/flo_16/flo_16_2_main.c +++ b/src/world/dead/area_flo/flo_16/flo_16_2_main.c @@ -19,7 +19,7 @@ EvtScript N(EVS_BindExitTriggers) = { LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o190, .pos = { -310.0, 0.0, 0.0 }}, { .colliderID = COLLIDER_o191, .pos = { 305.0, 100.0, 0.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/dead/area_flo/flo_17/flo_17_2_main.c b/src/world/dead/area_flo/flo_17/flo_17_2_main.c index f008fb92d58..d23be7430f9 100644 --- a/src/world/dead/area_flo/flo_17/flo_17_2_main.c +++ b/src/world/dead/area_flo/flo_17/flo_17_2_main.c @@ -38,7 +38,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o129, .pos = { 280.0, 0.0, 50.0 }}, { .colliderID = COLLIDER_o134, .pos = { 525.0, 0.0, -70.0 }}, { .colliderID = COLLIDER_o133, .pos = { 525.0, 0.0, 50.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/dead/area_flo/flo_18/flo_18_2_main.c b/src/world/dead/area_flo/flo_18/flo_18_2_main.c index de0d0f46567..a0f214ca5b5 100644 --- a/src/world/dead/area_flo/flo_18/flo_18_2_main.c +++ b/src/world/dead/area_flo/flo_18/flo_18_2_main.c @@ -20,7 +20,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o138, .pos = { -200.0, 0.0, 120.0 }}, { .colliderID = COLLIDER_o140, .pos = { 0.0, 0.0, 120.0 }}, { .colliderID = COLLIDER_o142, .pos = { 170.0, 0.0, 120.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/dead/area_flo/flo_18/flo_18_3_machine.c b/src/world/dead/area_flo/flo_18/flo_18_3_machine.c index 53c23f5b17c..96b1c77e908 100644 --- a/src/world/dead/area_flo/flo_18/flo_18_3_machine.c +++ b/src/world/dead/area_flo/flo_18/flo_18_3_machine.c @@ -628,22 +628,22 @@ EvtScript N(EVS_DamageMachine) = { BombTrigger N(Machine_BombTrigger_01) = { .pos = { 5.0f, 0.0f, -10.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(Machine_BombTrigger_02) = { .pos = { -5.0f, 0.0f, -20.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(Machine_BombTrigger_03) = { .pos = { 50.0f, 0.0f, -10.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(Machine_BombTrigger_04) = { .pos = { 105.0f, 0.0f, -10.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupMachine) = { diff --git a/src/world/dead/area_flo/flo_18/flo_18_4_npc.c b/src/world/dead/area_flo/flo_18/flo_18_4_npc.c index b55861e1338..3ba8201a528 100644 --- a/src/world/dead/area_flo/flo_18/flo_18_4_npc.c +++ b/src/world/dead/area_flo/flo_18/flo_18_4_npc.c @@ -467,22 +467,22 @@ EvtScript N(EVS_BombReaction_Lakitu_03) = { BombTrigger N(Npc_BombTrigger_01) = { .pos = { 5.0f, 0.0f, -10.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(Npc_BombTrigger_02) = { .pos = { -5.0f, 0.0f, -20.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(Npc_BombTrigger_03) = { .pos = { 50.0f, 0.0f, -10.0f }, - .radius = 0.0f + .diameter = 0.0f }; BombTrigger N(Npc_BombTrigger_04) = { .pos = { 105.0f, 0.0f, -10.0f }, - .radius = 0.0f + .diameter = 0.0f }; EvtScript N(EVS_SetupMachineDamageReactions) = { diff --git a/src/world/dead/area_kzn/kzn_11/kzn_11_1_main.c b/src/world/dead/area_kzn/kzn_11/kzn_11_1_main.c index d7062e29fa0..5ecc049ee55 100644 --- a/src/world/dead/area_kzn/kzn_11/kzn_11_1_main.c +++ b/src/world/dead/area_kzn/kzn_11/kzn_11_1_main.c @@ -49,7 +49,7 @@ LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o211, .pos = { -400.0, 20.0, 0.0 }}, { .colliderID = COLLIDER_o212, .pos = { 230.0, 20.0, 0.0 }}, { .colliderID = COLLIDER_o83, .pos = { 790.0, 20.0, 0.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/dead/area_kzn/kzn_18/kzn_18_1_main.c b/src/world/dead/area_kzn/kzn_18/kzn_18_1_main.c index 857626c5f96..e5df608a282 100644 --- a/src/world/dead/area_kzn/kzn_18/kzn_18_1_main.c +++ b/src/world/dead/area_kzn/kzn_18/kzn_18_1_main.c @@ -52,7 +52,7 @@ EvtScript N(EVS_StartTexPanners_Lava) = { LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o382, .pos = { 50.0, 200.0, -185.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_EnterMap) = { diff --git a/src/world/dead/area_kzn/kzn_20/kzn_20_2_main.c b/src/world/dead/area_kzn/kzn_20/kzn_20_2_main.c index aa269bfdca3..c488795198a 100644 --- a/src/world/dead/area_kzn/kzn_20/kzn_20_2_main.c +++ b/src/world/dead/area_kzn/kzn_20/kzn_20_2_main.c @@ -30,7 +30,7 @@ EvtScript N(EVS_UpdateTexPan_Lava) = { LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o919, .pos = { -30.0, 125.0, -15.0 }}, { .colliderID = COLLIDER_o870, .pos = { 30.0, 150.0, 0.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_DetermineLavaLevel) = { @@ -149,7 +149,7 @@ EvtScript N(EVS_UpdateLavaWaves) = { BombTrigger N(WeakWallBombTrigger) = { .pos = { 175.0, 150.0, 15.0 }, - .radius = 0.0 + .diameter = 0.0 }; EvtScript N(EVS_OnBreakWall) = { diff --git a/src/world/dead/area_kzn/kzn_22/kzn_22_2_main.c b/src/world/dead/area_kzn/kzn_22/kzn_22_2_main.c index 51742217b1d..186ce20e99e 100644 --- a/src/world/dead/area_kzn/kzn_22/kzn_22_2_main.c +++ b/src/world/dead/area_kzn/kzn_22/kzn_22_2_main.c @@ -133,7 +133,7 @@ EvtScript N(EVS_UpdateLavaLevel) = { LavaReset N(SafeFloorColliders)[] = { { .colliderID = COLLIDER_o582, .pos = { 200.0, 150.0, 180.0 }}, { .colliderID = COLLIDER_o357, .pos = { 200.0, 150.0, 180.0 }}, - { .colliderID = -1 } + { .colliderID = NO_COLLIDER } }; EvtScript N(EVS_Main) = { diff --git a/src/world/partner/bombette.c b/src/world/partner/bombette.c index 501ba389f08..b286df662d9 100644 --- a/src/world/partner/bombette.c +++ b/src/world/partner/bombette.c @@ -600,7 +600,7 @@ s32 N(test_first_strike)(Npc* bombette, Npc* enemy) { f32 x, y, z, dist; f32 angle, distance; f32 enemyRadius, blastRadius; - s32 hitResult; + s32 hasCollision; s32 enemyHit; if (!N(IsBlasting)) { @@ -633,9 +633,9 @@ s32 N(test_first_strike)(Npc* bombette, Npc* enemy) { x = bombette->pos.x; y = bombette->pos.y; z = bombette->pos.z; - hitResult = npc_test_move_taller_with_slipping(0, &x, &y, &z, distance, angle, 35.0f, 2.0f); + hasCollision = npc_test_move_taller_with_slipping(0, &x, &y, &z, distance, angle, 35.0f, 2.0f); - if (hitResult) { + if (hasCollision) { return FALSE; } diff --git a/src/world/partner/kooper.c b/src/world/partner/kooper.c index 0884ee2c3f3..a8284f5dad8 100644 --- a/src/world/partner/kooper.c +++ b/src/world/partner/kooper.c @@ -8,7 +8,6 @@ s32 entity_try_partner_interaction_trigger(s32); s32 test_item_entity_position(f32, f32, f32, f32); -s32 npc_raycast_up_corner(s32 ignoreFlags, f32* x, f32* y, f32* z, f32* length); void fx_damage_stars(s32, f32, f32, f32, f32, f32, f32, s32); void auto_collect_item_entity(s32); diff --git a/src/world/partner/lakilester.c b/src/world/partner/lakilester.c index 5adb4cf8615..b9e2b2588a9 100644 --- a/src/world/partner/lakilester.c +++ b/src/world/partner/lakilester.c @@ -259,7 +259,7 @@ s32 N(can_dismount)(void) { temp = hitResult; //TODO find better match - if (outLength <= 16.0f && temp >= 0) { + if (outLength <= 16.0f && temp > NO_COLLIDER) { if (!(temp & COLLISION_WITH_ENTITY_BIT) || (entityType = get_entity_type(temp), !(entityType == ENTITY_TYPE_SIMPLE_SPRING || entityType == ENTITY_TYPE_SCRIPT_SPRING)) diff --git a/src/world/partner/parakarry.c b/src/world/partner/parakarry.c index 093a255b755..94e3d8e1977 100644 --- a/src/world/partner/parakarry.c +++ b/src/world/partner/parakarry.c @@ -159,10 +159,10 @@ void N(try_cancel_tweester)(Npc* parakarry) { } } -s32 N(update_current_floor)(void) { +HitID N(update_current_floor)(void) { f32 x, y, z, length, hitRx, hitRz, hitDirX, hitDirZ; f32 colliderBaseHeight = gPlayerStatus.colliderHeight; - s32 hitResult; + HitID hitID; s32 surfaceType; x = gPlayerStatus.pos.x; @@ -170,17 +170,17 @@ s32 N(update_current_floor)(void) { z = gPlayerStatus.pos.z; length = colliderBaseHeight / 2.0f; - hitResult = player_raycast_below_cam_relative(&gPlayerStatus, &x, &y, &z, &length, &hitRx, + hitID = player_raycast_below_cam_relative(&gPlayerStatus, &x, &y, &z, &length, &hitRx, &hitRz, &hitDirX, &hitDirZ); - surfaceType = get_collider_flags(hitResult) & COLLIDER_FLAGS_SURFACE_TYPE_MASK; + surfaceType = get_collider_flags(hitID) & COLLIDER_FLAGS_SURFACE_TYPE_MASK; if (surfaceType == SURFACE_TYPE_SPIKES || surfaceType == SURFACE_TYPE_LAVA) { gPlayerStatus.hazardType = HAZARD_TYPE_SPIKES; gPlayerStatus.flags |= PS_FLAG_HIT_FIRE; N(AbilityState) = AIR_LIFT_DROP; } - return hitResult; + return hitID; } API_CALLABLE(N(UseAbility)) { diff --git a/src/world/partner/sushie.c b/src/world/partner/sushie.c index 5a631703ff6..bcf605244b3 100644 --- a/src/world/partner/sushie.c +++ b/src/world/partner/sushie.c @@ -298,7 +298,7 @@ void N(update_riding_physics)(Npc* sushie) { y = sushie->moveToPos.y; z = sushie->pos.z; depth = (sushie->collisionHeight * 0.5f) + playerStatus->colliderHeight; - if (npc_raycast_up_corners(sushie->collisionChannel, &x, &y, &z, &depth, sushie->yaw, sushie->collisionDiameter * 0.3f) >= 0) { + if (npc_raycast_up_corners(sushie->collisionChannel, &x, &y, &z, &depth, sushie->yaw, sushie->collisionDiameter * 0.3f) > NO_COLLIDER) { sushie->moveToPos.y += (((sushie->moveToPos.y - y) + depth) - ((sushie->collisionHeight * 0.5f) + playerStatus->colliderHeight)) * 0.2f; if (N(DiveTime) % 9 == 0) { fx_rising_bubble(0, sushie->pos.x, sushie->moveToPos.y + (sushie->collisionHeight * 0.5f), sushie->pos.z, @@ -328,23 +328,23 @@ void N(update_riding_physics)(Npc* sushie) { } } -s32 N(test_ray_to_wall_center)(s32 unused, f32* x, f32* y, f32* z, f32 length, f32 radius, f32* yaw) { +HitID N(test_ray_to_wall_center)(s32 unused, f32* x, f32* y, f32* z, f32 length, f32 radius, f32* yaw) { f32 sinAngle, cosAngle, totalLength; f32 hitX, hitY, hitZ; f32 hitNx, hitNy, hitNz; - s32 hitResult; + HitID hitID; sin_cos_rad(DEG_TO_RAD(*yaw), &sinAngle, &cosAngle); cosAngle = -cosAngle; totalLength = radius + length; - hitResult = test_ray_colliders(COLLIDER_FLAG_IGNORE_PLAYER, *x, *y, *z, sinAngle, 0.0f, cosAngle, + hitID = test_ray_colliders(COLLIDER_FLAG_IGNORE_PLAYER, *x, *y, *z, sinAngle, 0.0f, cosAngle, &hitX, &hitY, &hitZ, &totalLength, &hitNx, &hitNy, &hitNz); - if (hitResult >= 0) { + if (hitID >= 0) { *yaw = atan2(0.0f, 0.0f, hitNx, hitNz); } - return hitResult; + return hitID; } API_CALLABLE(N(UseAbility)) { diff --git a/src/world/partners.c b/src/world/partners.c index 90110a0ec63..92e8740afdd 100644 --- a/src/world/partners.c +++ b/src/world/partners.c @@ -1820,7 +1820,7 @@ void partner_flying_update_motion(Npc* partner) { z = partner->pos.z; hitDepth = partner->collisionHeight * 0.5f; - if (npc_raycast_up(0, &x, &y, &z, &hitDepth) != 0) { + if (npc_raycast_up(0, &x, &y, &z, &hitDepth)) { D_800F8020 = 1; wSavedPartnerPosX = partner->pos.x; wSavedPartnerPosY = partner->pos.y; diff --git a/src/world/script_api/push_blocks.c b/src/world/script_api/push_blocks.c index 5523e0067a9..0d5da7731d4 100644 --- a/src/world/script_api/push_blocks.c +++ b/src/world/script_api/push_blocks.c @@ -88,7 +88,7 @@ API_CALLABLE(FinishPushBlockMotion) { PushBlockGrid* grid = script->varTablePtr[10]; Entity* block = get_entity_by_index(script->varTable[11]); f32 hitX, hitY, hitZ, hitDepth; - s32 hitResult; + s32 hasCollision; s32 i, j; if (isInitialCall) { @@ -100,10 +100,10 @@ API_CALLABLE(FinishPushBlockMotion) { hitY = block->pos.y + 5.0f; hitDepth = 35.0f; - hitResult = npc_raycast_down_sides(0, &hitX, &hitY, &hitZ, &hitDepth); + hasCollision = npc_raycast_down_sides(0, &hitX, &hitY, &hitZ, &hitDepth); script->functionTemp[1] = hitDepth; - if (hitResult != 0 && hitDepth <= 6.0f) { + if (hasCollision && hitDepth <= 6.0f) { return ApiStatus_DONE2; } } diff --git a/tools/build/item_data.py b/tools/build/item_data.py index b6091e01a0c..40cc6291b39 100644 --- a/tools/build/item_data.py +++ b/tools/build/item_data.py @@ -194,7 +194,7 @@ def generate_hud_scripts(fout: TextIOWrapper, hud_scripts: List[ItemHudScriptEnt fout.write("HudScript HES_Item_CoinSparkleE = HES_COIN_SPARKLE( 1, -8);\n") fout.write("HudScript HES_Item_CoinSparkleRandom = HES_TEMPLATE_COIN_SPARKLE();\n") elif entry.name == "StarPoint": - fout.write("HudScript HES_Item_SmallStarPoint = HES_TEMPLATE_SMALL_STAR_POINT();\n") + fout.write("HudScript HES_SmallStarPoint = HES_TEMPLATE_SMALL_STAR_POINT();\n") fout.write("\n") fout.write("s32 pad_after_item_hudscripts[] = { 0, 0 };\n") diff --git a/tools/old/saved_flag_renames.txt b/tools/old/saved_flag_renames.txt index c19eb086afd..638ecefede5 100644 --- a/tools/old/saved_flag_renames.txt +++ b/tools/old/saved_flag_renames.txt @@ -401,7 +401,7 @@ GameFlag(399) GF_TIK02_Chest_ShrinkStomp GameFlag(400) GF_TIK03_ItemBlock_SnowmanDoll GameFlag(401) GF_TIK03_ItemBlock_CoinA GameFlag(402) GF_TIK03_ItemBlock_CoinB -GameFlag(403) GF_TIK05_Chest_PowerSmash1 +GameFlag(403) GF_TIK05_Chest_PowerSmash GameFlag(404) GF_TIK07_Item_StarPiece GameFlag(405) GF_TIK10_HiddenItem_CoinA GameFlag(406) GF_TIK10_HiddenItem_CoinB diff --git a/ver/ique/symbol_addrs.txt b/ver/ique/symbol_addrs.txt index b9b5055f3e8..7b845bf8ae0 100644 --- a/ver/ique/symbol_addrs.txt +++ b/ver/ique/symbol_addrs.txt @@ -4087,7 +4087,7 @@ level_up_ROM_START = 0x7E7990; starpoint_ROM_START = 0x7F13D0; world_model_anim_kzn_01_ROM_START = 0x7FE390; -HES_Item_SmallStarPoint = 0x8007FD28; +HES_SmallStarPoint = 0x8007FD28; gMoveTable = 0x8008DCC0; nuGfxZBuffer = 0x800991A8; gCurrentStagePtr = 0x800DA444; diff --git a/ver/jp/symbol_addrs.txt b/ver/jp/symbol_addrs.txt index 26ec259f6e9..410036585b6 100644 --- a/ver/jp/symbol_addrs.txt +++ b/ver/jp/symbol_addrs.txt @@ -1023,9 +1023,9 @@ fx_water_fountain = 0x80071AF0; // type:func rom:0x4CEF0 fx_gather_energy_pink = 0x8006FF90; // type:func rom:0x4B390 fx_firework_rocket = 0x80072510; // type:func rom:0x4D910 fx_smoke_impact = 0x80070350; // type:func rom:0x4B750 -gStaticScriptCounter = 0x802D9CA0; // rom:0x101E40 -gIsUpdatingScripts = 0x802D9CA4; // rom:0x101E44 -gGlobalTimeSpace = 0x802D9CA8; // rom:0x101E48 +UniqueScriptCounter = 0x802D9CA0; // rom:0x101E40 +IsUpdatingScripts = 0x802D9CA4; // rom:0x101E44 +GlobalTimeRate = 0x802D9CA8; // rom:0x101E48 sort_scripts = 0x802C3000; // type:func rom:0xEB1A0 gScriptIdList = 0x802DAA98; gCurrentScriptListPtr = 0x802DA890; @@ -1587,8 +1587,8 @@ ShowSweat = 0x802D7E08; // type:func rom:0xFFFA8 ShowSleepBubble = 0x802D8028; // type:func rom:0x1001C8 SetSleepBubbleTimeLeft = 0x802D8248; // type:func rom:0x1003E8 PlayEffect = 0x802D829C; // type:func rom:0x10043C -D_802D9D70 = 0x802D9D70; // rom:0x101F10 -D_802D9D71 = 0x802D9D71; // rom:0x101F11 +ReflectWallPrevAlpha = 0x802D9D70; // rom:0x101F10 +ReflectFloorPrevAlpha = 0x802D9D71; // rom:0x101F11 StarShrineLightBeamAlpha = 0x802D9D72; // rom:0x101F12 SetSpriteShading = 0x802D9700; // type:func rom:0x1018A0 EnableSpriteShading = 0x802D9A3C; // type:func rom:0x101BDC @@ -1810,16 +1810,16 @@ Entity_InertRedBlock = 0x802E5050; // rom:0x10B930 Entity_BrickBlock = 0x802E5074; // rom:0x10B954 Entity_MulticoinBlock = 0x802E5098; // rom:0x10B978 Entity_Hammer1Block = 0x802E50BC; // rom:0x10B99C -Entity_Hammer1Block_WideX = 0x802E50E0; // rom:0x10B9C0 -Entity_Hammer1Block_WideZ = 0x802E5104; // rom:0x10B9E4 +Entity_Hammer1BlockWideX = 0x802E50E0; // rom:0x10B9C0 +Entity_Hammer1BlockWideZ = 0x802E5104; // rom:0x10B9E4 Entity_Hammer1BlockTiny = 0x802E5128; // rom:0x10BA08 Entity_Hammer2Block = 0x802E514C; // rom:0x10BA2C -Entity_Hammer2Block_WideX = 0x802E5170; // rom:0x10BA50 -Entity_Hammer2Block_WideZ = 0x802E5194; // rom:0x10BA74 +Entity_Hammer2BlockWideX = 0x802E5170; // rom:0x10BA50 +Entity_Hammer2BlockWideZ = 0x802E5194; // rom:0x10BA74 Entity_Hammer2BlockTiny = 0x802E51B8; // rom:0x10BA98 Entity_Hammer3Block = 0x802E51DC; // rom:0x10BABC -Entity_Hammer3Block_WideX = 0x802E5200; // rom:0x10BAE0 -Entity_Hammer3Block_WideZ = 0x802E5224; // rom:0x10BB04 +Entity_Hammer3BlockWideX = 0x802E5200; // rom:0x10BAE0 +Entity_Hammer3BlockWideZ = 0x802E5224; // rom:0x10BB04 Entity_Hammer3BlockTiny = 0x802E5248; // rom:0x10BB28 Entity_PushBlock = 0x802E526C; // rom:0x10BB4C Entity_PowBlock = 0x802E5290; // rom:0x10BB70 diff --git a/ver/pal/undefined_syms.txt b/ver/pal/undefined_syms.txt index 7f0d4289b5b..881854150f3 100644 --- a/ver/pal/undefined_syms.txt +++ b/ver/pal/undefined_syms.txt @@ -256,10 +256,10 @@ EnemyNpcHit = 0x80074310; EnemyNpcDefeat = 0x8007443C; gEffectTable = 0x8007B5B0; HES_Item_CoinSparkleRandom = 0x8007D364; -HES_Item_Unused_08B = 0x8007E698; -HES_Item_Unused_08B_disabled = 0x8007E6C8; -HES_Item_Unused_08C = 0x8007E6F8; -HES_Item_Unused_08C_disabled = 0x8007E728; +HES_Item_Postcard = 0x8007E698; +HES_Item_Postcard_disabled = 0x8007E6C8; +HES_Item_EmptyBook = 0x8007E6F8; +HES_Item_EmptyBook_disabled = 0x8007E728; gItemTable = 0x80083C80; gItemHudScripts = 0x80086A20; gItemEntityScripts = 0x8008A174; diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index b121f3530b4..9631b49ef44 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -1387,7 +1387,7 @@ D_800778C0 = 0x800778C0; // rom:0x52CC0 D_800778C8 = 0x800778C8; // rom:0x52CC8 D_80077908 = 0x80077908; // rom:0x52D08 pause_frameBuffers = 0x80077950; // rom:0x52D50 -D_8007795C = 0x8007795C; // rom:0x52D5C +PauseOverlaySegment = 0x8007795C; // rom:0x52D5C fsFrameBuffers = 0x80077980; // rom:0x52D80 D_8007798C = 0x8007798C; // rom:0x52D8C IntroMessageIdx = 0x800779B0; // rom:0x52DB0 @@ -1472,7 +1472,7 @@ HES_Item_CoinSparkleD = 0x80080D94; // rom:0x5C194 HES_Item_CoinSparkleE = 0x80080EAC; // rom:0x5C2AC HES_Item_CoinSparkleRandom = 0x80080FC4; // rom:0x5C3C4 HES_Item_StarPoint = 0x80080FF0; // rom:0x5C3F0 -HES_Item_SmallStarPoint = 0x800810C8; // rom:0x5C4C8 +HES_SmallStarPoint = 0x800810C8; // rom:0x5C4C8 HES_Item_HeartPoint = 0x800811A0; // rom:0x5C5A0 HES_Item_FlowerPoint = 0x80081200; // rom:0x5C600 HES_Item_StarPiece = 0x80081260; // rom:0x5C660 @@ -1562,10 +1562,10 @@ HES_Item_Unused_089 = 0x80082238; // rom:0x5D638 HES_Item_Unused_089_disabled = 0x80082268; // rom:0x5D668 HES_Item_Unused_08A = 0x80082298; // rom:0x5D698 HES_Item_Unused_08A_disabled = 0x800822C8; // rom:0x5D6C8 -HES_Item_Unused_08B = 0x800822F8; // rom:0x5D6F8 -HES_Item_Unused_08B_disabled = 0x80082328; // rom:0x5D728 -HES_Item_Unused_08C = 0x80082358; // rom:0x5D758 -HES_Item_Unused_08C_disabled = 0x80082388; // rom:0x5D788 +HES_Item_Postcard = 0x800822F8; // rom:0x5D6F8 +HES_Item_Postcard_disabled = 0x80082328; // rom:0x5D728 +HES_Item_EmptyBook = 0x80082358; // rom:0x5D758 +HES_Item_EmptyBook_disabled = 0x80082388; // rom:0x5D788 HES_Item_Unused_08D = 0x800823B8; // rom:0x5D7B8 HES_Item_Unused_08D_disabled = 0x800823E8; // rom:0x5D7E8 HES_Item_Unused_08E = 0x80082418; // rom:0x5D818 @@ -2131,8 +2131,8 @@ IES_KootGlasses = 0x8008BDC4; // rom:0x671C4 IES_Letter = 0x8008BDE4; // rom:0x671E4 IES_Unused_089 = 0x8008BE04; // rom:0x67204 IES_Unused_08A = 0x8008BE24; // rom:0x67224 -IES_Unused_08B = 0x8008BE44; // rom:0x67244 -IES_Unused_08C = 0x8008BE64; // rom:0x67264 +IES_Postcard = 0x8008BE44; // rom:0x67244 +IES_EmptyBook = 0x8008BE64; // rom:0x67264 IES_Unused_08D = 0x8008BE84; // rom:0x67284 IES_Unused_08E = 0x8008BEA4; // rom:0x672A4 IES_Unused_08F = 0x8008BEC4; // rom:0x672C4 @@ -3781,7 +3781,7 @@ NpcHitQueryBehindLeftY = 0x8010C974; // rom:0xA5E24 NpcHitQueryColliderID = 0x8010C978; // rom:0xA5E28 JumpedOnSwitchZ = 0x8010C97C; // rom:0xA5E2C PlayerRunStateTime = 0x8010C980; // rom:0xA5E30 -D_8010C984 = 0x8010C984; // rom:0xA5E34 +StepUpLastYaw = 0x8010C984; // rom:0xA5E34 D_8010C988 = 0x8010C988; // rom:0xA5E38 NpcHitQueryAheadCollider = 0x8010C98C; // rom:0xA5E3C PlayerNormalPitch = 0x8010C990; // rom:0xA5E40 @@ -3828,8 +3828,8 @@ D_8010CFE0 = 0x8010CFE0; // rom:0xA6490 NextPartnerID = 0x8010CFE4; // rom:0xA6494 func_8010FD98 = 0x8010FD98; // type:func rom:0xA6498 wPartner = 0x8010CFEC; // rom:0xA649C -D_8010CFF0 = 0x8010CFF0; // rom:0xA64A0 -D_8010CFF4 = 0x8010CFF4; // rom:0xA64A4 +PrevTimeInAir = 0x8010CFF0; // rom:0xA64A0 +LandedTimeInAir = 0x8010CFF4; // rom:0xA64A4 D_8010CFF8 = 0x8010CFF8; // rom:0xA64A8 D_8010D000 = 0x8010D000; // rom:0xA64B0 D_8010D004 = 0x8010D004; // rom:0xA64B4 @@ -5520,17 +5520,17 @@ DemoReleaseButton = 0x802D9AF8; // type:func rom:0xFE4A8 DemoSetButtons = 0x802D9B34; // type:func rom:0xFE4E4 DemoJoystickRadial = 0x802D9B64; // type:func rom:0xFE514 DemoJoystickXY = 0x802D9C10; // type:func rom:0xFE5C0 -gStaticScriptCounter = 0x802D9CA0; // rom:0xFE650 -gIsUpdatingScripts = 0x802D9CA4; // rom:0xFE654 -gGlobalTimeSpace = 0x802D9CA8; // rom:0xFE658 +UniqueScriptCounter = 0x802D9CA0; // rom:0xFE650 +IsUpdatingScripts = 0x802D9CA4; // rom:0xFE654 +GlobalTimeRate = 0x802D9CA8; // rom:0xFE658 ShakeCam1 = 0x802D9CB0; // rom:0xFE660 ShakeCamX = 0x802D9CE8; // rom:0xFE698 playerNpc = 0x802D9D20; // rom:0xFE6D0 D_802D9D30 = 0x802D9D30; // rom:0xFE6E0 EVS_MusicEventMonitor = 0x802D9D34; // rom:0xFE6E4 EVS_UpdateMotionBlurParams = 0x802D9D50; // rom:0xFE700 -D_802D9D70 = 0x802D9D70; // rom:0xFE720 -D_802D9D71 = 0x802D9D71; // rom:0xFE721 +ReflectWallPrevAlpha = 0x802D9D70; // rom:0xFE720 +ReflectFloorPrevAlpha = 0x802D9D71; // rom:0xFE721 StarShrineLightBeamAlpha = 0x802D9D72; // rom:0xFE722 D_802D9D98 = 0x802D9D98; // rom:0xFE748 D_802D9DA8 = 0x802D9DA8; // rom:0xFE758