free progress + cleanups

This commit is contained in:
SwareJonge 2023-02-02 23:06:13 +01:00
parent 6ca0215f33
commit c12cd67cae
9 changed files with 27 additions and 4 deletions

View File

@ -160,6 +160,9 @@ Kaneshige/RaceInfo.cpp:
.sbss: [0x804163d0, 0x804163d8]
.sdata2: [0x8041a028, 0x8041a030]
Kaneshige/JugemPoint.cpp:
.text: [0x801ba2a4, 0x801ba2b4]
Kaneshige/RaceTime.cpp:
.text: [0x801d9e4c, 0x801d9ea0]
@ -190,7 +193,6 @@ Osako/main.cpp:
#.sbss: [0x80416968, 0x80416998]
#.sdata2: [0x8041b688, 0x8041b6e8]
Osako/kartPad.cpp:
.text: [0x801fff8c, 0x80200a28]
.ctors: [0x80316380, 0x80316384]

View File

@ -2385,6 +2385,9 @@ global:
0x803780c0: cUserBarColorTable__8SysDebug
0x804163b0: sManager__8SysDebug
# JugemPoint.cpp
0x801ba2a4: __ct__10JugemPointFv
# GeoItemCar.cpp
0x801c2850: scale__Q29JGeometry8TVec3<f>FfRCQ29JGeometry8TVec3<f>

View File

@ -204,6 +204,8 @@ namespace JMath
inline const TSinCosTable<2048, f32> *getSinCosTable() { return &sincosTable_; }
}
inline f32 JMAAbs(f32 input) { return __fabs(input); }
inline f32 JMAAtan2Radian(f32 y, f32 x) { return JMath::atanTable_.atan2Radian(y, x); };
inline f32 JMASCosShort(s16 v) { return JMath::sincosTable_.cosShort(v); }
@ -212,6 +214,13 @@ inline f32 JMASinShort(s16 v) { return JMath::sincosTable_.sinShort(v); }
inline f32 JMASCos(s16 v) { return JMASCosShort(v); }
inline f32 JMASSin(s16 v) { return JMASinShort(v); }
// not tested
inline f32 JMAFastSqrt(f32 input) {
if (input < 0.0f)
return input;
return __frsqrte(input) * input;
}
void JMAEulerToQuat(s16, s16, s16, Quaternion *);
void JMAQuatLerp(const Quaternion *, const Quaternion *, f32, Quaternion *);
void JMAVECScaleAdd(const Vec *, const Vec *, Vec *, f32);

View File

@ -3,16 +3,19 @@
#include "Kaneshige/Course/CrsData.h"
class CLPoint;
class JugemPoint
{
public:
JugemPoint();
short getSectorID() const {
return mPointData->mSectorID;
}
private:
const CrsData::SJugemPoint *mPointData;
const void *mCLPoint;
const CLPoint *mCLPoint;
};
#endif

View File

@ -34,7 +34,7 @@ public:
void getArmTevRegKey(int); // 0x801a7ec4
void getExModelArm(int); // 0x801a7f5c
void getBodyTevRegKey(int); // 0x801a7ff4
ExModel *getExModelBody(); /* { return mModelBody; }*/ // 0x801a808c
ExModel *getExModelBody(); /* { return &mModelBody; }*/ // 0x801a808c
bool isKartTevAnmEnable(int); // 0x801a8094
void getAccessoryTevRegKey(int, int); // 0x801a80cc
void getExModelDriver(int); // 0x801a81e8

View File

@ -0,0 +1,6 @@
#include "Kaneshige/JugemPoint.h"
JugemPoint::JugemPoint() {
mPointData = nullptr;
mCLPoint = nullptr;
}

View File

@ -26,7 +26,7 @@ void TARecord::set(u8 charId1, u8 charId2, u8 kartId, u8 courseId, const char *
mCharID2 = charId2;
mKartID = kartId;
mCourseID = courseId;
strncpy(mName, name, 4);
strncpy(mName, name, sizeof(mName));
setRaceTime(raceTime);
}