Skip to content
Open
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
4 changes: 2 additions & 2 deletions include/Camera/cameralib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

extern f32 SMSGetAnmFrameRate(); // avoid including Application.hpp

void CLBCalc2DFPos(JGeometry::TVec2<f32>*, const MtxPtr, const MtxPtr,
void CLBCalc2DFPos(JGeometry::TVec2<f32>*, const f32 (*)[4], const f32 (*)[4],
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh shit, is const MtxPtr a const pointer instead of a pointer to const? Probably add a note then that this is correct and MtxPtr should not be used here

const Vec&, u32*, bool);

void CLBCalcNearClipAngle(JGeometry::TVec3<f32>*, S16Vec*,
Expand Down Expand Up @@ -69,7 +69,7 @@ bool CLBChaseAngleDecrease(s16* out, s16 target, s16 invSpeed);
*/
BOOL CLBChaseDecrease(f32* dstValue, f32 targetValue, f32 ratio, f32 threshold);

bool CLBChaseSpecialDecrease(f32*, f32, f32, f32);
BOOL CLBChaseSpecialDecrease(f32*, f32, f32, f32);

/**
* @brief Converts Cartesian coordinates to spherical coordinates.
Expand Down
10 changes: 6 additions & 4 deletions src/Camera/cameralib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
static const f32 SHORTANGLE_TO_DEGREES = 0.005493164f; // 360/65536
static const f32 DEGREES_TO_RADIANS = 0.017453294f; // pi/180

JGeometry::TVec3<f32> CLBConstUpVec(0.0f, 1.0f, 0.0f);

// TODO: Almost definitely fake, this is probably inlined somewhere else
static inline f32 fastSqrt(f32 x)
{
Expand Down Expand Up @@ -38,8 +40,8 @@ static inline void RotateAboutAxis(const JGeometry::TVec3<f32>& param_axis,
}

// TODO: Explore how this is used, and add documentation
void CLBCalc2DFPos(JGeometry::TVec2<f32>* param_1, MtxPtr param_2,
const MtxPtr param_3, const Vec& param_4, u32* param_5,
void CLBCalc2DFPos(JGeometry::TVec2<f32>* param_1, const f32 (*param_2)[4],
const f32 (*param_3)[4], const Vec& param_4, u32* param_5,
bool param_6)
{
Vec prod;
Expand Down Expand Up @@ -322,8 +324,8 @@ BOOL CLBChaseDecrease(f32* dstValue, f32 targetValue, f32 ratio, f32 threshold)
}
}

bool CLBChaseSpecialDecrease(f32* param_1, f32 param_2, f32 param_3,
f32 param_4)
BOOL CLBChaseSpecialDecrease(f32* param_1, f32 param_2, f32 param_3,
f32 param_4)
{
if (param_3 > 1.0f) {
param_3 = 1.0f;
Expand Down
3 changes: 2 additions & 1 deletion src/Enemy/enemy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,8 @@ void TSpineEnemy::doShortCut()
return;
}

TPathNode node = unk114.pop();
TPathNode node;
node = unk114.pop();

JGeometry::TVec3<f32> local_28 = node.getPoint() - mPosition;
if (local_28.x == 0.0f && local_28.y == 0.0f && local_28.z == 0.0f)
Expand Down
2 changes: 2 additions & 0 deletions src/Enemy/fireWanwan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,7 @@ void TFireWanwan::updateCollisionFromParam()
getSaveParam2()->mSLDamageHeight.get());
}

#pragma dont_inline on
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, don't add these hacks, we want proper fixes with real inlines

// Tiny size mismatch
void TFireWanwan::updateCameraShake()
{
Expand Down Expand Up @@ -1215,6 +1216,7 @@ void TFireWanwan::updateRumble()
mHungTailRumbleTimer = 0;
}
}
#pragma dont_inline off

void TFireWanwan::updatePollute()
{
Expand Down
Loading