diff --git a/source/games/duke/src/duke3d.h b/source/games/duke/src/duke3d.h index 49d599814..c19cfd850 100644 --- a/source/games/duke/src/duke3d.h +++ b/source/games/duke/src/duke3d.h @@ -37,8 +37,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_DUKE_NS -extern int32_t g_fakeMultiMode; - #define VOLUMEALL (g_Shareware == 0) #define PLUTOPAK (true)//g_scriptVersion >= 14) #define VOLUMEONE (g_Shareware == 1) diff --git a/source/games/duke/src/game.h b/source/games/duke/src/game.h index bfed2796d..9b92374c0 100644 --- a/source/games/duke/src/game.h +++ b/source/games/duke/src/game.h @@ -194,19 +194,14 @@ static inline int Menu_HaveUserMap(void) extern const char *defaultrtsfilename[GAMECOUNT]; extern const char *G_DefaultRtsFile(void); -extern int32_t g_Debug; extern int32_t g_Shareware; extern int32_t cameraclock; extern int32_t cameradist; extern int32_t g_crosshairSum; extern int32_t g_doQuickSave; extern int32_t g_levelTextTime; -extern int32_t g_quitDeadline; extern int32_t restorepalette; extern int32_t tempwallptr; -extern int32_t ticrandomseed; -extern int32_t vote_map; -extern int32_t voting; //extern int8_t cheatbuf[MAXCHEATLEN],cheatbuflen; @@ -221,8 +216,6 @@ void Yax_SetBunchZs(int32_t sectnum, int32_t cf, int32_t daz); #define Yax_SetBunchZs(sectnum, cf, daz) #endif -void G_PostCreateGameState(void); - void ceilingglass(int spriteNum,int sectNum,int glassCnt); void spriteglass(int spriteNum,int glassCnt); void lotsofcolourglass(int spriteNum,int wallNum,int glassCnt); @@ -244,8 +237,6 @@ void G_HandleMirror(int32_t x, int32_t y, int32_t z, fix16_t a, fix16_t horiz, i void G_DrawRooms(int32_t playerNum,int32_t smoothratio); void G_DrawTXDigiNumZ(int32_t starttile,int32_t x,int32_t y,int32_t n,int32_t s,int32_t pal,int32_t cs,int32_t x1,int32_t y1,int32_t x2,int32_t y2,int32_t z); void G_HandleLocalKeys(void); -void G_HandleSpecialKeys(void); -//void G_SE40(int32_t smoothratio); void G_UpdatePlayerFromMenu(void); void FTA(int q, struct player_struct* p); diff --git a/source/games/duke/src/gameexec.h b/source/games/duke/src/gameexec.h index f86e28104..578ab14ec 100644 --- a/source/games/duke/src/gameexec.h +++ b/source/games/duke/src/gameexec.h @@ -107,8 +107,6 @@ static FORCE_INLINE int32_t VM_OnEventWithReturn(int nEventID, int spriteNum, in } -extern int32_t ticrandomseed; - void execute(int s, int p, int d); void makeitfall(int s); diff --git a/source/games/duke/src/player.h b/source/games/duke/src/player.h index 3b2e643d5..b8bc848a4 100644 --- a/source/games/duke/src/player.h +++ b/source/games/duke/src/player.h @@ -370,10 +370,7 @@ extern playerspawn_t g_playerSpawnPoints[MAXPLAYERS]; extern playerdata_t *const g_player; extern hudweapon_t hudweap; extern int32_t g_levelTextTime; -extern int32_t g_numObituaries; -extern int32_t g_numSelfObituaries; extern int32_t mouseyaxismode; -extern int32_t ticrandomseed; #define SHOOT_HARDCODED_ZVEL INT32_MIN diff --git a/source/games/duke/src/premap.h b/source/games/duke/src/premap.h index 157a32941..ac35d7c2f 100644 --- a/source/games/duke/src/premap.h +++ b/source/games/duke/src/premap.h @@ -28,7 +28,6 @@ BEGIN_DUKE_NS extern int16_t ambientlotag[64]; extern int16_t ambienthitag[64]; extern int32_t g_levelTextTime; -extern int32_t voting,vote_map,vote_episode; int G_EnterLevel(int gameMode); int G_FindLevelByFile(const char *fileName); void G_CacheMapData(void); diff --git a/source/games/duke/src/zz_actors.h b/source/games/duke/src/zz_actors.h index 8f5783f98..4fc8e991c 100644 --- a/source/games/duke/src/zz_actors.h +++ b/source/games/duke/src/zz_actors.h @@ -239,7 +239,6 @@ extern actor_t* hittype; extern int32_t g_noEnemies; #define actor_tog g_noEnemies extern int32_t otherp; -extern int32_t ticrandomseed; extern int g_canSeePlayer; int LocateTheLocator(int const tag, int const sectNum); diff --git a/source/games/duke/src/zz_game.cpp b/source/games/duke/src/zz_game.cpp index edbfa219d..9c21d105b 100644 --- a/source/games/duke/src/zz_game.cpp +++ b/source/games/duke/src/zz_game.cpp @@ -50,57 +50,34 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // also uncomment ENGINE_CLEAR_SCREEN in build/src/engine_priv.h. //#define DEBUG_MIRRORS_ONLY -# define GAME_INLINE inline -# define GAME_STATIC static - BEGIN_DUKE_NS void SetDispatcher(); void InitCheats(); void checkcommandline(); int registerosdcommands(void); +int32_t G_MoveLoop(void); int16_t max_ammo_amount[MAX_WEAPONS]; uint8_t shadedsector[MAXSECTORS]; -int32_t g_fakeMultiMode = 0; -int32_t g_quitDeadline = 0; - int32_t cameradist = 0, cameraclock = 0; -static int32_t g_quickExit; char boardfilename[BMAX_PATH] = {0}; -int32_t voting = -1; -int32_t vote_map = -1, vote_episode = -1; - -int32_t g_Debug = 0; - int32_t g_Shareware = 0; int32_t tempwallptr; static int32_t nonsharedtimer; -int32_t ticrandomseed; - -GAME_STATIC GAME_INLINE int32_t G_MoveLoop(void); - int32_t g_levelTextTime = 0; -#if defined(RENDERTYPEWIN) && defined(USE_OPENGL) -extern char forcegl; -#endif - static void gameTimerHandler(void) { S_Update(); - G_HandleSpecialKeys(); -} -void G_HandleSpecialKeys(void) -{ // we need CONTROL_GetInput in order to pick up joystick button presses if (!(g_player[myconnectindex].ps->gm & MODE_GAME)) { @@ -118,11 +95,7 @@ void se40code(int tag, int x, int y, int z, int a, int h, int smoothratio); void G_HandleMirror(int32_t x, int32_t y, int32_t z, fix16_t a, fix16_t q16horiz, int32_t smoothratio) { - if ((gotpic[TILE_MIRROR>>3]&(1<<(TILE_MIRROR&7))) -#ifdef POLYMER - && (videoGetRenderMode() != REND_POLYMER) -#endif - ) + if ((gotpic[TILE_MIRROR>>3]&(1<<(TILE_MIRROR&7)))) { if (mirrorcnt == 0) { @@ -185,18 +158,7 @@ void G_HandleMirror(int32_t x, int32_t y, int32_t z, fix16_t a, fix16_t q16horiz g_visibility = j; } -#ifdef SPLITSCREEN_MOD_HACKS - if (!g_fakeMultiMode) -#endif - { - // HACK for splitscreen mod: this is so that mirrors will be drawn - // from showview commands. Ugly, because we'll attempt do draw mirrors - // each frame then. But it's better than not drawing them, I guess. - // XXX: fix the sequence of setting/clearing this bit. Right now, - // we always draw one frame without drawing the mirror, after which - // the bit gets set and drawn subsequently. - gotpic[TILE_MIRROR>>3] &= ~(1<<(TILE_MIRROR&7)); - } + gotpic[TILE_MIRROR>>3] &= ~(1<<(TILE_MIRROR&7)); } } @@ -630,32 +592,6 @@ static int G_MaybeTakeOnFloorPal(tspritetype *pSprite, int sectNum) return 0; } -template -static int getofs_viewtype(int angDiff) -{ - return ((((angDiff + 3072) & 2047) * rotations + 1024) >> 11) % rotations; -} - -template -static int viewtype_mirror(uint16_t & cstat, int frameOffset) -{ - if (frameOffset > rotations / 2) - { - cstat |= 4; - return rotations - frameOffset; - } - - cstat &= ~4; - return frameOffset; -} - -template -static int getofs_viewtype_mirrored(uint16_t & cstat, int angDiff) -{ - return viewtype_mirror(cstat, getofs_viewtype(angDiff)); -} - - void G_InitTimer(int32_t ticspersec) { @@ -995,11 +931,6 @@ static inline void G_CheckGametype(void) ud.m_respawn_items = ud.m_respawn_inventory = 1; } -void G_PostCreateGameState(void) -{ - Net_SendClientInfo(); -} - inline int G_CheckPlayerColor(int color) { static int32_t player_pals[] = { 0, 9, 10, 11, 12, 13, 14, 15, 16, 21, 23, }; @@ -1024,7 +955,7 @@ static void G_Startup(void) // These depend on having the dynamic tile and/or sound mappings set up: G_InitMultiPsky(TILE_CLOUDYOCEAN, TILE_MOONSKY1, TILE_BIGORBIT1, TILE_LA); - G_PostCreateGameState(); + Net_SendClientInfo(); if (g_netServer || ud.multimode > 1) G_CheckGametype(); if (userConfig.CommandMap.IsNotEmpty()) @@ -1333,19 +1264,7 @@ int GameInterface::app_main() numplayers = 1; playerswhenstarted = ud.multimode; - if (!g_fakeMultiMode) - { - connectpoint2[0] = -1; - } - else - { - for (bssize_t i=0; i