Obj_Mine matched (#1225)

* Obj_Mine

* Obj_Mine

* Fixups

* Nonmatchings + cleanup

* Small cleanup

* externs

* structs complete

* wew

* some docs. still baffling

* documented physics stuff

* docs. physics be wack

* forgot some things

* format

* more cleanup

* merge and such

* format

* more format and cleanup

* asm stuff

* Update src/overlays/actors/ovl_Obj_Mine/z_obj_mine.c

Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>

* now with decomp.me

* removed some extraneous macros I didn't end up using

* fixes and formats

* merge

* my god, it matches

* format

* removed macros

* more fixes

* format

* format

---------

Co-authored-by: Maide <eeeedddccc@hotmail.co.uk>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: petrie911 <petrie911@users.noreply.github.com>
Co-authored-by: petrie911 <pmontag@Monday.localdomain>
Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
This commit is contained in:
petrie911 2024-04-06 12:40:41 -05:00 committed by GitHub
parent e3ce14c932
commit 45ae63ccc5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 1276 additions and 119 deletions

4
spec
View File

@ -2905,9 +2905,7 @@ beginseg
name "ovl_Obj_Mine"
compress
include "build/src/overlays/actors/ovl_Obj_Mine/z_obj_mine.o"
include "build/data/ovl_Obj_Mine/ovl_Obj_Mine.data.o"
include "build/data/ovl_Obj_Mine/ovl_Obj_Mine.bss.o"
include "build/data/ovl_Obj_Mine/ovl_Obj_Mine.reloc.o"
include "build/src/overlays/actors/ovl_Obj_Mine/ovl_Obj_Mine_reloc.o"
endseg
beginseg

File diff suppressed because it is too large Load Diff

View File

@ -7,11 +7,89 @@ struct ObjMine;
typedef void (*ObjMineActionFunc)(struct ObjMine*, PlayState*);
#define OBJMINE_GET_LINK_COUNT(thisx) ((thisx)->params & 0x3F)
#define OBJMINE_GET_PATH_INDEX(thisx) ((thisx)->params & 0xFF)
#define OBJMINE_GET_PATH_SPEED(thisx) (((thisx)->params >> 8) & 7)
#define OBJMINE_GET_TYPE(thisx) (((thisx)->params >> 12) & 3)
#define OBJMINE_PARAM(type, linkCount, pathIndex, pathSpeed) (((type) << 0xC) | ((type == OBJMINE_TYPE_PATH) ? ((pathIndex) | ((pathSpeed) << 8)) : (linkCount)))
#define OBJMINE_PATH_PARAM(pathIndex, pathSpeed) OBJMINE_PARAM(OBJMINE_TYPE_PATH, 0, pathIndex, pathSpeed)
#define OBJMINE_AIR_PARAM(linkCount) OBJMINE_PARAM(OBJMINE_TYPE_AIR, linkCount, 0, 0)
#define OBJMINE_WATER_PARAM(linkCount) OBJMINE_PARAM(OBJMINE_TYPE_WATER, linkCount, 0, 0)
#define OBJMINE_CHAIN_MAX 63
typedef enum {
/* 0 */ OBJMINE_TYPE_PATH,
/* 1 */ OBJMINE_TYPE_AIR,
/* 2 */ OBJMINE_TYPE_WATER
} ObjMineType;
typedef struct {
/* 0x00 */ Vec3f x;
/* 0x0C */ Vec3f y;
/* 0x18 */ Vec3f z;
} ObjMineMtxF3; // size = 0x24
typedef struct {
/* 0x0 */ s16 twist;
/* 0x2 */ s16 spin;
} ObjMineAirLink; // size = 0x4
typedef struct {
/* 0x00 */ ObjMineMtxF3 basis;
/* 0x24 */ Vec3f translation; // unused
/* 0x30 */ Vec2f displacement;
/* 0x38 */ Vec2f velocity;
/* 0x40 */ f32 restore;
/* 0x44 */ f32 drag;
/* 0x48 */ f32 knockback;
/* 0x4C */ s16 knockbackAngle;
/* 0x50 */ f32 swaySize;
/* 0x54 */ s16 swayPhase;
/* 0x58 */ f32 swayMax;
/* 0x5C */ f32 wallCheckDistSq;
/* 0x60 */ ObjMineAirLink links[OBJMINE_CHAIN_MAX];
} ObjMineAirChain; // size = 0x15C
typedef struct {
/* 0x00 */ ObjMineMtxF3 basis;
/* 0x24 */ Vec3f pos;
/* 0x30 */ Vec3f velocity;
/* 0x3C */ Vec3f accel;
} ObjMineWaterLink; // size = 0x48
typedef struct {
/* 0x00 */ f32 drag;
/* 0x04 */ Vec3f knockbackDir;
/* 0x10 */ f32 knockback;
/* 0x14 */ f32 swayXZ;
/* 0x18 */ f32 swayY;
/* 0x1C */ f32 swayMax;
/* 0x20 */ s16 swayPhaseVel;
/* 0x24 */ f32 restoreXZ;
/* 0x28 */ f32 maxY;
/* 0x2C */ f32 restY;
/* 0x30 */ f32 restoreY;
/* 0x34 */ f32 wallCheckDistSq;
/* 0x38 */ Vec2f wallEject;
/* 0x40 */ s8 touchWall;
/* 0x44 */ ObjMineWaterLink links[OBJMINE_CHAIN_MAX];
} ObjMineWaterChain; // size = 0x11FC
typedef struct ObjMine {
/* 0x0000 */ Actor actor;
/* 0x0144 */ char unk_144[0x60];
/* 0x0144 */ ColliderJntSph collider;
/* 0x0164 */ ColliderJntSphElement colliderElements[1];
/* 0x01A4 */ ObjMineActionFunc actionFunc;
/* 0x01A8 */ char unk_1A8[0x120C];
/* 0x01A8 */ f32 pathSpeed;
/* 0x01AC */ s32 waypointCount;
/* 0x01B0 */ s32 waypointIndex;
/* 0x01B4 */ Vec3s* waypoints;
/* 0x01B8 */ union {
ObjMineAirChain air;
ObjMineWaterChain water;
} chain;
} ObjMine; // size = 0x13B4
#endif // Z_OBJ_MINE_H

View File

@ -11150,53 +11150,53 @@
0x80A80508:("EnEgol_SpawnEffect",),
0x80A80750:("EnEgol_UpdateEffects",),
0x80A80904:("EnEgol_DrawEffects",),
0x80A811D0:("func_80A811D0",),
0x80A8120C:("func_80A8120C",),
0x80A81288:("func_80A81288",),
0x80A8131C:("func_80A8131C",),
0x80A81384:("func_80A81384",),
0x80A8140C:("func_80A8140C",),
0x80A8146C:("func_80A8146C",),
0x80A81544:("func_80A81544",),
0x80A81640:("func_80A81640",),
0x80A8164C:("func_80A8164C",),
0x80A81684:("func_80A81684",),
0x80A81714:("func_80A81714",),
0x80A81818:("func_80A81818",),
0x80A81868:("func_80A81868",),
0x80A819A4:("func_80A819A4",),
0x80A81A00:("func_80A81A00",),
0x80A81AA4:("func_80A81AA4",),
0x80A81B14:("func_80A81B14",),
0x80A81B7C:("func_80A81B7C",),
0x80A81D70:("func_80A81D70",),
0x80A81DEC:("func_80A81DEC",),
0x80A81E7C:("func_80A81E7C",),
0x80A81FFC:("func_80A81FFC",),
0x80A828A8:("func_80A828A8",),
0x80A82C28:("func_80A82C28",),
0x80A811D0:("ObjMine_Path_MoveToWaypoint",),
0x80A8120C:("ObjMine_GetUnitVec3f",),
0x80A81288:("ObjMine_GetUnitVec3fNorm",),
0x80A8131C:("ObjMine_Path_SpawnBomb",),
0x80A81384:("ObjMine_AirWater_SpawnBomb",),
0x80A8140C:("ObjMine_AirWater_CheckOC",),
0x80A8146C:("ObjMine_Air_CheckAC",),
0x80A81544:("ObjMine_Water_CheckAC",),
0x80A81640:("ObjMine_AirWater_Noop",),
0x80A8164C:("ObjMine_ReplaceTranslation",),
0x80A81684:("ObjMine_ReplaceRotation",),
0x80A81714:("ObjMine_StepUntilParallel",),
0x80A81818:("ObjMine_UpdateCollider",),
0x80A81868:("ObjMine_Air_InitChain",),
0x80A819A4:("ObjMine_Air_SetCollider",),
0x80A81A00:("ObjMine_Air_SetBasis",),
0x80A81AA4:("ObjMine_Air_SetWorld",),
0x80A81B14:("ObjMine_Air_SetChainXZ",),
0x80A81B7C:("ObjMine_Water_InitChain",),
0x80A81D70:("ObjMine_Water_SetCollider",),
0x80A81DEC:("ObjMine_Water_SetWorld",),
0x80A81E7C:("ObjMine_Water_WallCheck",),
0x80A81FFC:("ObjMine_Water_ApplyForces",),
0x80A828A8:("ObjMine_Water_UpdateLinks",),
0x80A82C28:("ObjMine_Water_UpdateChain",),
0x80A82C5C:("ObjMine_Init",),
0x80A82F58:("ObjMine_Destroy",),
0x80A82F84:("func_80A82F84",),
0x80A82F98:("func_80A82F98",),
0x80A82FA8:("func_80A82FA8",),
0x80A82FC8:("func_80A82FC8",),
0x80A83214:("func_80A83214",),
0x80A83258:("func_80A83258",),
0x80A832BC:("func_80A832BC",),
0x80A832D0:("func_80A832D0",),
0x80A83A74:("func_80A83A74",),
0x80A83A88:("func_80A83A88",),
0x80A83B14:("func_80A83B14",),
0x80A83B28:("func_80A83B28",),
0x80A83CEC:("func_80A83CEC",),
0x80A83D00:("func_80A83D00",),
0x80A83D8C:("ObjMine_Update",),
0x80A83E7C:("func_80A83E7C",),
0x80A83EA0:("ObjMine_Draw",),
0x80A83FBC:("func_80A83FBC",),
0x80A84088:("func_80A84088",),
0x80A84338:("func_80A84338",),
0x80A82F84:("ObjMine_Path_SetupStationary",),
0x80A82F98:("ObjMine_Path_Stationary",),
0x80A82FA8:("ObjMine_Path_SetupMove",),
0x80A82FC8:("ObjMine_Path_Move",),
0x80A83214:("ObjMine_SetupExplode",),
0x80A83258:("ObjMine_Explode",),
0x80A832BC:("ObjMine_Air_SetupChained",),
0x80A832D0:("ObjMine_Air_Chained",),
0x80A83A74:("ObjMine_Air_SetupStationary",),
0x80A83A88:("ObjMine_Air_Stationary",),
0x80A83B14:("ObjMine_Water_SetupChained",),
0x80A83B28:("ObjMine_Water_Chained",),
0x80A83CEC:("ObjMine_Water_SetupStationary",),
0x80A83D00:("ObjMine_Water_Stationary",),
0x80A83D8C:("ObjMine_Path_Update",),
0x80A83E7C:("ObjMine_AirWater_Update",),
0x80A83EA0:("ObjMine_Path_Draw",),
0x80A83FBC:("ObjMine_DrawExplosion",),
0x80A84088:("ObjMine_Air_Draw",),
0x80A84338:("ObjMine_Water_Draw",),
0x80A84CD0:("ObjPurify_SetSysMatrix",),
0x80A84CF8:("ObjPurify_IsPurified",),
0x80A84D68:("ObjPurify_Init",),

View File

@ -12111,7 +12111,7 @@
0x80A84698:("D_80A84698","f32","",0x4),
0x80A8469C:("D_80A8469C","f32","",0x4),
0x80A846A0:("D_80A846A0","f32","",0x4),
0x80A849D0:("D_80A849D0","UNK_TYPE4","",0x4),
0x80A849D0:("sLastLinkAccel","Vec3f[]","",0x4),
0x80A85460:("Obj_Purify_InitVars","UNK_TYPE1","",0x1),
0x80A85480:("ObjPurifyInfoList","UNK_TYPE1","",0x1),
0x80A854A0:("D_80A854A0","UNK_TYPE1","",0x1),