@@ -60,14 +60,25 @@ CVAR (sv_maxplayers, "0", "maximum players who can join the game, others are sp
60
60
void C_AddTabCommand(char const *) {}
61
61
void C_RemoveTabCommand (char const *) {}
62
62
void P_ShowSpawns (MapThing*) {}
63
+ void P_SpawnPlayer (player_t &, mapthing2_t *) {}
63
64
void G_DeathMatchSpawnPlayer (player_t &) {}
64
- player_t & consoleplayer () { static player_t fake{}; return fake ; }
65
- player_t & displayplayer () { static player_t fake{}; return fake ; }
65
+ player_t & consoleplayer () { return idplayer (consoleplayer_id) ; }
66
+ player_t & displayplayer () { return idplayer (displayplayer_id) ; }
66
67
67
68
void BuildDefaultShademap (palette_t const *, shademap_t &) {}
68
69
palindex_t V_BestColor (const argb_t * palette_colors, int r, int g, int b) { return 0 ; }
69
70
palindex_t V_BestColor (const argb_t *palette_colors, argb_t color) { return 0 ; }
70
- bool R_AlignFlat (int ,int ,int ) { return false ; }
71
+
72
+ argb_t V_GetColorFromString (const std::string& str)
73
+ {
74
+ return 0 ;
75
+ }
76
+
77
+ const palette_t * V_GetDefaultPalette ()
78
+ {
79
+ static palette_t default_palette;
80
+ return &default_palette;
81
+ }
71
82
72
83
void D_SendServerInfoChange (const cvar_t *cvar, const char *value) {}
73
84
void D_DoServerInfoChange (byte **stream) {}
@@ -106,11 +117,6 @@ void R_ExitLevel() {}
106
117
void D_SetupUserInfo (void ) {}
107
118
void D_UserInfoChanged (cvar_t *cvar) {}
108
119
109
- argb_t V_GetColorFromString (const std::string& str)
110
- {
111
- return 0 ;
112
- }
113
-
114
120
void PickupMessage (AActor *toucher, const char *message) {}
115
121
void WeaponPickupMessage (AActor *toucher, weapontype_t &Weapon) {}
116
122
@@ -120,38 +126,18 @@ void RefreshPalettes (void) {}
120
126
121
127
void V_RefreshColormaps () {}
122
128
123
- size_t C_BasePrint (const int printlevel, const char * color_code, const std::string& str) { return 0 ; }
129
+ void C_MidPrint (const char *msg, player_t *p, int msgtime) {}
130
+ size_t C_BasePrint (const int printlevel, const char * color_code, const std::string& str) { fmt::print (str); }
124
131
125
- //
126
- // [RH] Print sound debug info. Called from D_Display()
127
- //
128
132
void S_NoiseDebug () {}
129
-
130
-
131
- //
132
- // Internals.
133
- //
134
-
135
- //
136
- // Initializes sound stuff, including volume
137
- // Sets channels, SFX and music volume,
138
- // allocates channel buffer, sets S_sfx lookup.
139
- //
140
- void S_Init (float sfxVolume, float musicVolume)
141
- {
142
- // [RH] Read in sound sequences
143
- // NumSequences = 0;
144
- }
145
-
133
+ void S_Init (float sfxVolume, float musicVolume) {}
146
134
void S_Start () {}
147
135
void S_Stop () {}
148
136
void S_SoundID (int channel, int sound_id, float volume, int attenuation) {}
149
137
void S_SoundID (AActor *ent, int channel, int sound_id, float volume, int attenuation) {}
150
138
void S_SoundID (fixed_t *pt, int channel, int sound_id, float volume, int attenuation) {}
151
139
void S_LoopedSoundID (AActor *ent, int channel, int sound_id, float volume, int attenuation) {}
152
140
void S_LoopedSoundID (fixed_t *pt, int channel, int sound_id, float volume, int attenuation) {}
153
-
154
- // [Russell] - Hack to stop multiple plat stop sounds
155
141
void S_PlatSound (fixed_t *pt, int channel, const char *name, float volume, int attenuation) {}
156
142
void S_Sound (int channel, const char *name, float volume, int attenuation) {}
157
143
void S_Sound (AActor *ent, int channel, const char *name, float volume, int attenuation) {}
@@ -163,49 +149,20 @@ void S_StopSound(fixed_t *pt) {}
163
149
void S_StopSound (fixed_t *pt, int channel) {}
164
150
void S_StopSound (AActor *ent, int channel) {}
165
151
void S_StopAllChannels () {}
166
-
167
- // Moves all the sounds from one thing to another. If the destination is
168
- // NULL, then the sound becomes a positioned sound.
169
152
void S_RelinkSound (AActor *from, AActor *to) {}
170
-
171
- bool S_GetSoundPlayingInfo (fixed_t *pt, int sound_id)
172
- {
173
- return false ;
174
- }
175
-
176
- bool S_GetSoundPlayingInfo (AActor *ent, int sound_id)
177
- {
178
- return S_GetSoundPlayingInfo (ent ? &ent->x : NULL , sound_id);
179
- }
180
-
181
- //
182
- // Stop and resume music, during game PAUSE.
183
- //
153
+ bool S_GetSoundPlayingInfo (fixed_t *pt, int sound_id) { return false ; }
154
+ bool S_GetSoundPlayingInfo (AActor *ent, int sound_id) { return S_GetSoundPlayingInfo (ent ? &ent->x : NULL , sound_id); }
184
155
void S_PauseSound () {}
185
-
186
156
void S_ResumeSound () {}
187
-
188
- //
189
- // Updates music & sounds
190
- //
191
157
void S_UpdateSounds (void *listener_p) {}
192
-
193
158
void S_UpdateMusic () {}
194
-
195
159
void S_SetMusicVolume (float volume) {}
196
-
197
160
void S_SetSfxVolume (float volume) {}
198
-
199
- //
200
- // Starts some music with the music id found in sounds.h.
201
- //
202
161
void S_StartMusic (const char *m_id) {}
203
-
204
- // [RH] S_ChangeMusic() now accepts the name of the music lump.
205
- // It's up to the caller to figure out what that name is.
206
162
void S_ChangeMusic (std::string musicname, bool looping) {}
207
-
208
163
void S_StopMusic () {}
164
+ void A_Ambient (AActor *actor) {}
165
+ void S_ActivateAmbient (AActor *origin, int ambient) {}
209
166
210
167
211
168
// [RH] ===============================
@@ -527,9 +484,6 @@ void S_ParseSndInfo()
527
484
S_HashSounds ();
528
485
}
529
486
530
- void A_Ambient (AActor *actor) {}
531
- void S_ActivateAmbient (AActor *origin, int ambient) {}
532
-
533
487
void AM_SetBaseColorDoom () {}
534
488
void AM_SetBaseColorRaven () {}
535
489
void AM_SetBaseColorStrife () {}
@@ -549,10 +503,22 @@ void SV_OnActivatedLine(line_t* line, AActor* mo, const int side,
549
503
const LineActivationType activationType, const bool bossaction) {}
550
504
void UV_SoundAvoidPlayer (AActor *mo, byte channel, const char *name, byte attenuation) {}
551
505
void OnChangedSwitchTexture (line_t *line, int useAgain) {}
552
- void C_MidPrint (const char *msg, player_t *p, int msgtime) {}
506
+
507
+ void R_RotatePoint (fixed_t x, fixed_t y, angle_t ang, fixed_t &tx, fixed_t &ty)
508
+ {
509
+ int index = ang >> ANGLETOFINESHIFT;
510
+
511
+ tx = FixedMul (x, finecosine[index ]) - FixedMul (y, finesine[index ]);
512
+ ty = FixedMul (x, finesine[index ]) + FixedMul (y, finecosine[index ]);
513
+ }
553
514
554
515
#define R_P2ATHRESHOLD (INT_MAX / 4 )
555
516
517
+ angle_t R_PointToAngle (fixed_t x, fixed_t y)
518
+ {
519
+ return R_PointToAngle2 (viewx, viewy, x, y);
520
+ }
521
+
556
522
angle_t R_PointToAngle2 (fixed_t viewx, fixed_t viewy, fixed_t x, fixed_t y)
557
523
{
558
524
x -= viewx;
@@ -642,6 +608,7 @@ translationref_t::translationref_t(const translationref_t &other) : m_table(othe
642
608
translationref_t ::translationref_t (const byte *table) : m_table(table), m_player_id(-1 ) {}
643
609
translationref_t ::translationref_t (const byte *table, const int player_id) : m_table(table), m_player_id(player_id) {}
644
610
611
+ shaderef_t ::shaderef_t () : m_colors(NULL ), m_mapnum(-1 ), m_colormap(NULL ), m_shademap(NULL ) {}
645
612
shaderef_t ::shaderef_t (const shademap_t * const colors, const int mapnum) : m_colors(colors), m_mapnum(mapnum)
646
613
{
647
614
#if ODAMEX_DEBUG
@@ -692,28 +659,6 @@ shaderef_t::shaderef_t(const shademap_t * const colors, const int mapnum) : m_co
692
659
}
693
660
}
694
661
695
- static palette_t default_palette;
696
-
697
- const palette_t * V_GetDefaultPalette ()
698
- {
699
- return &default_palette;
700
- }
701
-
702
- void P_SpawnPlayer (player_t &, mapthing2_t *) {}
703
- void CTF_CheckFlags (player_t &player)
704
- {
705
- for (size_t i = 0 ; i < NUMTEAMS; i++)
706
- {
707
- if (player.flags [i])
708
- {
709
- player.flags [i] = false ;
710
- GetTeamInfo ((team_t )i)->FlagData .flagger = 0 ;
711
- }
712
- }
713
- }
714
-
715
- shaderef_t ::shaderef_t () : m_colors(NULL ), m_mapnum(-1 ), m_colormap(NULL ), m_shademap(NULL ) {}
716
-
717
662
dyncolormap_t NormalLight;
718
663
719
664
dyncolormap_t *GetSpecialLights (int lr, int lg, int lb, int fr, int fg, int fb)
@@ -750,12 +695,16 @@ dyncolormap_t *GetSpecialLights (int lr, int lg, int lb, int fr, int fg, int fb)
750
695
return colormap;
751
696
}
752
697
753
- void R_RotatePoint ( fixed_t x, fixed_t y, angle_t ang, fixed_t &tx, fixed_t &ty )
698
+ void CTF_CheckFlags ( player_t &player )
754
699
{
755
- int index = ang >> ANGLETOFINESHIFT;
756
-
757
- tx = FixedMul (x, finecosine[index ]) - FixedMul (y, finesine[index ]);
758
- ty = FixedMul (x, finesine[index ]) + FixedMul (y, finecosine[index ]);
700
+ for (size_t i = 0 ; i < NUMTEAMS; i++)
701
+ {
702
+ if (player.flags [i])
703
+ {
704
+ player.flags [i] = false ;
705
+ GetTeamInfo ((team_t )i)->FlagData .flagger = 0 ;
706
+ }
707
+ }
759
708
}
760
709
761
710
VERSION_CONTROL (test_stubs_cpp, " $Id$" )
0 commit comments