star rod dx upstreaming (#1177)

* so far

* leftover

* first batch

* part zwei

* item name changes

* misspelling

* comments

* THE

* fix pal

* muurgle

---------

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
HailSanta 2024-03-06 02:32:00 -05:00 committed by GitHub
parent 8d5b066b7d
commit e342a33a20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
231 changed files with 1012 additions and 973 deletions

20
.gitignore vendored
View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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

View File

@ -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),

View File

@ -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))

View File

@ -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];

View File

@ -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);

View File

@ -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;

View File

@ -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,

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -84,7 +84,7 @@ EnemyDrops DefaultEnemyDrops = {
{
.item = ITEM_MUSHROOM,
.weight = 50,
.unk_04 = -1,
.flagIdx = -1,
},
},
.heartDrops = {

View File

@ -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,

View File

@ -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,

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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();

View File

@ -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) {

View File

@ -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 }

View File

@ -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 }

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -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 ]

View File

@ -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();

View File

@ -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;
}
}

View File

@ -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) {

View File

@ -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;

View File

@ -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);
}

View File

@ -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);

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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,
},

View File

@ -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) = {

View File

@ -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,
},

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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;
}

View File

@ -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 },

View File

@ -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)

View File

@ -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) = {

View File

@ -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)

View File

@ -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)

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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,

View File

@ -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) = {

View File

@ -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"

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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;
}

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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) = {

View File

@ -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;
}

View File

@ -4,7 +4,7 @@
#include "world/common/todo/RemovePadlock.inc.c"
s32 N(PeachKeyList)[] = {
ITEM_PEACH_KEY1,
ITEM_PEACH_KEY,
ITEM_NONE
};

View File

@ -2,7 +2,7 @@
#include "entity.h"
s32 N(PeachKeyList)[] = {
ITEM_PEACH_KEY1,
ITEM_PEACH_KEY,
ITEM_NONE
};

View File

@ -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)

View File

@ -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))

Some files were not shown because too many files have changed in this diff Show More