Skip to content

Commit b706ecf

Browse files
committed
zWad general cleanup
1 parent 8ba7265 commit b706ecf

File tree

11 files changed

+248
-251
lines changed

11 files changed

+248
-251
lines changed

src/SB/Core/x/xMath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// #undef ONEEIGHTY
2222
// #define PI _771_1
2323
// #define ONEEIGHTY _778_0
24-
#define PI 3.1415927f
24+
#define PI 3.141592653589793
2525
#define ONEEIGHTY 180.0f
2626

2727
#define DEG2RAD(x) ((PI) * (x) / (ONEEIGHTY))

src/SB/Core/x/xSGT.cpp

Lines changed: 0 additions & 75 deletions
This file was deleted.

src/SB/Core/x/xsavegame.cpp

Whitespace-only changes.

src/SB/Game/zCamera.h

Lines changed: 61 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -38,68 +38,73 @@ struct zCamTweakLook
3838
F32 pitch;
3939
};
4040

41-
extern F32 zcam_overrot_tmr;
42-
extern S32 zcam_near;
43-
extern S32 zcam_mode;
44-
extern S32 zcam_bbounce;
45-
extern S32 zcam_lbbounce;
46-
extern S32 zcam_convers;
47-
extern S32 zcam_lconvers;
48-
extern S32 zcam_longbounce;
49-
extern S32 zcam_highbounce;
50-
extern S32 zcam_cutscene;
51-
extern S32 zcam_reward;
52-
extern xVec3* zcam_playervel;
53-
extern S32 zcam_fly;
54-
extern S32 zcam_flypaused;
55-
extern void* zcam_flydata;
56-
extern U32 zcam_flysize;
57-
extern F32 zcam_flytime;
58-
extern U32 zcam_flyasset_current;
59-
extern xCamAsset* zcam_dest;
60-
extern F32 zcam_tmr;
61-
extern F32 zcam_ttm;
62-
extern F32 zcam_fovcurr;
63-
extern F32 zcam_fovdest;
64-
41+
// unknown if these are even used?
6542
extern xCamera zcam_backupcam;
6643
extern xCamera zcam_backupconvers;
6744
extern xQuat zcam_quat;
6845

69-
extern F32 zcam_pad_pyaw_scale;
70-
extern F32 zcam_pad_pitch_scale;
71-
extern F32 zcam_near_d;
72-
extern F32 zcam_near_h;
73-
extern F32 zcam_near_pitch;
74-
extern F32 zcam_far_d;
75-
extern F32 zcam_far_h;
76-
extern F32 zcam_far_pitch;
77-
extern F32 zcam_wall_d;
78-
extern F32 zcam_wall_h;
79-
extern F32 zcam_wall_pitch;
80-
extern F32 zcam_above_d;
81-
extern F32 zcam_above_h;
82-
extern F32 zcam_above_pitch;
83-
extern F32 zcam_below_d;
84-
extern F32 zcam_below_h;
85-
extern F32 zcam_below_pitch;
86-
extern F32 zcam_highbounce_d;
87-
extern F32 zcam_highbounce_h;
88-
extern F32 zcam_highbounce_pitch;
89-
extern F32 zcam_overrot_min;
90-
extern F32 zcam_overrot_mid;
91-
extern F32 zcam_overrot_max;
92-
extern F32 zcam_overrot_rate;
93-
extern F32 zcam_overrot_tstart;
94-
extern F32 zcam_overrot_tend;
95-
extern F32 zcam_overrot_velmin;
96-
extern F32 zcam_overrot_velmax;
97-
extern F32 zcam_overrot_tmanual;
98-
extern F32 zcam_mintgtheight;
99-
100-
46+
// .sbss
47+
F32 zcam_overrot_tmr;
48+
S32 zcam_near;
10149
U8 zcam_centering;
10250
U8 zcam_lastcentering;
51+
S32 zcam_mode;
52+
S32 zcam_bbounce;
53+
S32 zcam_lbbounce;
54+
S32 zcam_convers;
55+
S32 zcam_lconvers;
56+
S32 zcam_longbounce;
57+
S32 zcam_highbounce;
58+
S32 zcam_cutscene;
59+
S32 zcam_reward;
60+
xVec3* zcam_playervel;
61+
S32 zcam_fly;
62+
S32 zcam_flypaused;
63+
void* zcam_flydata;
64+
U32 zcam_flysize;
65+
F32 zcam_flytime;
66+
F32 zcam_flyrate;
67+
S32 zcam_flyJustStopped;
68+
xCamAsset* zcam_dest;
69+
F32 zcam_tmr;
70+
F32 zcam_ttm;
71+
F32 zcam_fovcurr;
72+
F32 zcam_fovdest;
73+
U32 zcam_flyasset_current;
74+
S32 sCamTweakCount;
75+
// .sdata
76+
77+
F32 zcam_pad_pyaw_scale = 0.18124573f; // unknown math
78+
F32 zcam_pad_pitch_scale = 1.0f / 52;
79+
F32 zcam_near_d = 3.0f;
80+
F32 zcam_near_h = 1.8f;
81+
F32 zcam_near_pitch = DEG2RAD(10);
82+
F32 zcam_far_d = 5.0f;
83+
F32 zcam_far_h = 3.0f;
84+
F32 zcam_far_pitch = DEG2RAD(15);
85+
F32 zcam_wall_d = 7.5f;
86+
F32 zcam_wall_h = 2.0f;
87+
F32 zcam_wall_pitch = DEG2RAD(18);
88+
F32 zcam_above_d = 0.2f;
89+
F32 zcam_above_h = 2.2f;
90+
F32 zcam_above_pitch = DEG2RAD(70);
91+
F32 zcam_below_d = 0.6f;
92+
F32 zcam_below_h = 0.2f;
93+
F32 zcam_below_pitch = DEG2RAD(-70);
94+
F32 zcam_highbounce_d = 0.2f;
95+
F32 zcam_highbounce_h = 5.0f;
96+
F32 zcam_highbounce_pitch = DEG2RAD(89);
97+
F32 zcam_overrot_min = DEG2RAD(25);
98+
F32 zcam_overrot_mid = DEG2RAD(90);
99+
F32 zcam_overrot_max = DEG2RAD(170);
100+
F32 zcam_overrot_rate = 0.1f;
101+
F32 zcam_overrot_tstart = 1.5f;
102+
F32 zcam_overrot_tend = 2.5f;
103+
F32 zcam_overrot_velmin = 3.0f;
104+
F32 zcam_overrot_velmax = 5.0f;
105+
F32 zcam_overrot_tmanual = 1.5f;
106+
F32 zcam_mintgtheight = FLOAT_MIN;
107+
103108
bool sNearToggleEnabled;
104109
F32 sCamTweakLerp;
105110
F32 sCamTweakTime;

src/SB/Game/zFX.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ struct popper_data
7777
F32* weight;
7878
};
7979

80-
extern U32 gFXSurfaceFlags;
80+
U32 gFXSurfaceFlags;
8181

8282
void on_spawn_bubble_wall(const tweak_info& tweak);
8383
void zFX_SceneEnter(RpWorld* world);

src/SB/Game/zGame.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
#include "zEntPlayer.h"
55
#include "zGameState.h"
66

7-
extern eSNDCurrentPlayer gPendingPlayer;
8-
extern F32 sTimeElapsed;
9-
extern U32 gLevelChanged;
10-
extern U32 startPressed;
11-
extern U8 sHackSmoothedUpdate;
12-
extern U32 gBusStopIsRunning;
7+
//extern eSNDCurrentPlayer gPendingPlayer;
8+
F32 sTimeElapsed;
9+
U32 gLevelChanged;
10+
U32 startPressed = -1;
11+
//extern U8 sHackSmoothedUpdate;
12+
//extern U32 gBusStopIsRunning;
1313

1414
enum _tagGameVidMode
1515
{
@@ -106,9 +106,8 @@ enum eGameWhereAmI
106106
eGameWhere_SetupPlayerEnd
107107
};
108108

109-
extern iTime sTimeCurrent;
110-
extern iTime sTimeLast;
111-
extern F32 sTimeElapsed;
109+
iTime sTimeCurrent;
110+
iTime sTimeLast;
112111

113112
void zGameSetupPlayer();
114113
void xDrawBegin();

0 commit comments

Comments
 (0)