Object Cleanup (#1410)

* object cleanup

* namefixer

* objectPtr

* PR Review

* PR Review

* more uses of macro

* missed another one
This commit is contained in:
engineer124
2023-10-05 17:37:52 -03:00
committed by GitHub
parent ac8d49ea6f
commit e810559391
117 changed files with 600 additions and 592 deletions
+3 -3
View File
@@ -203,8 +203,8 @@ void EffectSsGFire_Spawn(PlayState* play, Vec3f* pos);
// void EffectSsLightning_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Color_RGBA8* pzParm3, Color_RGBA8* pzParm4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7, UNK_TYPE2 param_8);
void EffectSsDtBubble_SpawnColorProfile(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 life, s16 colorProfile, s16 randXZ);
void EffectSsDtBubble_SpawnCustomColor(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 life, s16 randXZ);
void EffectSsHahen_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 flags, s16 scale, s16 objId, s16 life, Gfx* dList);
void EffectSsHahen_SpawnBurst(PlayState* play, Vec3f* pos, f32 burstScale, s16 flags, s16 scale, s16 randScaleRange, s16 count, s16 objId, s16 life, Gfx* dList);
void EffectSsHahen_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 flags, s16 scale, s16 objectId, s16 life, Gfx* dList);
void EffectSsHahen_SpawnBurst(PlayState* play, Vec3f* pos, f32 burstScale, s16 flags, s16 scale, s16 randScaleRange, s16 count, s16 objectId, s16 life, Gfx* dList);
// void func_800B2364(void);
void EffectSsStick_Spawn(PlayState* play, Vec3f* pos, s16 yaw);
// void EffectSsSibuki_Spawn(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
@@ -215,7 +215,7 @@ void EffectSsHitmark_SpawnCustomScale(PlayState* play, s32 type, s16 scale, Vec3
void EffectSsFhgFlash_SpawnShock(PlayState* play, Actor* actor, Vec3f* pos, s16 scale, u8 params);
void EffectSsKFire_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scaleMax, u8 type);
void EffectSsSolderSrchBall_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16* playerDetected, s16 flags);
void EffectSsKakera_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* arg3, s16 gravity, s16 arg5, s16 arg6, s16 arg7, s16 arg8, s16 scale, s16 arg10, s16 arg11, s32 life, s16 colorIdx, s16 objId, Gfx* dList);
void EffectSsKakera_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* arg3, s16 gravity, s16 arg5, s16 arg6, s16 arg7, s16 arg8, s16 scale, s16 arg10, s16 arg11, s32 life, s16 colorIdx, s16 objectId, Gfx* dList);
// void EffectSsIcePiece_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, UNK_TYPE4 uParm3, Vec3f* pzParm4, Vec3f* param_5, UNK_TYPE4 param_6);
void EffectSsIcePiece_SpawnBurst(PlayState* play, Vec3f* refPos, f32 scale);
void func_800B2B44(PlayState* play, Actor* actor, Vec3f* pos, f32 scale);
+1 -1
View File
@@ -180,7 +180,7 @@ extern s16 gItemPrices[];
extern u16 gSceneIdsPerRegion[11][27];
extern u8 gPlayerFormItemRestrictions[PLAYER_FORM_MAX][114];
extern s16 gPlayerFormObjectIndices[PLAYER_FORM_MAX];
extern s16 gPlayerFormObjectIds[PLAYER_FORM_MAX];
extern ObjectId gObjectTableSize;
extern RomFile gObjectTable[OBJECT_ID_MAX];
+1 -1
View File
@@ -118,7 +118,7 @@ typedef struct Actor {
/* 0x004 */ u32 flags; // Flags used for various purposes
/* 0x008 */ PosRot home; // Initial position/rotation when spawned. Can be used for other purposes
/* 0x01C */ s16 params; // Configurable variable set by the actor's spawn data; original name: "args_data"
/* 0x01E */ s8 objBankIndex; // Object bank index of the actor's object dependency; original name: "bank"
/* 0x01E */ s8 objectSlot; // Object slot (in ObjectContext) corresponding to the actor's object; original name: "bank"
/* 0x01F */ s8 targetMode; // Controls how far the actor can be targeted from and how far it can stay locked on
/* 0x020 */ s16 halfDaysBits; // Bitmask indicating which half-days this actor is allowed to not be killed(?) (TODO: not sure how to word this). If the current halfDayBit is not part of this mask then the actor is killed when spawning the setup actors
/* 0x024 */ PosRot world; // Position/rotation in the world
+1 -1
View File
@@ -9,7 +9,7 @@ typedef struct KnobDoorActor {
/* 0x15C */ SkelAnime skelAnime;
/* 0x1A0 */ u8 animIndex;
/* 0x1A1 */ u8 playOpenAnim;
/* 0x1A2 */ s8 requiredObjBankIndex;
/* 0x1A2 */ s8 objectSlot;
/* 0x1A3 */ s8 dlIndex;
} KnobDoorActor; // size = 0x1A4
+1 -1
View File
@@ -33,7 +33,7 @@ struct CollisionPoly;
#define rgEnvColorG regs[8]
#define rgEnvColorB regs[9]
#define rgEnvColorA regs[10]
#define rgObjBankIndex regs[11]
#define rgObjectSlot regs[11]
typedef struct {
/* 0x0 */ u8 active;
+2
View File
@@ -472,6 +472,8 @@ typedef struct {
typedef RoomShapeCullableEntry PolygonDlist2;
typedef RoomShapeCullable PolygonType2;
#define OBJECT_SLOT_NONE -1
typedef struct {
/* 0x000 */ void* spaceStart;
/* 0x004 */ void* spaceEnd;
+2 -2
View File
@@ -147,8 +147,8 @@ s16 SubS_GetDistSqAndOrientPoints(Vec3f* vecA, Vec3f* vecB, f32* distSq);
s32 SubS_MoveActorToPoint(Actor* actor, Vec3f* point, s16 rotStep);
s16 SubS_GetDistSqAndOrientPath(Path* path, s32 pointIndex, Vec3f* pos, f32* distSq);
s8 SubS_IsObjectLoaded(s8 index, struct PlayState* play);
s8 SubS_GetObjectIndex(s16 id, struct PlayState* play);
s8 SubS_IsObjectLoaded(s8 objectSlot, struct PlayState* play);
s8 SubS_GetObjectSlot(s16 objectId, struct PlayState* play);
Actor* SubS_FindActor(struct PlayState* play, Actor* actorListStart, u8 actorCategory, s16 actorId);
+4 -4
View File
@@ -81,10 +81,10 @@ typedef struct EnHy {
/* 0x144 */ EnHyActionFunc actionFunc;
/* 0x148 */ EnHyActionFunc prevActionFunc;
/* 0x14C */ SkelAnime skelAnime;
/* 0x190 */ s8 headObjIndex; // Limb 15
/* 0x191 */ s8 skelUpperObjIndex; // Limbs 8-14
/* 0x192 */ s8 skelLowerObjIndex; // Limbs 1-7
/* 0x193 */ s8 animObjIndex;
/* 0x190 */ s8 headObjectSlot; // Limb 15
/* 0x191 */ s8 skelUpperObjectSlot; // Limbs 8-14
/* 0x192 */ s8 skelLowerObjectSlot; // Limbs 1-7
/* 0x193 */ s8 animObjectSlot;
/* 0x194 */ ColliderCylinder collider;
/* 0x1E0 */ u16 textId;
/* 0x1E2 */ u8 waitingOnInit;