mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- thinning out some garbage.
This commit is contained in:
parent
a8b0839592
commit
ab7774c6d7
8 changed files with 7 additions and 334 deletions
|
@ -67,7 +67,6 @@ SWBOOL DrawScreen;
|
|||
extern short f_c;
|
||||
|
||||
extern short HelpPage;
|
||||
extern short HelpPagePic[];
|
||||
extern ParentalStruct aVoxelArray[MAXTILES];
|
||||
|
||||
int ConnectCopySprite(uspritetype const * tsp);
|
||||
|
|
|
@ -113,16 +113,10 @@ SWBOOL ReloadPrompt = FALSE;
|
|||
SWBOOL NewGame = TRUE;
|
||||
SWBOOL InMenuLevel = FALSE;
|
||||
SWBOOL LoadGameOutsideMoveLoop = FALSE;
|
||||
SWBOOL LoadGameFromDemo = FALSE;
|
||||
extern SWBOOL NetBroadcastMode, NetModeOverride;
|
||||
//Miscellaneous variables
|
||||
char MessageInputString[256];
|
||||
char MessageOutputString[256];
|
||||
SWBOOL ConInputMode = FALSE;
|
||||
SWBOOL FinishedLevel = FALSE;
|
||||
SWBOOL PanelUpdateMode = TRUE;
|
||||
short HelpPage = 0;
|
||||
short HelpPagePic[] = { 5115, 5116, 5117 };
|
||||
SWBOOL InputMode = FALSE;
|
||||
SWBOOL MessageInput = FALSE;
|
||||
short screenpeek = 0;
|
||||
|
@ -167,13 +161,7 @@ SWBOOL SlowMode = FALSE;
|
|||
SWBOOL FrameAdvanceTics = 3;
|
||||
SWBOOL ScrollMode2D = FALSE;
|
||||
|
||||
SWBOOL DebugSO = FALSE;
|
||||
SWBOOL DebugPanel = FALSE;
|
||||
SWBOOL DebugSector = FALSE;
|
||||
SWBOOL DebugActor = FALSE;
|
||||
SWBOOL DebugAnim = FALSE;
|
||||
SWBOOL DebugOperate = FALSE;
|
||||
SWBOOL DebugActorFreeze = FALSE;
|
||||
void LoadingLevelScreen(void);
|
||||
|
||||
uint8_t FakeMultiNumPlayers;
|
||||
|
@ -212,7 +200,6 @@ int krandcount;
|
|||
|
||||
/// L O C A L P R O T O T Y P E S /////////////////////////////////////////////////////////
|
||||
void BOT_DeleteAllBots(void);
|
||||
void BotPlayerInsert(PLAYERp pp);
|
||||
void SybexScreen(void);
|
||||
void MenuLevel(void);
|
||||
void StatScreen(PLAYERp mpp);
|
||||
|
@ -687,9 +674,6 @@ void NewLevel(void)
|
|||
|
||||
StatScreen(&Player[myconnectindex]);
|
||||
|
||||
if (LoadGameFromDemo)
|
||||
LoadGameFromDemo = FALSE;
|
||||
else
|
||||
TerminateLevel();
|
||||
|
||||
InGame = FALSE;
|
||||
|
@ -916,22 +900,6 @@ void _Assert(const char *expr, const char *strFile, unsigned uLine)
|
|||
I_FatalError("Assertion failed: %s %s, line %u", expr, strFile, uLine);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void dsprintf(char *str, const char *format, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
|
||||
va_start(arglist, format);
|
||||
vsprintf(str, format, arglist);
|
||||
va_end(arglist);
|
||||
}
|
||||
|
||||
void dsprintf_null(char *str, const char *format, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
}
|
||||
|
||||
void getinput(SW_PACKET *, SWBOOL);
|
||||
|
||||
void MoveLoop(void)
|
||||
|
@ -1104,37 +1072,6 @@ void RunLevel(void)
|
|||
ready2send = 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
Map -> User Map Name
|
||||
Auto -> Auto Start Game
|
||||
Rules -> 0=WangBang 1=WangBang (No Respawn) 2=CoOperative
|
||||
Level -> 0 to 24(?)
|
||||
Enemy -> 0=None 1=Easy 2=Norm 3=Hard 4=Insane
|
||||
Markers -> 0=Off 1=On
|
||||
Team -> 0=Off 1=On
|
||||
HurtTeam -> 0=Off 1=On
|
||||
KillLimit -> 0=Infinite 1=10 2=20 3=30 4=40 5=50 6=60 7=70 8=80 9=90 10=100
|
||||
TimeLimit -> 0=Infinite 1=3 2=5 3=10 4=20 5=30 6=45 7=60
|
||||
Color -> 0=Brown 1=Purple 2=Red 3=Yellow 4=Olive 5=Green
|
||||
Nuke -> 0=Off 1=On
|
||||
|
||||
Example Command Line :
|
||||
sw -map testmap.map -autonet 0,0,1,1,1,0,3,2,1,1 -f4 -name 1234567890 -net 12345678
|
||||
commit -map grenade -autonet 0,0,1,1,1,0,3,2,1,1 -name frank
|
||||
#endif
|
||||
|
||||
char isShareware = FALSE;
|
||||
|
||||
int DetectShareware(void)
|
||||
{
|
||||
return (isShareware = !!(g_gameType & GAMEFLAG_SHAREWARE));
|
||||
}
|
||||
|
||||
|
||||
void CommandLineHelp(char const * const * argv)
|
||||
{
|
||||
}
|
||||
|
||||
static const char* actions[] = {
|
||||
"Move_Forward",
|
||||
"Move_Backward",
|
||||
|
@ -1186,12 +1123,6 @@ int32_t GameInterface::app_main()
|
|||
|
||||
gs = gs_defaults;
|
||||
|
||||
if (!DetectShareware())
|
||||
{
|
||||
if (SW_SHAREWARE) Printf("Detected shareware GRP\n");
|
||||
else Printf("Detected registered GRP\n");
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_SW_PLAYERS; i++)
|
||||
INITLIST(&Player[i].PanelSpriteList);
|
||||
|
||||
|
@ -1214,100 +1145,6 @@ int32_t GameInterface::app_main()
|
|||
return 0;
|
||||
}
|
||||
|
||||
void ManualPlayerInsert(PLAYERp pp)
|
||||
{
|
||||
PLAYERp npp = Player + numplayers;
|
||||
|
||||
if (numplayers < MAX_SW_PLAYERS)
|
||||
{
|
||||
connectpoint2[numplayers - 1] = numplayers;
|
||||
connectpoint2[numplayers] = -1;
|
||||
|
||||
npp->posx = pp->posx;
|
||||
npp->posy = pp->posy;
|
||||
npp->posz = pp->posz;
|
||||
npp->q16ang = pp->q16ang;
|
||||
npp->cursectnum = pp->cursectnum;
|
||||
|
||||
myconnectindex = numplayers;
|
||||
screenpeek = numplayers;
|
||||
|
||||
sprintf(Player[myconnectindex].PlayerName,"PLAYER %d",myconnectindex+1);
|
||||
|
||||
Player[numplayers].movefifoend = Player[0].movefifoend;
|
||||
|
||||
// If IsAI = TRUE, new player will be a bot
|
||||
Player[myconnectindex].IsAI = FALSE;
|
||||
|
||||
numplayers++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void BotPlayerInsert(PLAYERp pp)
|
||||
{
|
||||
PLAYERp npp = Player + numplayers;
|
||||
|
||||
if (numplayers < MAX_SW_PLAYERS)
|
||||
{
|
||||
connectpoint2[numplayers - 1] = numplayers;
|
||||
connectpoint2[numplayers] = -1;
|
||||
|
||||
npp->posx = pp->posx;
|
||||
npp->posy = pp->posy;
|
||||
npp->posz = pp->posz-Z(100);
|
||||
npp->q16ang = pp->q16ang;
|
||||
npp->cursectnum = pp->cursectnum;
|
||||
|
||||
//myconnectindex = numplayers;
|
||||
//screenpeek = numplayers;
|
||||
|
||||
sprintf(Player[numplayers].PlayerName,"BOT %d",numplayers+1);
|
||||
|
||||
Player[numplayers].movefifoend = Player[0].movefifoend;
|
||||
|
||||
// If IsAI = TRUE, new player will be a bot
|
||||
Player[numplayers].IsAI = TRUE;
|
||||
|
||||
numplayers++;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ManualPlayerDelete(void)
|
||||
{
|
||||
short i, nexti;
|
||||
USERp u;
|
||||
PLAYERp pp;
|
||||
|
||||
if (numplayers > 1)
|
||||
{
|
||||
numplayers--;
|
||||
connectpoint2[numplayers - 1] = -1;
|
||||
|
||||
pp = Player + numplayers;
|
||||
|
||||
KillSprite(pp->PlayerSprite);
|
||||
pp->PlayerSprite = -1;
|
||||
|
||||
// Make sure enemys "forget" about deleted player
|
||||
TRAVERSE_SPRITE_STAT(headspritestat[STAT_ENEMY], i, nexti)
|
||||
{
|
||||
u = User[i];
|
||||
if (u->tgt_sp == pp->SpriteP)
|
||||
u->tgt_sp = Player[0].SpriteP;
|
||||
}
|
||||
|
||||
if (myconnectindex >= numplayers)
|
||||
myconnectindex = 0;
|
||||
|
||||
if (screenpeek >= numplayers)
|
||||
screenpeek = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
char WangBangMacro[10][64];
|
||||
|
||||
#define MAP_WHITE_SECTOR (LT_GREY + 2)
|
||||
|
|
|
@ -100,8 +100,7 @@ enum
|
|||
};
|
||||
|
||||
//#define SW_SHAREWARE 1 // This determines whether game is shareware compile or not!
|
||||
extern char isShareware;
|
||||
#define SW_SHAREWARE (isShareware)
|
||||
#define SW_SHAREWARE (!!(g_gameType & GAMEFLAG_SHAREWARE))
|
||||
|
||||
// Turn warning off for unreferenced variables.
|
||||
// I really should fix them at some point
|
||||
|
@ -121,9 +120,6 @@ void _Assert(const char *expr, const char *strFile, unsigned uLine);
|
|||
|
||||
#define MONO_PRINT(str)
|
||||
|
||||
void dsprintf_null(char *str, const char *format, ...);
|
||||
#define DSPRINTF dsprintf_null
|
||||
//#define DSPRINTF()
|
||||
|
||||
#define HEAP_CHECK()
|
||||
#define RANDOM_DEBUG 0
|
||||
|
@ -174,10 +170,7 @@ y++
|
|||
//////////////////////////////////////////////////////
|
||||
|
||||
extern SWBOOL MenuInputMode;
|
||||
extern SWBOOL ConInputMode;
|
||||
extern SWBOOL InputMode;
|
||||
extern char MessageInputString[256];
|
||||
extern char MessageOutputString[256];
|
||||
|
||||
//
|
||||
// Defines
|
||||
|
@ -859,7 +852,7 @@ extern void (*InitWeapon[MAX_WEAPONS]) (PLAYERp);
|
|||
|
||||
#define MAX_SW_PLAYERS_SW (4)
|
||||
#define MAX_SW_PLAYERS_REG (8)
|
||||
#define MAX_SW_PLAYERS (isShareware ? MAX_SW_PLAYERS_SW : MAX_SW_PLAYERS_REG)
|
||||
#define MAX_SW_PLAYERS (SW_SHAREWARE ? MAX_SW_PLAYERS_SW : MAX_SW_PLAYERS_REG)
|
||||
|
||||
extern int ThemeTrack[6]; // w
|
||||
extern FString ThemeSongs[6]; //
|
||||
|
@ -2244,7 +2237,6 @@ void TerminateLevel(void); // game.c
|
|||
void drawoverheadmap(int cposx,int cposy,int czoom,short cang); // game.c
|
||||
void DrawMenuLevelScreen(void); // game.c
|
||||
void DebugWriteString(char *string); // game.c
|
||||
void ManualPlayerInsert(PLAYERp pp); // game.c
|
||||
|
||||
void getsyncstat(void); // sync.c
|
||||
void SyncStatMessage(void); // sync.c
|
||||
|
|
|
@ -104,11 +104,6 @@ int save_totalclock;
|
|||
|
||||
// must start out as 0
|
||||
|
||||
SWBOOL NetBroadcastMode = TRUE;
|
||||
SWBOOL NetModeOverride = FALSE;
|
||||
|
||||
|
||||
|
||||
void
|
||||
ResumeGame(void)
|
||||
{
|
||||
|
@ -139,94 +134,6 @@ waitforeverybody(void)
|
|||
}
|
||||
|
||||
|
||||
SWBOOL MyCommPlayerQuit(void)
|
||||
{
|
||||
PLAYERp pp;
|
||||
short i;
|
||||
short prev_player = 0;
|
||||
short found = FALSE;
|
||||
short quit_player_index = 0;
|
||||
|
||||
TRAVERSE_CONNECT(i)
|
||||
{
|
||||
if (TEST_SYNC_KEY(Player + i, SK_QUIT_GAME))
|
||||
{
|
||||
if (!NetBroadcastMode && i == connecthead)
|
||||
{
|
||||
// If it's the master, it should first send quit message to the slaves.
|
||||
// Each slave should automatically quit after receiving the message.
|
||||
if (i == myconnectindex)
|
||||
continue;
|
||||
QuitFlag = TRUE;
|
||||
ready2send = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
found = TRUE;
|
||||
|
||||
quit_player_index = i;
|
||||
|
||||
if (i != myconnectindex)
|
||||
{
|
||||
sprintf(ds,"%s has quit the game.",Player[i].PlayerName);
|
||||
Printf(PRINT_NOTIFY | PRINT_TEAMCHAT, "%s\n", ds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (found)
|
||||
{
|
||||
TRAVERSE_CONNECT(i)
|
||||
{
|
||||
pp = Player + i;
|
||||
|
||||
if (i == quit_player_index)
|
||||
{
|
||||
PLAYERp qpp = Player + quit_player_index;
|
||||
SET(qpp->SpriteP->cstat, CSTAT_SPRITE_INVISIBLE);
|
||||
RESET(qpp->SpriteP->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN|CSTAT_SPRITE_BLOCK_MISSILE);
|
||||
InitBloodSpray(qpp->PlayerSprite,TRUE,-2);
|
||||
InitBloodSpray(qpp->PlayerSprite,FALSE,-2);
|
||||
qpp->SpriteP->ang = NORM_ANGLE(qpp->SpriteP->ang + 1024);
|
||||
InitBloodSpray(qpp->PlayerSprite,FALSE,-1);
|
||||
InitBloodSpray(qpp->PlayerSprite,TRUE,-1);
|
||||
}
|
||||
|
||||
// have to reorder the connect list
|
||||
if (!TEST_SYNC_KEY(pp, SK_QUIT_GAME))
|
||||
{
|
||||
prev_player = i;
|
||||
continue;
|
||||
}
|
||||
|
||||
// if I get my own messages get out to DOS QUICKLY!!!
|
||||
if (i == myconnectindex)
|
||||
{
|
||||
QuitFlag = TRUE;
|
||||
ready2send = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// for COOP mode
|
||||
if (screenpeek == i)
|
||||
{
|
||||
screenpeek = connectpoint2[i];
|
||||
if (screenpeek < 0)
|
||||
screenpeek = connecthead;
|
||||
}
|
||||
|
||||
if (i == connecthead)
|
||||
connecthead = connectpoint2[connecthead];
|
||||
else
|
||||
connectpoint2[prev_player] = connectpoint2[i];
|
||||
|
||||
numplayers--;
|
||||
CommPlayers--;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
InitNetVars(void)
|
||||
|
|
|
@ -7091,14 +7091,11 @@ void
|
|||
UpdatePanel(void)
|
||||
{
|
||||
short pnum;
|
||||
extern SWBOOL DebugPanel,PanelUpdateMode;
|
||||
extern SWBOOL PanelUpdateMode;
|
||||
|
||||
if (!PanelUpdateMode)
|
||||
return;
|
||||
|
||||
if (DebugPanel)
|
||||
return;
|
||||
|
||||
TRAVERSE_CONNECT(pnum)
|
||||
{
|
||||
if (dimensionmode != 2 && pnum == screenpeek)
|
||||
|
@ -7110,14 +7107,11 @@ void
|
|||
PreUpdatePanel(void)
|
||||
{
|
||||
short pnum;
|
||||
extern SWBOOL DebugPanel,PanelUpdateMode;
|
||||
extern SWBOOL PanelUpdateMode;
|
||||
|
||||
if (!PanelUpdateMode)
|
||||
return;
|
||||
|
||||
if (DebugPanel)
|
||||
return;
|
||||
|
||||
DrawBeforeView = TRUE;
|
||||
|
||||
//if (DrawBeforeView)
|
||||
|
|
|
@ -61,7 +61,6 @@ BEGIN_SW_NS
|
|||
|
||||
void pSpriteControl(PLAYERp pp);
|
||||
int WeaponOperate(PLAYERp pp);
|
||||
SWBOOL MyCommPlayerQuit(void);
|
||||
SECTOR_OBJECTp PlayerOnObject(short sectnum_match);
|
||||
void PlayerRemoteReset(PLAYERp pp, short sectnum);
|
||||
void KillAllPanelInv(PLAYERp pp);
|
||||
|
@ -7626,12 +7625,6 @@ void PauseMultiPlay(void)
|
|||
void
|
||||
domovethings(void)
|
||||
{
|
||||
extern SWBOOL DebugAnim;
|
||||
#if DEBUG
|
||||
extern SWBOOL DebugPanel;
|
||||
#endif
|
||||
extern SWBOOL DebugSector;
|
||||
extern SWBOOL DebugActorFreeze;
|
||||
extern int PlayClock;
|
||||
short i, pnum;
|
||||
|
||||
|
@ -7648,9 +7641,6 @@ domovethings(void)
|
|||
}
|
||||
movefifoplc++;
|
||||
|
||||
if (MyCommPlayerQuit())
|
||||
return;
|
||||
|
||||
#if SYNC_TEST
|
||||
if (/* CTW REMOVED !gTenActivated ||*/ !(movefifoplc & 0x3f))
|
||||
getsyncstat();
|
||||
|
@ -7689,12 +7679,9 @@ domovethings(void)
|
|||
|
||||
PlayClock += synctics;
|
||||
|
||||
if (!DebugAnim)
|
||||
if (!DebugActorFreeze)
|
||||
DoAnim(synctics);
|
||||
|
||||
// should pass pnum and use syncbits
|
||||
if (!DebugSector)
|
||||
DoSector();
|
||||
|
||||
ProcessVisOn();
|
||||
|
|
|
@ -3269,38 +3269,11 @@ DoSector(void)
|
|||
{
|
||||
SECTOR_OBJECTp sop;
|
||||
SWBOOL riding;
|
||||
extern SWBOOL DebugActorFreeze;
|
||||
int sync_flag;
|
||||
short pnum;
|
||||
int min_dist,dist,a,b,c;
|
||||
PLAYERp pp;
|
||||
|
||||
if (DebugActorFreeze)
|
||||
return;
|
||||
|
||||
#if 0
|
||||
MoveSectorObjects(synctics);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
if (MoveSkip2 == 0)
|
||||
MoveSectorObjects(synctics * 2);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
TRAVERSE_CONNECT(pnum)
|
||||
{
|
||||
pp = Player + pnum;
|
||||
pp->sop_riding = NULL;
|
||||
}
|
||||
|
||||
for (sop = SectorObject; sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++)
|
||||
{
|
||||
if (MoveSkip2 == 0)
|
||||
MoveSectorObjects(sop, synctics * 2);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
for (sop = SectorObject; sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++)
|
||||
{
|
||||
|
|
|
@ -142,7 +142,6 @@ STATE s_DebrisStarFish[] =
|
|||
{426, 100, DoActorDebris, &s_DebrisStarFish[0]},
|
||||
};
|
||||
|
||||
extern SWBOOL DebugActor;
|
||||
extern int score;
|
||||
|
||||
ANIMATOR DoGet, DoKey, DoSpriteFade;
|
||||
|
@ -1065,17 +1064,6 @@ ActorTestSpawn(SPRITEp sp)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
#if 1
|
||||
if (DebugActor)
|
||||
return FALSE;
|
||||
#else
|
||||
if (DebugActor && !TEST(sp->extra, SPRX_BLOCK))
|
||||
{
|
||||
RESET(sp->extra, SPRX_BLOCK); //reset so it can be used elsewhere
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Skill ranges from -1 (No Monsters) to 3
|
||||
if (TEST(sp->extra, SPRX_SKILL) > Skill)
|
||||
{
|
||||
|
@ -6711,12 +6699,8 @@ SpriteControl(void)
|
|||
short pnum, CloseToPlayer;
|
||||
PLAYERp pp;
|
||||
int tx, ty, tmin, dist;
|
||||
extern SWBOOL DebugActorFreeze;
|
||||
short StateTics;
|
||||
|
||||
if (DebugActorFreeze)
|
||||
return;
|
||||
|
||||
TRAVERSE_SPRITE_STAT(headspritestat[STAT_MISC], i, nexti)
|
||||
{
|
||||
#if INLINE_STATE
|
||||
|
|
Loading…
Reference in a new issue