Skip to content

Commit

Permalink
Match and link CScriptMailbox and strtold
Browse files Browse the repository at this point in the history
  • Loading branch information
Antidote committed Nov 2, 2024
1 parent 9dafdad commit 0b74ded
Show file tree
Hide file tree
Showing 11 changed files with 574 additions and 9 deletions.
4 changes: 2 additions & 2 deletions config/GM8E01_00/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15235,8 +15235,8 @@ GetTransformMinusOffset__17CPoseAsTransformsCFRC6CSegId = .text:0x80368F7C; // t
GetRotation__17CPoseAsTransformsCFRC6CSegId = .text:0x80368F9C; // type:function size:0x20 scope:global
Insert__17CPoseAsTransformsFRC6CSegIdRC9CMatrix3fRC9CVector3f = .text:0x80368FBC; // type:function size:0x74 scope:global
__ct__17CPoseAsTransformsFUc = .text:0x80369030; // type:function size:0x130 scope:global
Insert__58TSegIdMapVariableSize<Q217CPoseAsTransforms12CElementType>FRC6CSegIdRCQ217CPoseAsTransforms12CElementType = .text:0x80369160; // type:function size:0xAC scope:global
Clear__58TSegIdMapVariableSize<Q217CPoseAsTransforms12CElementType>Fv = .text:0x8036920C; // type:function size:0x44 scope:global
Insert__58TSegIdMapVariableSize<Q217CPoseAsTransforms12CElementType>FRC6CSegIdRCQ217CPoseAsTransforms12CElementType = .text:0x80369160; // type:function size:0xAC scope:weak
Clear__58TSegIdMapVariableSize<Q217CPoseAsTransforms12CElementType>Fv = .text:0x8036920C; // type:function size:0x44 scope:weak
CreateRumbleHandle__12CRumbleVoiceFUs = .text:0x80369250; // type:function size:0x4C scope:global
OwnsSustained__12CRumbleVoiceCFs = .text:0x8036929C; // type:function size:0x38 scope:global
GetIntensity__12CRumbleVoiceCFv = .text:0x803692D4; // type:function size:0x4C scope:global
Expand Down
4 changes: 2 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def MatchingFor(*versions):
Object(Matching, "MetroidPrime/Weapons/CPowerBeam.cpp"),
Object(NonMatching, "MetroidPrime/Weapons/CWaveBeam.cpp"),
Object(NonMatching, "MetroidPrime/Weapons/CIceBeam.cpp"),
Object(NonMatching, "MetroidPrime/CScriptMailbox.cpp"),
Object(Matching, "MetroidPrime/CScriptMailbox.cpp"),
Object(Matching, "MetroidPrime/ScriptObjects/CScriptRelay.cpp"),
Object(NonMatching, "MetroidPrime/ScriptObjects/CScriptSpawnPoint.cpp"),
Object(NonMatching, "MetroidPrime/ScriptObjects/CScriptRandomRelay.cpp"),
Expand Down Expand Up @@ -1228,7 +1228,7 @@ def MatchingFor(*versions):
Object(Matching, "Runtime/sscanf.c"),
Object(Matching, "Runtime/string.c"),
Object(Matching, "Runtime/float.c"),
Object(NonMatching, "Runtime/strtold.c"),
Object(Matching, "Runtime/strtold.c"),
Object(Matching, "Runtime/uart_console_io.c"),
Object(Matching, "Runtime/wchar_io.c"),
Object(Matching, "Runtime/e_acos.c"),
Expand Down
7 changes: 5 additions & 2 deletions include/Kyoto/Animation/CPoseAsTransforms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@

#include "types.h"

#include "MetroidPrime/TGameTypes.hpp"

#include "Kyoto/Animation/CSegId.hpp"
#include "Kyoto/Math/CTransform4f.hpp"

#include "rstl/reserved_vector.hpp"
#include "rstl/single_ptr.hpp"

class CPoseAsTransforms {
public:
class CElementType {

};

const CMatrix3f& GetRotation(const CSegId& id) const;
private:
CSegId x0_nextId;
Expand Down
2 changes: 1 addition & 1 deletion include/MetroidPrime/CWorld.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CRelay /* name? */ {
explicit CRelay(CInputStream& in);
const TEditorId& GetRelayId() const { return x0_relay; }
const TEditorId& GetTargetId() const { return x4_target; }
ushort GetMessage() const { return x8_msg; }
const ushort& GetMessage() const { return x8_msg; }
bool GetActive() const { return xa_active; }

static rstl::vector< CRelay > ReadMemoryRelays(CInputStream& in); // name?
Expand Down
8 changes: 6 additions & 2 deletions libc/float.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ extern "C" {
#define FLT_MIN 1.175494351e-38f

#define DBL_DIG 6
#define DBL_MIN 5.8774717e-39
#define DBL_MAX (* (double *) __double_max)
#define DBL_MIN (*(double*)__double_min)
#define DBL_MAX (*(double*)__double_max)
#define DBL_EPSILON 1.1920929e-07

#define DBL_MANT_DIG 53

#define LDBL_MAX (*(long double*)__extended_max)
#define LDBL_EPSILON (*(long double*)__extended_epsilon)
#define LDBL_MIN (*(long double*)__extended_min)

#ifdef __cplusplus
}
#endif
Expand Down
2 changes: 2 additions & 0 deletions libc/limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#endif

#define SHRT_MAX 0x7fff
#define SHRT_MIN (~SHRT_MAX)

#define USHRT_MAX 0xffffU

#define INT_MAX 0x7fffffff
Expand Down
1 change: 1 addition & 0 deletions libc/locale.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ struct lconv {
char int_n_sign_posn;
};

extern struct lconv __lconv;
#ifdef __cplusplus
}
#endif
Expand Down
5 changes: 5 additions & 0 deletions libc/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ extern _INT32 __float_huge[];
extern _INT32 __float_nan[];
extern _INT32 __double_huge[];
extern _INT32 __extended_huge[];
extern _INT32 __extended_min[];
extern _INT32 __extended_max[];
extern _INT32 __extended_epsilon[];
extern _INT32 __double_min[];
extern _INT32 __double_max[];

#define HUGE_VAL (*(double*)__double_huge)
Expand Down Expand Up @@ -217,6 +221,7 @@ static inline double scalbn(double x, int n) { return ldexp(x, n); }
static inline float scalbnf(float x, int n) { return (float)ldexpf(x, n); }
double nextafter(double, double);


#ifdef __cplusplus
}
#endif
Expand Down
2 changes: 2 additions & 0 deletions libc/stdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ size_t fwrite(const void*, size_t memb_size, size_t num_memb, FILE*);
int fseek(FILE* file, long offset, int mode);
size_t __fwrite(const void*, size_t, size_t, FILE*);

int __StringRead(void* isc, int ch, int Action);

#ifdef __cplusplus
}
#endif
Expand Down
1 change: 1 addition & 0 deletions src/MetroidPrime/Player/CPlayerStuckTracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ bool CPlayer::CPlayerStuckTracker::IsPlayerStuck() {
max1 = *_getElementBoundsCheck(x148_, 0);
CAABox box1(min1, max1);
CAABox box(*_getElementBoundsCheck(x148_, 0), *_getElementBoundsCheck(x148_, 0));
return true;
}

void CPlayer::CPlayerStuckTracker::ResetStats() {
Expand Down
Loading

0 comments on commit 0b74ded

Please sign in to comment.