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
5 changes: 3 additions & 2 deletions src/SB/Core/x/xMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
// #define PI _771_1
// #define ONEEIGHTY _778_0
#define PI 3.1415927f
#define PI_DOUBLE 3.141592653589793
#define ONEEIGHTY 180.0f

#define DEG2RAD(x) ((PI) * (x) / (ONEEIGHTY))
#define RAD2DEG(x) ((ONEEIGHTY) * (x) / (PI))
#define DEG2RAD(x) ((PI_DOUBLE) * (x) / (ONEEIGHTY))
#define RAD2DEG(x) ((ONEEIGHTY) * (x) / (PI_DOUBLE))

#define FLOAT_MAX 1e38f
#define FLOAT_MIN -1e38f
Expand Down
75 changes: 0 additions & 75 deletions src/SB/Core/x/xSGT.cpp

This file was deleted.

4 changes: 2 additions & 2 deletions src/SB/Core/x/xWad3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ extern volatile U32 rndseed; // made this volatile so xrand() matches
F32 xDangleClamp(F32 a)
{
F32 rad360 = 2 * PI;
F32 rem = xfmod(a, rad360);
F32 rem = fmod(a, 2 * PI_DOUBLE);

if (rem >= PI)
{
Expand Down Expand Up @@ -1646,7 +1646,7 @@ F32 xAngleClampFast(F32 a)
F32 xAngleClamp(F32 a)
{
F32 rad360 = 2 * PI;
F32 rem = xfmod(a, rad360);
F32 rem = fmod(a, 2 * PI_DOUBLE);

if (rem < 0.0f)
{
Expand Down
Empty file added src/SB/Core/x/xsavegame.cpp
Empty file.
117 changes: 61 additions & 56 deletions src/SB/Game/zCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,68 +38,73 @@ struct zCamTweakLook
F32 pitch;
};

extern F32 zcam_overrot_tmr;
extern S32 zcam_near;
extern S32 zcam_mode;
extern S32 zcam_bbounce;
extern S32 zcam_lbbounce;
extern S32 zcam_convers;
extern S32 zcam_lconvers;
extern S32 zcam_longbounce;
extern S32 zcam_highbounce;
extern S32 zcam_cutscene;
extern S32 zcam_reward;
extern xVec3* zcam_playervel;
extern S32 zcam_fly;
extern S32 zcam_flypaused;
extern void* zcam_flydata;
extern U32 zcam_flysize;
extern F32 zcam_flytime;
extern U32 zcam_flyasset_current;
extern xCamAsset* zcam_dest;
extern F32 zcam_tmr;
extern F32 zcam_ttm;
extern F32 zcam_fovcurr;
extern F32 zcam_fovdest;

// unknown if these are even used?
extern xCamera zcam_backupcam;
extern xCamera zcam_backupconvers;
extern xQuat zcam_quat;

extern F32 zcam_pad_pyaw_scale;
extern F32 zcam_pad_pitch_scale;
extern F32 zcam_near_d;
extern F32 zcam_near_h;
extern F32 zcam_near_pitch;
extern F32 zcam_far_d;
extern F32 zcam_far_h;
extern F32 zcam_far_pitch;
extern F32 zcam_wall_d;
extern F32 zcam_wall_h;
extern F32 zcam_wall_pitch;
extern F32 zcam_above_d;
extern F32 zcam_above_h;
extern F32 zcam_above_pitch;
extern F32 zcam_below_d;
extern F32 zcam_below_h;
extern F32 zcam_below_pitch;
extern F32 zcam_highbounce_d;
extern F32 zcam_highbounce_h;
extern F32 zcam_highbounce_pitch;
extern F32 zcam_overrot_min;
extern F32 zcam_overrot_mid;
extern F32 zcam_overrot_max;
extern F32 zcam_overrot_rate;
extern F32 zcam_overrot_tstart;
extern F32 zcam_overrot_tend;
extern F32 zcam_overrot_velmin;
extern F32 zcam_overrot_velmax;
extern F32 zcam_overrot_tmanual;
extern F32 zcam_mintgtheight;


// .sbss
F32 zcam_overrot_tmr;
S32 zcam_near;
U8 zcam_centering;
U8 zcam_lastcentering;
S32 zcam_mode;
S32 zcam_bbounce;
S32 zcam_lbbounce;
S32 zcam_convers;
S32 zcam_lconvers;
S32 zcam_longbounce;
S32 zcam_highbounce;
S32 zcam_cutscene;
S32 zcam_reward;
xVec3* zcam_playervel;
S32 zcam_fly;
S32 zcam_flypaused;
void* zcam_flydata;
U32 zcam_flysize;
F32 zcam_flytime;
F32 zcam_flyrate;
S32 zcam_flyJustStopped;
xCamAsset* zcam_dest;
F32 zcam_tmr;
F32 zcam_ttm;
F32 zcam_fovcurr;
F32 zcam_fovdest;
U32 zcam_flyasset_current;
S32 sCamTweakCount;
// .sdata

F32 zcam_pad_pyaw_scale = 0.18124573f; // unknown math
F32 zcam_pad_pitch_scale = 1.0f / 52;
F32 zcam_near_d = 3.0f;
F32 zcam_near_h = 1.8f;
F32 zcam_near_pitch = DEG2RAD(10);
F32 zcam_far_d = 5.0f;
F32 zcam_far_h = 3.0f;
F32 zcam_far_pitch = DEG2RAD(15);
F32 zcam_wall_d = 7.5f;
F32 zcam_wall_h = 2.0f;
F32 zcam_wall_pitch = DEG2RAD(18);
F32 zcam_above_d = 0.2f;
F32 zcam_above_h = 2.2f;
F32 zcam_above_pitch = DEG2RAD(70);
F32 zcam_below_d = 0.6f;
F32 zcam_below_h = 0.2f;
F32 zcam_below_pitch = DEG2RAD(-70);
F32 zcam_highbounce_d = 0.2f;
F32 zcam_highbounce_h = 5.0f;
F32 zcam_highbounce_pitch = DEG2RAD(89);
F32 zcam_overrot_min = DEG2RAD(25);
F32 zcam_overrot_mid = DEG2RAD(90);
F32 zcam_overrot_max = DEG2RAD(170);
F32 zcam_overrot_rate = 0.1f;
F32 zcam_overrot_tstart = 1.5f;
F32 zcam_overrot_tend = 2.5f;
F32 zcam_overrot_velmin = 3.0f;
F32 zcam_overrot_velmax = 5.0f;
F32 zcam_overrot_tmanual = 1.5f;
F32 zcam_mintgtheight = FLOAT_MIN;

bool sNearToggleEnabled;
F32 sCamTweakLerp;
F32 sCamTweakTime;
Expand Down
1 change: 1 addition & 0 deletions src/SB/Game/zFX.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zFX.h"
2 changes: 1 addition & 1 deletion src/SB/Game/zFX.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ struct popper_data
F32* weight;
};

extern U32 gFXSurfaceFlags;
U32 gFXSurfaceFlags;

void on_spawn_bubble_wall(const tweak_info& tweak);
void zFX_SceneEnter(RpWorld* world);
Expand Down
1 change: 1 addition & 0 deletions src/SB/Game/zFXRibbonPool.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zFXRibbonPool.h"
4 changes: 4 additions & 0 deletions src/SB/Game/zFXRibbonPool.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef ZFXRIBBONPOOL_H
#define ZFXRIBBONPOOL_H

#endif
4 changes: 4 additions & 0 deletions src/SB/Game/zFire.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef ZFIRE_H
#define ZFIRE_H

#endif
1 change: 1 addition & 0 deletions src/SB/Game/zFlameEmitter.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zFlameEmitter.h"
4 changes: 4 additions & 0 deletions src/SB/Game/zFlameEmitter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef ZFLAMEEMITTER_H
#define ZFLAMEEMITTER_H

#endif
17 changes: 8 additions & 9 deletions src/SB/Game/zGame.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
#include "zEntPlayer.h"
#include "zGameState.h"

extern eSNDCurrentPlayer gPendingPlayer;
extern F32 sTimeElapsed;
extern U32 gLevelChanged;
extern U32 startPressed;
extern U8 sHackSmoothedUpdate;
extern U32 gBusStopIsRunning;
//extern eSNDCurrentPlayer gPendingPlayer;
F32 sTimeElapsed;
U32 gLevelChanged;
U32 startPressed = -1;
//extern U8 sHackSmoothedUpdate;
//extern U32 gBusStopIsRunning;

enum _tagGameVidMode
{
Expand Down Expand Up @@ -106,9 +106,8 @@ enum eGameWhereAmI
eGameWhere_SetupPlayerEnd
};

extern iTime sTimeCurrent;
extern iTime sTimeLast;
extern F32 sTimeElapsed;
iTime sTimeCurrent;
iTime sTimeLast;

void zGameSetupPlayer();
void xDrawBegin();
Expand Down
1 change: 1 addition & 0 deletions src/SB/Game/zLasso.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zLasso.h"
1 change: 1 addition & 0 deletions src/SB/Game/zMain.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zMain.h"
1 change: 1 addition & 0 deletions src/SB/Game/zMenuSB.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zMenuSB.h"
4 changes: 4 additions & 0 deletions src/SB/Game/zMenuSB.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef ZMENUSB_H
#define ZMENUSB_H

#endif
1 change: 1 addition & 0 deletions src/SB/Game/zMovePoint.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zMovePoint.h"
1 change: 1 addition & 0 deletions src/SB/Game/zMusic.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zMusic.h"
1 change: 1 addition & 0 deletions src/SB/Game/zNPC.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zNPC.h"
4 changes: 4 additions & 0 deletions src/SB/Game/zNPC.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef ZNPC_H
#define ZNPC_H

#endif
1 change: 1 addition & 0 deletions src/SB/Game/zNPCTypes.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zNPCTypes.h"
1 change: 1 addition & 0 deletions src/SB/Game/zParEmitter.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zParEmitter.h"
1 change: 1 addition & 0 deletions src/SB/Game/zParPTank.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zParPTank.h"
1 change: 1 addition & 0 deletions src/SB/Game/zPendulum.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zPendulum.h"
1 change: 1 addition & 0 deletions src/SB/Game/zPickupTable.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zPickupTable.h"
1 change: 1 addition & 0 deletions src/SB/Game/zPlatform.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zPlatform.h"
8 changes: 0 additions & 8 deletions src/SB/Game/zPlayer.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
#include "zPlayer.h"

void zPlayerReset(zEnt* ent)
{
}

void zPlayerRender(zEnt* ent)
{
}
9 changes: 9 additions & 0 deletions src/SB/Game/zPlayerBase.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "zPlayerBase.h"

void zPlayerReset(zEnt* ent)
{
}

void zPlayerRender(zEnt* ent)
{
}
4 changes: 4 additions & 0 deletions src/SB/Game/zPlayerBase.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef ZPLAYERBASE_H
#define ZPLAYERBASE_H

#endif
1 change: 1 addition & 0 deletions src/SB/Game/zPortal.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zPortal.h"
Empty file added src/SB/Game/zRaceTimer.cpp
Empty file.
4 changes: 4 additions & 0 deletions src/SB/Game/zRaceTimer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef ZRACETIMER_H
#define ZRACETIMER_H

#endif
4 changes: 4 additions & 0 deletions src/SB/Game/zReactiveAnimation.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef ZREACTIVEANIMATION_H
#define ZREACTIVEANIMATION_H

#endif
1 change: 1 addition & 0 deletions src/SB/Game/zReference.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zReference.h"
4 changes: 4 additions & 0 deletions src/SB/Game/zReference.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef ZREFERENCE_H
#define ZREFERENCE_H

#endif
Empty file added src/SB/Game/zRing.cpp
Empty file.
1 change: 1 addition & 0 deletions src/SB/Game/zRing.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zRing.h"
1 change: 1 addition & 0 deletions src/SB/Game/zRingControl.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "zRingControl.h"
4 changes: 4 additions & 0 deletions src/SB/Game/zRingControl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef ZRINGCONTROL_H
#define ZRINGCONTROL_H

#endif
Loading