Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions config/GM8P01_00/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1695,9 +1695,14 @@ MetroidPrime/Weapons/CElectricBeamProjectile.cpp:
.sdata2 start:0x8046F808 end:0x8046F820

MetroidPrime/Enemies/CRidley.cpp:
.text start:0x80241770 end:0x802497D4
.text start:0x80240E10 end:0x8024AF94
.ctors start:0x803B5078 end:0x803B507C
.rodata start:0x803BF608 end:0x803BFA50
.data start:0x803D16C8 end:0x803D1B90
.bss start:0x803F5300 end:0x803F5D38
.bss start:0x804344A4 end:0x804346B4 align:4 common
.sdata2 start:0x8046F83C end:0x8046F840
.sdata start:0x8046A3C8 end:0x8046A458
.sdata2 start:0x8046F820 end:0x8046F910

MetroidPrime/Enemies/CPuffer.cpp:
.text start:0x8024AF94 end:0x8024BB54
Expand Down
198 changes: 92 additions & 106 deletions config/GM8P01_00/symbols.txt

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,11 @@ def EquivalentFor(*versions):
Object(EquivalentFor("GM8E01_00"), "MetroidPrime/CSaveGameScreen.cpp"),
Object(MatchingFor("GM8E01_00", "GM8E01_01"), "MetroidPrime/Enemies/CAtomicBeta.cpp"),
Object(MatchingFor("GM8E01_00", "GM8E01_01"), "MetroidPrime/Weapons/CElectricBeamProjectile.cpp"),
Object(NonMatching, "MetroidPrime/Enemies/CRidley.cpp"),
Object(
NonMatching,
"MetroidPrime/Enemies/CRidley.cpp",
extra_cflags=['-pragma "inline_max_total_size(10000)"'],
),
Object(NonMatching, "MetroidPrime/Enemies/CPuffer.cpp"),
Object(
MatchingFor("GM8E01_00", "GM8E01_01"),
Expand Down
45 changes: 43 additions & 2 deletions include/MetroidPrime/Enemies/CRidley.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class CProjectedShadow;

class CRidleyData {
friend class CRidley;
#if VERSION < VERSION_GM8P_00 || VERSION == VERSION_GM8E_02
CAssetId x0_;
CAssetId x4_;
CAssetId x8_;
Expand All @@ -29,6 +30,7 @@ class CRidleyData {
CAssetId x1c_;
CAssetId x20_;
CAssetId x24_;
#endif
CAssetId x28_;
CAssetId x2c_;
CAssetId x30_;
Expand All @@ -41,6 +43,9 @@ class CRidleyData {
CBeamInfo x64_;
ushort xa8_;
CAssetId xac_;
#if VERSION >= VERSION_GM8P_00 && VERSION != VERSION_GM8E_02
CAssetId x88_;
#endif
CDamageInfo xb0_;
CCameraShakeData xcc_;
CAssetId x1a0_;
Expand All @@ -61,12 +66,16 @@ class CRidleyData {
float x3f4_;
ushort x3f8_;
CDamageInfo x3fc_;
#if VERSION >= VERSION_GM8P_00 && VERSION != VERSION_GM8E_02
CDamageInfo x3f4_bounceDamage;
#endif

public:
CRidleyData(CInputStream& in, int propCount);
};

CHECK_SIZEOF(CRidleyData, 0x418)
CHECK_SIZEOF(CRidleyData,
(VERSION >= VERSION_GM8P_00 && VERSION != VERSION_GM8E_02 ? 0x410 : 0x418))

class CRidley : public CPatterned {
public:
Expand Down Expand Up @@ -130,6 +139,13 @@ class CRidley : public CPatterned {
bool AIStage(CStateManager& mgr, float arg) override;
bool ShouldStrafe(CStateManager& mgr, float arg) override;
bool IsDizzy(CStateManager& mgr, float arg) override;
#if VERSION >= VERSION_GM8P_00 && VERSION != VERSION_GM8E_02
void TurnAround(CStateManager& mgr, EStateMsg msg, float arg) override;
void Bounce(CStateManager& mgr, EStateMsg msg, float arg) override;
bool BounceFind(CStateManager& mgr, float arg) override;
bool SpotPlayer(CStateManager& mgr, float arg) override;
bool AggressionCheck(CStateManager& mgr, float arg) override;
#endif

CRidley(TUniqueId uid, const rstl::string& name, const CEntityInfo& info, const CTransform4f& xf,
const CModelData& mData, const CPatternedInfo& pInfo, const CActorParameters& actParms,
Expand Down Expand Up @@ -195,7 +211,17 @@ class CRidley : public CPatterned {
bool xa34_24_ : 1;
bool xa34_25_ : 1;
bool xa34_26_ : 1;
#if VERSION >= VERSION_GM8P_00 && VERSION != VERSION_GM8E_02
bool xa34_27_ : 1;
bool xa34_28_ : 1;
bool xa34_29_ : 1;
bool xa34_30_jumpCanBeInterrupted : 1;
bool xa34_31_canBreakLockOn : 1;
bool xa35_24_hasPreviousBeamPos : 1;
bool xa35_25_inFlinch : 1;
#else
CModelData xa38_;
#endif
CTransform4f xa84_;
float xab4_;
float xab8_;
Expand Down Expand Up @@ -236,6 +262,9 @@ class CRidley : public CPatterned {
float xc08_;
float xc0c_;
float xc10_;
#if VERSION >= VERSION_GM8P_00 && VERSION != VERSION_GM8E_02
CProjectileInfo xbd0_projectileInfo;
#endif
CProjectileInfo xc14_;
CProjectileInfo xc3c_;
int xc64_aiStage;
Expand All @@ -246,10 +275,17 @@ class CRidley : public CPatterned {
float xc80_;
uint xc84_;
uint xc88_;
#if VERSION >= VERSION_GM8P_00 && VERSION != VERSION_GM8E_02
int xc70_meleeAttack;
#endif
CDamageInfo xc8c_;
CSfxHandle xca8_;
CSfxHandle xcac_;
#if VERSION >= VERSION_GM8P_00 && VERSION != VERSION_GM8E_02
int xcb0_;
#else
uint xcb0_;
#endif
uint xcb4_;
float xcb8_;
float xcbc_;
Expand All @@ -263,7 +299,11 @@ class CRidley : public CPatterned {
float xd08_;
CSfxHandle xd0c_;
rstl::single_ptr< CProjectedShadow > xd10_;
#if VERSION >= VERSION_GM8P_00 && VERSION != VERSION_GM8E_02
CVector3f xcfc_previousBeamPos;
#else
uint xd14_;
#endif

static const CDamageVulnerability skDirectNormal;
static const CDamageVulnerability skIceWeakness;
Expand All @@ -273,6 +313,7 @@ class CRidley : public CPatterned {
static const rstl::string skHead;
static const rstl::string skRoot;
};
CHECK_SIZEOF(CRidley, (VERSION >= VERSION_GM8P_00 ? 0xd28 : 0xD18))
CHECK_SIZEOF(CRidley,
(VERSION < VERSION_GM8P_00 ? 0xd18 : (VERSION == VERSION_GM8E_02 ? 0xd28 : 0xd08)))

#endif // _CRIDLEY
7 changes: 6 additions & 1 deletion include/MetroidPrime/Player/CPlayer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,14 +714,19 @@ class CPlayer : public CPhysicsActor, public TOneStatic< CPlayer > {
float xa14_envDmgCameraShakeTimer;
float xa18_phazonDamageLag;
float xa1c_threatOverride;
#if VERSION >= VERSION_GM8P_00 && VERSION != VERSION_GM8E_02
int xa30_phazonCollisionDelay[7];
int xa4c_phazonCollisionIndex;
#endif
float xa20_radarXYRadiusOverride;
float xa24_radarZRadiusOverride;
float xa28_attachedActorStruggle;
int xa2c_damageLoopSfxDelayTicks;
float xa30_samusExhaustedVoiceTimer;
};
NESTED_CHECK_SIZEOF(CPlayer, CPlayerStuckTracker, 0x2e0);
CHECK_SIZEOF(CPlayer, (VERSION >= VERSION_GM8P_00 ? 0xa48 : 0xa38))
CHECK_SIZEOF(CPlayer,
(VERSION < VERSION_GM8P_00 ? 0xa38 : (VERSION == VERSION_GM8E_02 ? 0xa48 : 0xa68)))

extern const bool gkAutoAim;
extern const bool gkAutoAimAtOrbitedObject;
Expand Down
6 changes: 5 additions & 1 deletion include/MetroidPrime/Weapons/CGameProjectile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ class CGameProjectile : public CWeapon {

bool GetWeaponActive() const { return x2e4_24_active; }
void DeleteProjectileLight(CStateManager&);


#if VERSION >= VERSION_GM8P_00
bool GetUnkPalFlag() const { return x2e4_29_unkPalFlag; }
#endif

void SetUnkPalFlag(bool active) {
#if VERSION >= VERSION_GM8P_00
x2e4_29_unkPalFlag = active;
Expand Down
Loading
Loading