Skip to content

Commit

Permalink
Match and link CFire, minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Antidote committed Dec 24, 2024
1 parent 1ec5a25 commit 8290186
Show file tree
Hide file tree
Showing 20 changed files with 197 additions and 81 deletions.
2 changes: 1 addition & 1 deletion config/GM8E01_00/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ MetroidPrime/Tweaks/CTweakGame.cpp:
.text start:0x800371E4 end:0x80037400
.data start:0x803D9CD0 end:0x803D9CE0

MetroidPrime/CGameProjectile.cpp:
MetroidPrime/Weapons/CGameProjectile.cpp:
.text start:0x80037400 end:0x8003A7A4
.rodata start:0x803CCE20 end:0x803CCE38
.data start:0x803D9CE0 end:0x803D9D50
Expand Down
25 changes: 12 additions & 13 deletions config/GM8E01_00/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10777,7 +10777,7 @@ __ct__7CPufferF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rs
AcceptScriptMsg__5CFireF20EScriptObjectMessage9TUniqueIdR13CStateManager = .text:0x8025CC24; // type:function size:0x80 scope:global
Think__5CFireFfR13CStateManager = .text:0x8025CCA4; // type:function size:0x24C scope:global
Accept__5CFireFR8IVisitor = .text:0x8025CEF0; // type:function size:0x38 scope:global
Render__5CFireCFRC13CStateManager = .text:0x8025CF28; // type:function size:0xEC scope:global
AddToRenderer__5CFireCFRC14CFrustumPlanesRC13CStateManager = .text:0x8025CF28; // type:function size:0xEC scope:global
GetTouchBounds__5CFireCFv = .text:0x8025D014; // type:function size:0x68 scope:global
Touch__5CFireFR6CActorR13CStateManager = .text:0x8025D07C; // type:function size:0xC4 scope:global
__dt__5CFireFv = .text:0x8025D140; // type:function size:0x9C scope:global
Expand Down Expand Up @@ -17543,7 +17543,7 @@ lbl_803D51F6 = .rodata:0x803D51F6; // type:object size:0xC data:string
lbl_803D5202 = .rodata:0x803D5202; // type:object size:0xC data:string
lbl_803D520E = .rodata:0x803D520E; // type:object size:0xC data:string
lbl_803D521A = .rodata:0x803D521A; // type:object size:0x16
lbl_803D5230 = .rodata:0x803D5230; // type:object size:0x10
@stringBase0 = .rodata:0x803D5230; // type:object size:0xC scope:local data:string_table
@stringBase0 = .rodata:0x803D5240; // type:object size:0x15 scope:local data:string_table
lbl_803D5258 = .rodata:0x803D5258; // type:object size:0x11 data:string
lbl_803D5269 = .rodata:0x803D5269; // type:object size:0xF
Expand Down Expand Up @@ -18051,7 +18051,7 @@ lbl_803D9CA8 = .data:0x803D9CA8; // type:object size:0x10
__vt__12CTweakPlayer = .data:0x803D9CB8; // type:object size:0xC scope:weak
__vt__12ITweakObject = .data:0x803D9CC4; // type:object size:0xC scope:weak
__vt__10CTweakGame = .data:0x803D9CD0; // type:object size:0xC scope:global
lbl_803D9CE0 = .data:0x803D9CE0; // type:object size:0x70
__vt__15CGameProjectile = .data:0x803D9CE0; // type:object size:0x70
kVerticalAngleTable = .data:0x803D9D50; // type:object size:0xC scope:global data:float
kHorizontalAngleTable = .data:0x803D9D5C; // type:object size:0xC scope:global
kVerticalVarianceTable = .data:0x803D9D68; // type:object size:0xC scope:global
Expand Down Expand Up @@ -18543,7 +18543,7 @@ jumptable_803E95A4 = .data:0x803E95A4; // type:object size:0xAC scope:local
skGasJetLocators = .data:0x803E9650; // type:object size:0x38 scope:global data:4byte
skGasLocators = .data:0x803E9688; // type:object size:0x38 scope:global data:4byte
__vt__7CPuffer = .data:0x803E96C0; // type:object size:0x2D0 scope:global
lbl_803E9990 = .data:0x803E9990; // type:object size:0x70
__vt__5CFire = .data:0x803E9990; // type:object size:0x6C
__vt__16CPauseScreenBlur = .data:0x803E9A00; // type:object size:0xC scope:global
lbl_803E9A10 = .data:0x803E9A10; // type:object size:0xC data:4byte
lbl_803E9A1C = .data:0x803E9A1C; // type:object size:0xC data:4byte
Expand Down Expand Up @@ -20987,8 +20987,8 @@ lbl_805A8378 = .sdata:0x805A8378; // type:object size:0x8
lbl_805A8380 = .sdata:0x805A8380; // type:object size:0x4 data:4byte
lbl_805A8384 = .sdata:0x805A8384; // type:object size:0x4 data:4byte
lbl_805A8388 = .sdata:0x805A8388; // type:object size:0x8 data:4byte
lbl_805A8390 = .sdata:0x805A8390; // type:object size:0x4 data:4byte
lbl_805A8394 = .sdata:0x805A8394; // type:object size:0x4 data:4byte
kSolidMat = .sdata:0x805A8390; // type:object size:0x4 scope:local data:4byte
kProjectileMat = .sdata:0x805A8394; // type:object size:0x4 scope:local data:4byte
@281 = .sdata:0x805A8398; // type:object size:0x4 scope:local data:float
@286 = .sdata:0x805A839C; // type:object size:0x4 scope:local data:float
lbl_805A83A0 = .sdata:0x805A83A0; // type:object size:0x4 data:4byte
Expand Down Expand Up @@ -25715,11 +25715,11 @@ lbl_805AD708 = .sdata2:0x805AD708; // type:object size:0x4 data:float
lbl_805AD70C = .sdata2:0x805AD70C; // type:object size:0x4 data:float
lbl_805AD710 = .sdata2:0x805AD710; // type:object size:0x4 data:float
lbl_805AD714 = .sdata2:0x805AD714; // type:object size:0x4 data:float
lbl_805AD718 = .sdata2:0x805AD718; // type:object size:0x4 data:float
lbl_805AD71C = .sdata2:0x805AD71C; // type:object size:0x4 data:float
lbl_805AD720 = .sdata2:0x805AD720; // type:object size:0x4 data:float
lbl_805AD724 = .sdata2:0x805AD724; // type:object size:0x4 data:float
lbl_805AD728 = .sdata2:0x805AD728; // type:object size:0x8 align:8 data:double
@429 = .sdata2:0x805AD718; // type:object size:0x4 scope:local data:float
@430 = .sdata2:0x805AD71C; // type:object size:0x4 scope:local data:float
@431 = .sdata2:0x805AD720; // type:object size:0x4 scope:local data:float
@432 = .sdata2:0x805AD724; // type:object size:0x4 scope:local data:float
@434 = .sdata2:0x805AD728; // type:object size:0x8 scope:local align:8 data:double
@395 = .sdata2:0x805AD730; // type:object size:0x4 scope:local data:float
@396 = .sdata2:0x805AD734; // type:object size:0x4 scope:local data:float
@454 = .sdata2:0x805AD738; // type:object size:0x4 scope:local data:float
Expand Down Expand Up @@ -26838,8 +26838,7 @@ lbl_805AEC80 = .sdata2:0x805AEC80; // type:object size:0x8 align:8 data:double
lbl_805AEC88 = .sdata2:0x805AEC88; // type:object size:0x8 align:8 data:double
@38 = .sdata2:0x805AEC90; // type:object size:0x4 scope:local data:4byte
lbl_805AEC98 = .sdata2:0x805AEC98; // type:object size:0x8 align:8 data:double
@150 = .sdata2:0x805AECA0; // type:object size:0x4 scope:local data:4byte
lbl_805AECA4 = .sdata2:0x805AECA4; // type:object size:0x1 data:byte
@150 = .sdata2:0x805AECA0; // type:object size:0x5 scope:local data:string
lbl_805AECA8 = .sdata2:0x805AECA8; // type:object size:0x8 align:8 data:double
lbl_805AECB0 = .sdata2:0x805AECB0; // type:object size:0x8 align:8 data:double
@136 = .sdata2:0x805AECB8; // type:object size:0x8 scope:local align:8 data:double
Expand Down
2 changes: 1 addition & 1 deletion config/GM8E01_01/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ MetroidPrime/Tweaks/CTweakGame.cpp:
.text start:0x80037260 end:0x8003747C
.data start:0x803D9EB0 end:0x803D9EC0

MetroidPrime/CGameProjectile.cpp:
MetroidPrime/Weapons/CGameProjectile.cpp:
.text start:0x8003747C end:0x8003A820
.rodata start:0x803CD000 end:0x803CD018
.data start:0x803D9EC0 end:0x803D9F30
Expand Down
20 changes: 10 additions & 10 deletions config/GM8E01_01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10777,7 +10777,7 @@ __ct__7CPufferF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rs
AcceptScriptMsg__5CFireF20EScriptObjectMessage9TUniqueIdR13CStateManager = .text:0x8025CCA0; // type:function size:0x80 scope:global
Think__5CFireFfR13CStateManager = .text:0x8025CD20; // type:function size:0x24C scope:global
Accept__5CFireFR8IVisitor = .text:0x8025CF6C; // type:function size:0x38 scope:global
Render__5CFireCFRC13CStateManager = .text:0x8025CFA4; // type:function size:0xEC scope:global
AddToRenderer__5CFireCFRC14CFrustumPlanesRC13CStateManager = .text:0x8025CFA4; // type:function size:0xEC scope:global
GetTouchBounds__5CFireCFv = .text:0x8025D090; // type:function size:0x68 scope:global
Touch__5CFireFR6CActorR13CStateManager = .text:0x8025D0F8; // type:function size:0xC4 scope:global
__dt__5CFireFv = .text:0x8025D1BC; // type:function size:0x9C scope:global
Expand Down Expand Up @@ -17581,7 +17581,7 @@ lbl_803D53D6 = .rodata:0x803D53D6; // type:object size:0xC data:string
lbl_803D53E2 = .rodata:0x803D53E2; // type:object size:0xC data:string
lbl_803D53EE = .rodata:0x803D53EE; // type:object size:0xC data:string
lbl_803D53FA = .rodata:0x803D53FA; // type:object size:0x16
lbl_803D5410 = .rodata:0x803D5410; // type:object size:0x10
@stringBase0 = .rodata:0x803D5410; // type:object size:0xC scope:local data:string_table
lbl_803D5420 = .rodata:0x803D5420; // type:object size:0x18
lbl_803D5438 = .rodata:0x803D5438; // type:object size:0x11 data:string
lbl_803D5449 = .rodata:0x803D5449; // type:object size:0xF
Expand Down Expand Up @@ -18578,7 +18578,7 @@ jumptable_803E9784 = .data:0x803E9784; // type:object size:0xAC scope:local
lbl_803E9830 = .data:0x803E9830; // type:object size:0x38 data:4byte
lbl_803E9868 = .data:0x803E9868; // type:object size:0x38 data:4byte
lbl_803E98A0 = .data:0x803E98A0; // type:object size:0x2D0
lbl_803E9B70 = .data:0x803E9B70; // type:object size:0x70
__vt__5CFire = .data:0x803E9B70; // type:object size:0x6C scope:local
__vt__16CPauseScreenBlur = .data:0x803E9BE0; // type:object size:0x10
lbl_803E9BF0 = .data:0x803E9BF0; // type:object size:0xC data:4byte
lbl_803E9BFC = .data:0x803E9BFC; // type:object size:0xC data:4byte
Expand Down Expand Up @@ -20891,8 +20891,8 @@ lbl_805A8558 = .sdata:0x805A8558; // type:object size:0x8
lbl_805A8560 = .sdata:0x805A8560; // type:object size:0x4 data:4byte
lbl_805A8564 = .sdata:0x805A8564; // type:object size:0x4 data:4byte
lbl_805A8568 = .sdata:0x805A8568; // type:object size:0x8 data:4byte
lbl_805A8570 = .sdata:0x805A8570; // type:object size:0x4 data:4byte
lbl_805A8574 = .sdata:0x805A8574; // type:object size:0x4 data:4byte
kSolidMat = .sdata:0x805A8570; // type:object size:0x4 scope:local data:4byte
kProjectileMat = .sdata:0x805A8574; // type:object size:0x4 scope:local data:4byte
lbl_805A8578 = .sdata:0x805A8578; // type:object size:0x4 data:float
lbl_805A857C = .sdata:0x805A857C; // type:object size:0x4 data:float
lbl_805A8580 = .sdata:0x805A8580; // type:object size:0x4 data:4byte
Expand Down Expand Up @@ -25618,11 +25618,11 @@ lbl_805AD8E8 = .sdata2:0x805AD8E8; // type:object size:0x4 data:float
lbl_805AD8EC = .sdata2:0x805AD8EC; // type:object size:0x4 data:float
lbl_805AD8F0 = .sdata2:0x805AD8F0; // type:object size:0x4 data:float
lbl_805AD8F4 = .sdata2:0x805AD8F4; // type:object size:0x4 data:float
lbl_805AD8F8 = .sdata2:0x805AD8F8; // type:object size:0x4 data:float
lbl_805AD8FC = .sdata2:0x805AD8FC; // type:object size:0x4 data:float
lbl_805AD900 = .sdata2:0x805AD900; // type:object size:0x4 data:float
lbl_805AD904 = .sdata2:0x805AD904; // type:object size:0x4 data:float
lbl_805AD908 = .sdata2:0x805AD908; // type:object size:0x8 data:double
@429 = .sdata2:0x805AD8F8; // type:object size:0x4 scope:local data:float
@430 = .sdata2:0x805AD8FC; // type:object size:0x4 scope:local data:float
@431 = .sdata2:0x805AD900; // type:object size:0x4 scope:local data:float
@432 = .sdata2:0x805AD904; // type:object size:0x4 scope:local data:float
@434 = .sdata2:0x805AD908; // type:object size:0x8 scope:local data:double
lbl_805AD910 = .sdata2:0x805AD910; // type:object size:0x4 data:float
lbl_805AD914 = .sdata2:0x805AD914; // type:object size:0x4 data:float
lbl_805AD918 = .sdata2:0x805AD918; // type:object size:0x4 data:float
Expand Down
4 changes: 2 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def MatchingFor(*versions):
Object(MatchingFor("GM8E01_00", "GM8E01_01"), "MetroidPrime/Tweaks/CTweakPlayer.cpp"),
Object(NonMatching, "MetroidPrime/Tweaks/CTweaks.cpp"),
Object(MatchingFor("GM8E01_00", "GM8E01_01"), "MetroidPrime/Tweaks/CTweakGame.cpp"),
Object(NonMatching, "MetroidPrime/CGameProjectile.cpp"),
Object(NonMatching, "MetroidPrime/Weapons/CGameProjectile.cpp"),
Object(NonMatching, "MetroidPrime/Player/CPlayerGun.cpp"),
Object(NonMatching, "MetroidPrime/CStateManager.cpp"),
Object(MatchingFor("GM8E01_00", "GM8E01_01"), "MetroidPrime/CEntity.cpp"),
Expand Down Expand Up @@ -729,7 +729,7 @@ def MatchingFor(*versions):
Object(NonMatching, "MetroidPrime/Weapons/CElectricBeamProjectile.cpp"),
Object(NonMatching, "MetroidPrime/Enemies/CRidley.cpp"),
Object(NonMatching, "MetroidPrime/Enemies/CPuffer.cpp"),
Object(NonMatching, "MetroidPrime/ScriptObjects/CFire.cpp"),
Object(MatchingFor("GM8E01_00", "GM8E01_01"), "MetroidPrime/ScriptObjects/CFire.cpp"),
Object(MatchingFor("GM8E01_00", "GM8E01_01"), "MetroidPrime/CPauseScreenBlur.cpp"),
Object(NonMatching, "MetroidPrime/Enemies/CTryclops.cpp"),
Object(NonMatching, "MetroidPrime/Weapons/CNewFlameThrower.cpp"),
Expand Down
4 changes: 2 additions & 2 deletions include/Kyoto/Input/CFinalInput.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class CFinalInput {

public:
CFinalInput();
CFinalInput(int channel, float dt, const CControllerGamepadData& data, float leftDif,
float rightDiv);
CFinalInput(const int channel, const float dt, const CControllerGamepadData& data, const float leftDiv,
const float rightDiv);
CFinalInput(int channel, float dt, const COsContext& context);
CFinalInput(const CFinalInput& other)
: x0_dt(other.x0_dt)
Expand Down
3 changes: 2 additions & 1 deletion include/Kyoto/Math/CAABox.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class CAABox {
};

CAABox(const CVector3f& min, const CVector3f& max);
CAABox(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
CAABox(const float minX, const float minY, const float minZ, const float maxX, const float maxY,
const float maxZ)
: min(minX, minY, minZ), max(maxX, maxY, maxZ) {}
CAABox(CInputStream& in);
// CAABox(const CAABox& other)
Expand Down
5 changes: 3 additions & 2 deletions include/Kyoto/Particles/CElementGen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ class CElementGen : public CParticleGen {
virtual void DestroyParticles() override;
virtual void AddModifier(CWarp*) override;
virtual uint Get4CharId() const override;

int GetMaxParticles() const { return x90_MAXP; }
int GetEmitterTime() const;
int GetSystemCount();

int GetCumulativeParticleCount() const { return x260_cumulativeParticles; }
bool IsIndirectTextured() const; // { return x28_loadedGenDesc->x54_x40_TEXR && x28_loadedGenDesc->x58_x44_TIND; }
bool IsIndirectTextured()
const; // { return x28_loadedGenDesc->x54_x40_TEXR && x28_loadedGenDesc->x58_x44_TIND; }
float GetExternalVar(int index) const;

static void Initialize();
Expand Down
2 changes: 1 addition & 1 deletion include/MetroidPrime/Decode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const CArchMsgParmUserInput& GetParmUserInput(const CArchitectureMessage& msg);

const CArchMsgParmInt32& GetParmNewGameflowState(const CArchitectureMessage& msg);

CArchitectureMessage CreateControllerStatus(EArchMsgTarget target, const short& chan,
CArchitectureMessage CreateControllerStatus(const EArchMsgTarget target, const short& chan,
const bool& connected);
CArchitectureMessage CreateQuitGameplay(EArchMsgTarget target);

Expand Down
36 changes: 18 additions & 18 deletions include/MetroidPrime/Player/CGameOptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,28 @@ class CGameOptions {
void ResetToDefaults();
void EnsureOptions();

void SetScreenBrightness(int, bool);
float TuneScreenBrightness();
void SetScreenPositionX(int, bool);
void SetScreenPositionY(int, bool);
void SetScreenStretch(int, bool);
void SetSfxVolume(int, bool);
void SetMusicVolume(int, bool);
void SetScreenBrightness(const int, const bool);
const float TuneScreenBrightness();
void SetScreenPositionX(const int, const bool);
void SetScreenPositionY(const int, const bool);
void SetScreenStretch(const int, const bool);
void SetSfxVolume(const int, const bool);
void SetMusicVolume(const int,const bool);
void SetSurroundMode(CAudioSys::ESurroundModes, bool);

float GetHudAlpha() const;
float GetHelmetAlpha() const;
void SetHelmetAlpha(int);
void SetHUDLag(bool);
const float GetHudAlpha() const;
const float GetHelmetAlpha() const;
void SetHelmetAlpha(const int);
void SetHUDLag(const bool);
void SetIsHintSystemEnabled(bool);
void ToggleControls(bool);
void ResetControllerAssets(int);
void SetControls(int);
void ToggleControls(const bool);
void ResetControllerAssets(const int);
void SetControls(const int);

void SetInvertYAxis(bool invert);
bool GetInvertYAxis() const { return x68_25_invertY; }
void SetIsRumbleEnabled(bool rumble);
bool GetIsRumbleEnabled() const { return x68_26_rumble; }
void SetInvertYAxis(const bool invert);
const bool GetInvertYAxis() const { return x68_25_invertY; }
void SetIsRumbleEnabled(const bool rumble);
const bool GetIsRumbleEnabled() const { return x68_26_rumble; }

private:
rstl::reserved_vector< uchar, 64 > x0_;
Expand Down
3 changes: 2 additions & 1 deletion include/MetroidPrime/Player/CPlayer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class CPlayer : public CPhysicsActor, public TOneStatic< CPlayer > {
void SetSteam(float targetAlpha, float alphaInDur, float alphaOutDur, CAssetId txtr,
bool affectsThermal);
void Update(float dt);
float GetAlpha() const { return x20_alpha; }
const float GetAlpha() const { return x20_alpha; }
bool AffectsThermal() const { return x28_affectsThermal; }
};

Expand Down Expand Up @@ -377,6 +377,7 @@ class CPlayer : public CPhysicsActor, public TOneStatic< CPlayer > {
void Teleport(const CTransform4f& xf, CStateManager& mgr, bool resetBallCam);
void SetSpawnedMorphBallState(EPlayerMorphBallState state, CStateManager& mgr);
const CVisorSteam& GetVisorSteam() const { return x7a0_visorSteam; }
const float GetVisorSteamAlpha() const { return x7a0_visorSteam.GetAlpha(); }
void SetVisorSteam(float targetAlpha, float alphaInDur, float alphaOutDir, CAssetId txtr,
bool affectsThermal);

Expand Down
2 changes: 1 addition & 1 deletion include/MetroidPrime/ScriptObjects/CFire.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CFire : public CActor {
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;

// CActor
void Render(const CStateManager&) const override;
void AddToRenderer(const CFrustumPlanes&, const CStateManager&) const override;
rstl::optional_object< CAABox > GetTouchBounds() const override;
void Touch(CActor&, CStateManager&) override;

Expand Down
1 change: 0 additions & 1 deletion include/MetroidPrime/TGameTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ CHECK_SIZEOF(TEditorId, 0x4)

struct TUniqueId {
ushort value;

TUniqueId(ushort version, ushort id) : value(((version & 0x3F) << 10) | (id & 0x3FF)) {}

ushort Value() const { return value & 0x3FF; }
Expand Down
Loading

0 comments on commit 8290186

Please sign in to comment.