Skip to content

Commit

Permalink
Add all tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
henriquegemignani committed Jan 14, 2025
1 parent 4d7aba8 commit ed6e8a5
Show file tree
Hide file tree
Showing 66 changed files with 6,018 additions and 11 deletions.
2 changes: 1 addition & 1 deletion config/G2ME01/rels/Tweaks/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Sections:
.bss type:bss align:8

MetroidPrime/Tweaks/Tweaks.cpp:
.text start:0x00000000 end:0x000070F0
.text start:0x00000000 end:0x0001DECC
.rodata start:0x00000000 end:0x00000408
.bss start:0x00000000 end:0x0000000C

Expand Down
8 changes: 4 additions & 4 deletions config/G2ME01/rels/Tweaks/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ REL_FreeTweaks__Fv = .text:0x0000008C; // type:function size:0x278
fn_82_304 = .text:0x00000304; // type:function size:0x48
fn_82_34C = .text:0x0000034C; // type:function size:0x88
__dt__10SLdrSplineFv = .text:0x000003D4; // type:function size:0x58
fn_82_42C = .text:0x0000042C; // type:function size:0x54
__dt__Q24rstl52vector<15CMayaSplineKnot,Q24rstl17rmemory_allocator>Fv = .text:0x0000042C; // type:function size:0x54
fn_82_480 = .text:0x00000480; // type:function size:0x88
REL_CreateTweakGlobals__Fv = .text:0x00000508; // type:function size:0x5AC
fn_82_AB4 = .text:0x00000AB4; // type:function size:0x94
Expand Down Expand Up @@ -255,9 +255,9 @@ __ct__24SLdrTIcon_ConfigurationsFv = .text:0x0001D908; // type:function size:0x3
LoadTypedefSLdrTBeamInfo__FR13SLdrTBeamInfoR12CInputStream = .text:0x0001D938; // type:function size:0xC4
__dt__13SLdrTBeamInfoFv = .text:0x0001D9FC; // type:function size:0x58
__ct__13SLdrTBeamInfoFv = .text:0x0001DA54; // type:function size:0x40
fn_82_1DA94 = .text:0x0001DA94; // type:function size:0xC4
fn_82_1DB58 = .text:0x0001DB58; // type:function size:0x64
fn_82_1DBBC = .text:0x0001DBBC; // type:function size:0x6C
LoadTypedefSLdrTWeaponDamage__FR17SLdrTWeaponDamageR12CInputStream = .text:0x0001DA94; // type:function size:0xC4
__dt__17SLdrTWeaponDamageFv = .text:0x0001DB58; // type:function size:0x64
__ct__17SLdrTWeaponDamageFv = .text:0x0001DBBC; // type:function size:0x6C
LoadTypedefSLdrTDamageInfo__FR15SLdrTDamageInfoR12CInputStream = .text:0x0001DC28; // type:function size:0x138
__dt__15SLdrTDamageInfoFv = .text:0x0001DD60; // type:function size:0x3C
__ct__15SLdrTDamageInfoFv = .text:0x0001DD9C; // type:function size:0x3C
Expand Down
6 changes: 3 additions & 3 deletions config/G2ME01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10210,9 +10210,9 @@ fn_80241678 = .text:0x80241678; // type:function size:0x14
fn_8024168C = .text:0x8024168C; // type:function size:0x240 align:4
fn_802418CC = .text:0x802418CC; // type:function size:0x3C
fn_80241908 = .text:0x80241908; // type:function size:0x4C
fn_80241954 = .text:0x80241954; // type:function size:0x114
fn_80241A68 = .text:0x80241A68; // type:function size:0x3C
fn_80241AA4 = .text:0x80241AA4; // type:function size:0x1C
LoadTypedefSLdrDamageInfo__FR14SLdrDamageInfoR12CInputStream = .text:0x80241954; // type:function size:0x114
__dt__14SLdrDamageInfoFv = .text:0x80241A68; // type:function size:0x3C
__ct__14SLdrDamageInfoFv = .text:0x80241AA4; // type:function size:0x1C
fn_80241AC0 = .text:0x80241AC0; // type:function size:0xD8 align:4
fn_80241B98 = .text:0x80241B98; // type:function size:0x3C
fn_80241BD4 = .text:0x80241BD4; // type:function size:0x14
Expand Down
3 changes: 0 additions & 3 deletions include/Kyoto/Math/CMayaSpline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ struct SLdrSpline {
SLdrSpline();
SLdrSpline(const rstl::vector<CMayaSplineKnot>& knots, int clampMode, int preInfinity, int postInfinity, float minAmplitudeTime, float maxAmplitudeTime);
SLdrSpline(CInputStream&, int);
~SLdrSpline();

SLdrSpline& operator=(const SLdrSpline&);

static SLdrSpline CreateFor(float, float, float, float);

Expand Down
43 changes: 43 additions & 0 deletions src/MetroidPrime/ScriptLoader/SLdrTBallTransitionResources.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#include "MetroidPrime/ScriptLoader/SLdrTBallTransitionResources.hpp"

SLdrTBallTransitionResources::SLdrTBallTransitionResources() {}

SLdrTBallTransitionResources::~SLdrTBallTransitionResources() {}

void LoadTypedefSLdrTBallTransitionResources(SLdrTBallTransitionResources& sldrThis, CInputStream& input) {
int propertyCount = input.ReadUint16();
for (int i = 0; i < propertyCount; ++i) {
uint propertyId = (uint)input.ReadInt32();
u16 propertySize = input.ReadUint16();

switch (propertyId) {
case 0xd48e4124:
sldrThis.unknown_0xd48e4124 = rstl::string(input);
break;
case 0x01e12c84:
LoadTypedefSLdrTGunResources(sldrThis.unknown_0x01e12c84, input);
break;
case 0xf24b055d:
LoadTypedefSLdrTGunResources(sldrThis.unknown_0xf24b055d, input);
break;
case 0xa342c3a6:
sldrThis.unknown_0xa342c3a6 = SLdrSpline(input, propertySize);
break;
case 0x15b6840d:
sldrThis.unknown_0x15b6840d = SLdrSpline(input, propertySize);
break;
case 0x23fb0e93:
sldrThis.unknown_0x23fb0e93 = SLdrSpline(input, propertySize);
break;
case 0x564262f0:
sldrThis.unknown_0x564262f0 = SLdrSpline(input, propertySize);
break;
case 0x9183a262:
sldrThis.movementControl = SLdrSpline(input, propertySize);
break;
default:
input.ReadBytes(nullptr, propertySize);
break;
}
}
}
27 changes: 27 additions & 0 deletions src/MetroidPrime/ScriptLoader/SLdrTBeamInfo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include "MetroidPrime/ScriptLoader/SLdrTBeamInfo.hpp"

SLdrTBeamInfo::SLdrTBeamInfo() {
cooldown = 0.2f;
}

SLdrTBeamInfo::~SLdrTBeamInfo() {}

void LoadTypedefSLdrTBeamInfo(SLdrTBeamInfo& sldrThis, CInputStream& input) {
int propertyCount = input.ReadUint16();
for (int i = 0; i < propertyCount; ++i) {
uint propertyId = (uint)input.ReadInt32();
u16 propertySize = input.ReadUint16();

switch (propertyId) {
case 0x102e085f:
sldrThis.cooldown = input.ReadFloat();
break;
case 0xfaa71e25:
LoadTypedefSLdrTWeaponDamage(sldrThis.damageInfo, input);
break;
default:
input.ReadBytes(nullptr, propertySize);
break;
}
}
}
40 changes: 40 additions & 0 deletions src/MetroidPrime/ScriptLoader/SLdrTDamageInfo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#include "MetroidPrime/ScriptLoader/SLdrTDamageInfo.hpp"

SLdrTDamageInfo::SLdrTDamageInfo() {
weaponType = 0;
damageAmount = 10.0f;
radiusDamageAmount = 5.0f;
damageRadius = 1.0f;
knockBackPower = 1.0f;
}

SLdrTDamageInfo::~SLdrTDamageInfo() {}

void LoadTypedefSLdrTDamageInfo(SLdrTDamageInfo& sldrThis, CInputStream& input) {
int propertyCount = input.ReadUint16();
for (int i = 0; i < propertyCount; ++i) {
uint propertyId = (uint)input.ReadInt32();
u16 propertySize = input.ReadUint16();

switch (propertyId) {
case 0x4d577910:
sldrThis.weaponType = input.ReadInt32();
break;
case 0xf3ec8748:
sldrThis.damageAmount = input.ReadFloat();
break;
case 0x37b6df3d:
sldrThis.radiusDamageAmount = input.ReadFloat();
break;
case 0x0f598739:
sldrThis.damageRadius = input.ReadFloat();
break;
case 0x56f98c49:
sldrThis.knockBackPower = input.ReadFloat();
break;
default:
input.ReadBytes(nullptr, propertySize);
break;
}
}
}
34 changes: 34 additions & 0 deletions src/MetroidPrime/ScriptLoader/SLdrTGunResources.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include "MetroidPrime/ScriptLoader/SLdrTGunResources.hpp"

SLdrTGunResources::SLdrTGunResources() {}

SLdrTGunResources::~SLdrTGunResources() {}

void LoadTypedefSLdrTGunResources(SLdrTGunResources& sldrThis, CInputStream& input) {
int propertyCount = input.ReadUint16();
for (int i = 0; i < propertyCount; ++i) {
uint propertyId = (uint)input.ReadInt32();
u16 propertySize = input.ReadUint16();

switch (propertyId) {
case 0x2705318d:
sldrThis.powerBeam = rstl::string(input);
break;
case 0x7cc2879f:
sldrThis.iceBeam = rstl::string(input);
break;
case 0x382765b0:
sldrThis.waveBeam = rstl::string(input);
break;
case 0xcb269ac8:
sldrThis.plasmaBeam = rstl::string(input);
break;
case 0xa3890335:
sldrThis.phazonBeam = rstl::string(input);
break;
default:
input.ReadBytes(nullptr, propertySize);
break;
}
}
}
56 changes: 56 additions & 0 deletions src/MetroidPrime/ScriptLoader/SLdrTIcon_Configurations.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#include "MetroidPrime/ScriptLoader/SLdrTIcon_Configurations.hpp"

SLdrTIcon_Configurations::SLdrTIcon_Configurations() {
unknown_0x3058aff2 = 0.0f;
unknown_0xf1d67032 = 0.0f;
unknown_0x68341633 = 0.0f;
unknown_0xa9bac9f3 = 0.0f;
unknown_0x8081dc70 = 0.0f;
unknown_0x410f03b0 = 0.0f;
unknown_0xd8ed65b1 = 0.0f;
unknown_0x1963ba71 = 0.0f;
unknown_0x8a9b4eb7 = 0.0f;
}

SLdrTIcon_Configurations::~SLdrTIcon_Configurations() {}

void LoadTypedefSLdrTIcon_Configurations(SLdrTIcon_Configurations& sldrThis, CInputStream& input) {
int propertyCount = input.ReadUint16();
for (int i = 0; i < propertyCount; ++i) {
uint propertyId = (uint)input.ReadInt32();
u16 propertySize = input.ReadUint16();

switch (propertyId) {
case 0x3058aff2:
sldrThis.unknown_0x3058aff2 = input.ReadFloat();
break;
case 0xf1d67032:
sldrThis.unknown_0xf1d67032 = input.ReadFloat();
break;
case 0x68341633:
sldrThis.unknown_0x68341633 = input.ReadFloat();
break;
case 0xa9bac9f3:
sldrThis.unknown_0xa9bac9f3 = input.ReadFloat();
break;
case 0x8081dc70:
sldrThis.unknown_0x8081dc70 = input.ReadFloat();
break;
case 0x410f03b0:
sldrThis.unknown_0x410f03b0 = input.ReadFloat();
break;
case 0xd8ed65b1:
sldrThis.unknown_0xd8ed65b1 = input.ReadFloat();
break;
case 0x1963ba71:
sldrThis.unknown_0x1963ba71 = input.ReadFloat();
break;
case 0x8a9b4eb7:
sldrThis.unknown_0x8a9b4eb7 = input.ReadFloat();
break;
default:
input.ReadBytes(nullptr, propertySize);
break;
}
}
}
25 changes: 25 additions & 0 deletions src/MetroidPrime/ScriptLoader/SLdrTWeaponDamage.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include "MetroidPrime/ScriptLoader/SLdrTWeaponDamage.hpp"

SLdrTWeaponDamage::SLdrTWeaponDamage() {}

SLdrTWeaponDamage::~SLdrTWeaponDamage() {}

void LoadTypedefSLdrTWeaponDamage(SLdrTWeaponDamage& sldrThis, CInputStream& input) {
int propertyCount = input.ReadUint16();
for (int i = 0; i < propertyCount; ++i) {
uint propertyId = (uint)input.ReadInt32();
u16 propertySize = input.ReadUint16();

switch (propertyId) {
case 0x8ac4278a:
LoadTypedefSLdrTDamageInfo(sldrThis.normal, input);
break;
case 0xc9ac01d2:
LoadTypedefSLdrTDamageInfo(sldrThis.charged, input);
break;
default:
input.ReadBytes(nullptr, propertySize);
break;
}
}
}
Loading

0 comments on commit ed6e8a5

Please sign in to comment.