Skip to content
Merged
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
1 change: 0 additions & 1 deletion src/SB/Core/x/xBound.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ void xBoundHitsBound(const xBound* a, const xBound* b, xCollis* c);
void xRayHitsBound(const xRay3* r, const xBound* b, xCollis* c);
void xSphereHitsBound(const xSphere* o, const xBound* b, xCollis* c);
void xVecHitsBound(const xVec3* v, const xBound* b, xCollis* c);
F32 xsqrt(F32 x);

inline xVec3* xBoundCenter(xBound* bound)
{
Expand Down
1 change: 0 additions & 1 deletion src/SB/Core/x/xCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ extern xMat4x3 sCameraFXMatOld;
extern cameraFX sCameraFX[10];
extern cameraFXTableEntry sCameraFXTable[3];


struct xScene;

enum _tagTransType
Expand Down
1 change: 1 addition & 0 deletions src/SB/Core/x/xEntDrive.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "xEntDrive.h"

#include "xMath.h"
#include "xMathInlines.h"

#include <types.h>

Expand Down
6 changes: 2 additions & 4 deletions src/SB/Core/x/xVolume.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#include <types.h>

#include "xBound.h"
#include "xLinkAsset.h"
#include "xVolume.h"

#include <types.h>

void xVolume::Init(xVolumeAsset* asset)
{
xBaseInit(this, asset);
Expand Down
1 change: 1 addition & 0 deletions src/SB/Game/zDiscoFloor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "xString.h"
#include "xDebug.h"
#include "xMath.h"
#include "xMathInlines.h"

#include "iModel.h"
#include "iMath.h"
Expand Down
1 change: 1 addition & 0 deletions src/SB/Game/zEntPickup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "zUI.h"

#include "xMath.h"
#include "xMathInlines.h"
#include "xFX.h"
#include "xstransvc.h"
#include "iAnim.h"
Expand Down
1 change: 0 additions & 1 deletion src/SB/Game/zEntPlayerBungeeState.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "zEntPlayerBungeeState.h"

#include "iScrFX.h"
#include "xBound.h"
#include "xCamera.h"
#include "xDebug.h"
#include "xFX.h"
Expand Down
6 changes: 4 additions & 2 deletions src/SB/Game/zLOD.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#include "zLOD.h"

#include <types.h>
#include <../Core/x/xEnt.h>
#include <../Core/x/xBound.h>

#include "xEnt.h"
#include "xMathInlines.h"

#include "zBase.h"
#include "zEntDestructObj.h"

Expand Down
27 changes: 17 additions & 10 deletions src/SB/Game/zLasso.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "zLasso.h"

#include "xMathInlines.h"

#include "iModel.h"

#include <types.h>
Expand Down Expand Up @@ -30,8 +32,10 @@ void zLasso_SetGuide(xEnt* ent, xAnimState* lassoAnim)
var_r5 = sGuideList;
u32 guideListIdx = 0;

for (u32 i = sNumGuideLists; i > 0; i--) {
if (var_r5->target == ent) {
for (u32 i = sNumGuideLists; i > 0; i--)
{
if (var_r5->target == ent)
{
break;
}

Expand Down Expand Up @@ -83,25 +87,28 @@ void zLasso_InterpToGuide(zLasso* lasso)
xVec3Init(&lasso->tgCenter, 0.0f, 0.0f, 0.0f);

S32 vertMapIdx = 0;
for (S32 i = 0; i < currentGuideNumTris; i++) {
xVec3AddTo(&lasso->tgCenter, (xVec3*) morphTargetVector + sCurrentGuide->vertMap[vertMapIdx]);
for (S32 i = 0; i < currentGuideNumTris; i++)
{
xVec3AddTo(&lasso->tgCenter,
(xVec3*)morphTargetVector + sCurrentGuide->vertMap[vertMapIdx]);
vertMapIdx += 1;
}

xVec3SMul(&lasso->tgCenter, &lasso->tgCenter, 1.0f / (f32) currentGuideNumTris);
xVec3Sub(&sp14, (xVec3*) morphTargetVector + sCurrentGuide->vertMap[0], &lasso->tgCenter);
xVec3Sub(&sp8, (xVec3*) morphTargetVector + sCurrentGuide->vertMap[1], &lasso->tgCenter);
xVec3SMul(&lasso->tgCenter, &lasso->tgCenter, 1.0f / (f32)currentGuideNumTris);
xVec3Sub(&sp14, (xVec3*)morphTargetVector + sCurrentGuide->vertMap[0], &lasso->tgCenter);
xVec3Sub(&sp8, (xVec3*)morphTargetVector + sCurrentGuide->vertMap[1], &lasso->tgCenter);

lasso->tgRadius = xVec3Normalize(&sp14, &sp14);

xVec3Cross(&lasso->tgNormal, &sp14, &sp8);
xVec3Normalize(&lasso->tgNormal, &lasso->tgNormal);

if (lasso->tgNormal.y < 0.0f) {
if (lasso->tgNormal.y < 0.0f)
{
xVec3Inv(&lasso->tgNormal, &lasso->tgNormal);
}

xMat4x3Toworld(&lasso->tgCenter, (xMat4x3*) sCurrentGuide->poly->Mat, &lasso->tgCenter);
xMat4x3Toworld(&lasso->tgCenter, (xMat4x3*)sCurrentGuide->poly->Mat, &lasso->tgCenter);
}
}

Expand Down
1 change: 0 additions & 1 deletion src/SB/Game/zNPCSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "xMathInlines.h"
#include "xMath3.h"
#include "xUtil.h"
#include "xBound.h"
#include "xQuickCull.h"
#include "xCollide.h"

Expand Down
1 change: 0 additions & 1 deletion src/SB/Game/zNPCTypeAmbient.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <types.h>

#include "xVec3.h"
#include "xBound.h"
#include "xMath3.h"

#include "zGlobals.h"
Expand Down
1 change: 0 additions & 1 deletion src/SB/Game/zNPCTypeCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include "xString.h"
#include "xDebug.h"
#include "xBound.h"

// Finish porting code from bfbbpc repo

Expand Down
1 change: 1 addition & 0 deletions src/SB/Game/zParCmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "xParCmd.h"
#include "xMath.h"
#include "xMathInlines.h"
#include "xString.h"

#include "zGlobals.h"
Expand Down
Loading