Commit a6d848b2 authored by Steven Fuller's avatar Steven Fuller

NOTES, TODO: Doc updates

vi_xlib.c: More keys added

wl_main.c: Reenabled ReadConfig

"goobers" (debug mode command line parameter) renamed to "debugmode"
parent d6a8fb79
CC = gcc CC = gcc
#CFLAGS = -Wall -O6 -fomit-frame-pointer -ffast-math -funroll-loops -mpentiumpro -mcpu=pentiumpro -march=pentiumpro -D_REENTRANT #CFLAGS = -Wall -O6 -fomit-frame-pointer -ffast-math -funroll-loops -mpentiumpro -mcpu=pentiumpro -march=pentiumpro
CFLAGS = -g -Wall -D_REENTRANT CFLAGS = -g -Wall
#CFLAGS = -Os -Wall #CFLAGS = -Os -Wall
#CFLAGS = -Os -Wall -fomit-frame-pointer -ffast-math -mpentiumpro -mcpu=pentiumpro -march=pentiumpro #CFLAGS = -Os -Wall -fomit-frame-pointer -ffast-math -mpentiumpro -mcpu=pentiumpro -march=pentiumpro
OBJS = objs.o misc.o id_ca.o id_vh.o id_us.o \ OBJS = objs.o misc.o id_ca.o id_vh.o id_us.o \
wl_act1.o wl_act2.o wl_agent.o wl_game.o \ wl_act1.o wl_act2.o wl_agent.o wl_game.o \
wl_inter.o wl_menu.o wl_play.o wl_state.o wl_text.o wl_main.o \ wl_inter.o wl_menu.o wl_play.o wl_state.o wl_text.o wl_main.o \
wl_debug.o gfxsave.o sd_oss.o fmopl.o # sd_null.o wl_debug.o gfxsave.o
ROBJS = wl_draw.o wl_scale.o ROBJS = wl_draw.o wl_scale.o
SOBJS = $(OBJS) $(ROBJS) vi_svga.o SOBJS = $(OBJS) $(ROBJS) vi_svga.o
XOBJS = $(OBJS) $(ROBJS) vi_xlib.o XOBJS = $(OBJS) $(ROBJS) vi_xlib.o
#LFLAGS = -lm LFLAGS = -lm
LFLAGS = -lm -lpthread
#OBJS += sd_null.o
OBJS += sd_oss.o fmopl.o
CFLAGS += -D_REENTRANT
LFLAGS += -lpthread
SLFLAGS = $(LFLAGS) -lvga SLFLAGS = $(LFLAGS) -lvga
XLFLAGS = $(LFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXxf86dga XLFLAGS = $(LFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXxf86dga
......
...@@ -33,5 +33,7 @@ Wolfenstein 3D was originally planned to be a much more complex game. ... ...@@ -33,5 +33,7 @@ Wolfenstein 3D was originally planned to be a much more complex game. ...
... lots of unused code ... possibly from previous projects and incarnations ... lots of unused code ... possibly from previous projects and incarnations
of wolf3d. of wolf3d.
Version 1.4 of Wolfenstein 3D (full) had a Read Me! option. The text still Version 1.4 of Wolfenstein 3D (full) did not had a Read Me! option, but the
exists in the data files, but all the graphics are incorrect. text still exists in the data files, but all the graphics are incorrect
(wrong graphic numbers, etc).
...@@ -9,6 +9,7 @@ SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + chunk]); ...@@ -9,6 +9,7 @@ SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + chunk]);
SD_StartMusic(chunk); SD_StartMusic(chunk);
General: General:
* convert uses of open() to fopen()
* half of these things belong in IDEAS; they are not bugs, just random * half of these things belong in IDEAS; they are not bugs, just random
musings musings
* inconsistancy: * inconsistancy:
...@@ -16,7 +17,7 @@ id_ca.c has code for setting the data filenames' extension ...@@ -16,7 +17,7 @@ id_ca.c has code for setting the data filenames' extension
so does wl_menu.c so does wl_menu.c
* menu code is a mess, always does things differently than the rest of the * menu code is a mess, always does things differently than the rest of the
code, it really needs to be cleaned up code, it really needs to be cleaned up
* id_ca.c cache code: fix/rewrite the "garbage collection" system? * id_ca.c cache code: fix/readd/rewrite the "garbage collection" system?
* clean up header files, especially wl_def.h, where some declarations aren't * clean up header files, especially wl_def.h, where some declarations aren't
in the right place in the right place
* every structure that is read/written must be PACKED, with datatypes * every structure that is read/written must be PACKED, with datatypes
...@@ -33,10 +34,11 @@ work the same, let the input handler do it all instead ...@@ -33,10 +34,11 @@ work the same, let the input handler do it all instead
i think its safe for now to go with the scancodes as being the "universal" i think its safe for now to go with the scancodes as being the "universal"
key type, and for everything not scancode-based, have a function to key type, and for everything not scancode-based, have a function to
translate translate
* wl_menu uses specific scancodes for names, config file will have to use
metaname like sc_Left etc or something
* remove GOODTIMES? * remove GOODTIMES?
* Remove the SOD manual check? * Remove the SOD manual check?
* perhaps rename UPLOAD * perhaps rename UPLOAD
* TOO MANY #IFDEFs
* verify if the sounds and graphics are correctly numbered, once again... * verify if the sounds and graphics are correctly numbered, once again...
* add a ViewMap? (could be done similar to mac version) * add a ViewMap? (could be done similar to mac version)
* find and remove any function stubs (functions which just call another * find and remove any function stubs (functions which just call another
...@@ -44,17 +46,13 @@ function with same parameters, only difference is the name) ...@@ -44,17 +46,13 @@ function with same parameters, only difference is the name)
* fix wl_debug.c, lots of junk code.. * fix wl_debug.c, lots of junk code..
* change the current parameter handling code to something like getopt * change the current parameter handling code to something like getopt
* rename goobers to debugmode, then remove debugmode for things... * rename goobers to debugmode, then remove debugmode for things...
* for some reason, it feels sluggish, maybe its from having mikmod playing * retrace problems (esp. with svgalib).
at the same time... especially when you pick up items.. probably due to
calling wait vbl when doing palette stuffs
* look for places where gfx needs to be redrawn, like back to game etc * look for places where gfx needs to be redrawn, like back to game etc
* wl_menu uses specific scancodes for names, config file will have to use
metaname like sc_Left etc or something
* fizzlefade is hackish, stipple buf would work ok in opengl, maybe only * fizzlefade is hackish, stipple buf would work ok in opengl, maybe only
update once per frame or such... update once per frame or such...
and where is that stray pixel coming from (when using end game with largest and where is that stray pixel coming from (when using end game with largest
window size) in svgalib -- is that another bug with my geforce? window size) in svgalib -- is that another bug with my geforce?
no idea how to do fizzlefade in 16bit X no idea how to do fizzlefade in TrueColor X
* check filehandling (ex, file missing, bad file type, and such) * check filehandling (ex, file missing, bad file type, and such)
PlayDemoFromFile specifically PlayDemoFromFile specifically
* make sure all infinite loops are found (looping around Keyboard) * make sure all infinite loops are found (looping around Keyboard)
...@@ -78,17 +76,16 @@ also, it should be able to compile without extensions ...@@ -78,17 +76,16 @@ also, it should be able to compile without extensions
* fix up windows port * fix up windows port
* create 'sound channels' with priority.. ie a door can only make one sound * create 'sound channels' with priority.. ie a door can only make one sound
at a time at a time
* beos is c++ but wolf3d will need many cleanups for c++ either that or use
extern "C" { ... } in the header files
* change wl_scale to use mac wolf3d's version of scaling * change wl_scale to use mac wolf3d's version of scaling
wall drawing is done, just needed to fix sprite code wall drawing is done, just needed to fix sprite code
* check in wolftools and add mac wolftools (currently the res dumping stuff)
* cat file.c | perl -e 'while($in = <STDIN>) * cat file.c | perl -e 'while($in = <STDIN>)
{$in =~ s/\/\/(.*)$/\/\* \1\ *\//gm;print $in;}' {$in =~ s/\/\/(.*)$/\/\* \1\ *\//gm;print $in;}'
or or
cat foo.txt |sed -e "s/\/\/\(.*\)$/\/\*\1\*\//g" cat foo.txt |sed -e "s/\/\/\(.*\)$/\/\*\1\*\//g"
* systems with no sound should still have working WaitSoundDone.. it's
possible to calculate the sound lengths in terms of 70Hz (adlib sound len / 2,
pcm sound len / 100).
Things to try: Things to try:
* Any speed gain with comparing values in screen before writing?
* Convert to a 320x200xWhatever screen first then draw all at once * Convert to a 320x200xWhatever screen first then draw all at once
* Create a native palette format instead of doing conversions each frame * Create a native palette format instead of doing conversions each frame
...@@ -590,8 +590,6 @@ boolean SD_MusicPlaying() ...@@ -590,8 +590,6 @@ boolean SD_MusicPlaying()
return sqActive; return sqActive;
} }
//===========================================================================
void SD_Poll() void SD_Poll()
{ {
} }
......
...@@ -883,14 +883,22 @@ int XKeysymToScancode(unsigned int keysym) ...@@ -883,14 +883,22 @@ int XKeysymToScancode(unsigned int keysym)
return sc_A; return sc_A;
case XK_b: case XK_b:
return sc_B; return sc_B;
case XK_c:
return sc_C;
case XK_h:
return sc_H;
case XK_i: case XK_i:
return sc_I; return sc_I;
case XK_l: case XK_l:
return sc_L; return sc_L;
case XK_m: case XK_m:
return sc_M; return sc_M;
case XK_n:
return sc_N;
case XK_t: case XK_t:
return sc_T; return sc_T;
case XK_y:
return sc_Y;
case XK_Left: case XK_Left:
case XK_KP_Left: case XK_KP_Left:
return sc_LeftArrow; return sc_LeftArrow;
...@@ -919,10 +927,10 @@ int XKeysymToScancode(unsigned int keysym) ...@@ -919,10 +927,10 @@ int XKeysymToScancode(unsigned int keysym)
case XK_KP_Enter: case XK_KP_Enter:
case XK_Return: case XK_Return:
return sc_Enter; return sc_Enter;
case XK_y: case XK_Tab:
return sc_Y; return sc_Tab;
case XK_n: case XK_BackSpace:
return sc_N; return sc_BackSpace;
case XK_Pause: case XK_Pause:
return 0xE1; return 0xE1;
default: default:
......
...@@ -334,7 +334,7 @@ void DrawHealth (void) ...@@ -334,7 +334,7 @@ void DrawHealth (void)
=============== ===============
*/ */
void TakeDamage (int points,objtype *attacker) void TakeDamage (int points,objtype *attacker)
{ {
LastAttacker = attacker; LastAttacker = attacker;
...@@ -353,12 +353,12 @@ void TakeDamage (int points,objtype *attacker) ...@@ -353,12 +353,12 @@ void TakeDamage (int points,objtype *attacker)
killerobj = attacker; killerobj = attacker;
} }
StartDamageFlash (points); StartDamageFlash(points);
gotgatgun=0; gotgatgun=0;
DrawHealth (); DrawHealth();
DrawFace (); DrawFace();
// //
// MAKE BJ'S EYES BUG IF MAJOR DAMAGE! // MAKE BJ'S EYES BUG IF MAJOR DAMAGE!
...@@ -382,15 +382,15 @@ void TakeDamage (int points,objtype *attacker) ...@@ -382,15 +382,15 @@ void TakeDamage (int points,objtype *attacker)
=============== ===============
*/ */
void HealSelf (int points) void HealSelf(int points)
{ {
gamestate.health += points; gamestate.health += points;
if (gamestate.health>100) if (gamestate.health>100)
gamestate.health = 100; gamestate.health = 100;
DrawHealth (); DrawHealth();
gotgatgun = 0; // JR gotgatgun = 0; // JR
DrawFace (); DrawFace();
} }
......
...@@ -153,8 +153,8 @@ int DebugKeys() ...@@ -153,8 +153,8 @@ int DebugKeys()
CenterWindow (12,3); CenterWindow (12,3);
US_PrintCentered ("Free items!"); US_PrintCentered ("Free items!");
VW_UpdateScreen(); VW_UpdateScreen();
GivePoints (100000); GivePoints(100000);
HealSelf (99); HealSelf(99);
if (gamestate.bestweapon<wp_chaingun) if (gamestate.bestweapon<wp_chaingun)
GiveWeapon (gamestate.bestweapon+1); GiveWeapon (gamestate.bestweapon+1);
gamestate.ammo += 50; gamestate.ammo += 50;
......
...@@ -823,8 +823,6 @@ void FinishPaletteShifts (void); ...@@ -823,8 +823,6 @@ void FinishPaletteShifts (void);
void CenterWindow(word w,word h); void CenterWindow(word w,word h);
void InitActorList (void); void InitActorList (void);
void GetNewActor (void); void GetNewActor (void);
void RemoveObj (objtype *gone);
void PollControls (void);
void StopMusic(void); void StopMusic(void);
void StartMusic(void); void StartMusic(void);
void PlayLoop (void); void PlayLoop (void);
......
...@@ -402,7 +402,7 @@ static int CalcRotate(objtype *ob) ...@@ -402,7 +402,7 @@ static int CalcRotate(objtype *ob)
===================== =====================
*/ */
#define MAXVISABLE 50 #define MAXVISABLE 64
typedef struct { typedef struct {
int viewx; int viewx;
...@@ -501,10 +501,10 @@ static void DrawScaleds() ...@@ -501,10 +501,10 @@ static void DrawScaleds()
if (!numvisable) if (!numvisable)
return; // no visable objects return; // no visable objects
for (i = 0; i<numvisable; i++) for (i = 0; i < numvisable; i++)
{ {
least = 32000; least = 32000;
for (visstep=&vislist[0] ; visstep<visptr ; visstep++) for (visstep = &vislist[0]; visstep < visptr; visstep++)
{ {
height = visstep->viewheight; height = visstep->viewheight;
if (height < least) if (height < least)
...@@ -516,7 +516,7 @@ static void DrawScaleds() ...@@ -516,7 +516,7 @@ static void DrawScaleds()
// //
// draw farthest // draw farthest
// //
ScaleShape(farthest->viewx,farthest->shapenum,farthest->viewheight); ScaleShape(farthest->viewx, farthest->shapenum, farthest->viewheight);
farthest->viewheight = 32000; farthest->viewheight = 32000;
} }
......
...@@ -20,7 +20,7 @@ boolean spearflag; ...@@ -20,7 +20,7 @@ boolean spearflag;
// //
// ELEVATOR BACK MAPS - REMEMBER (-1)!! // ELEVATOR BACK MAPS - REMEMBER (-1)!!
// //
int ElevatorBackTo[]={1,1,7,3,5,3}; static int ElevatorBackTo[]={ 1, 1, 7, 3, 5, 3};
//=========================================================================== //===========================================================================
...@@ -1066,45 +1066,45 @@ void GameLoop() ...@@ -1066,45 +1066,45 @@ void GameLoop()
boolean died; boolean died;
restartgame: restartgame:
ClearMemory (); ClearMemory();
SETFONTCOLOR(0,15); SETFONTCOLOR(0,15);
DrawPlayScreen (); DrawPlayScreen();
died = false; died = false;
do do
{ {
if (!loadedgame) if (!loadedgame)
gamestate.score = gamestate.oldscore; gamestate.score = gamestate.oldscore;
DrawScore(); DrawScore();
startgame = false; startgame = false;
if (loadedgame) if (loadedgame)
loadedgame = false; loadedgame = false;
else else
SetupGameLevel (); SetupGameLevel();
#ifdef SPEAR #ifdef SPEAR
if (gamestate.mapon == 20) // give them the key allways if (gamestate.mapon == 20) // give them the key allways
{ {
gamestate.keys |= 1; gamestate.keys |= 1;
DrawKeys (); DrawKeys();
} }
#endif #endif
ingame = true; ingame = true;
StartMusic (); StartMusic();
if (!died) if (!died)
PreloadGraphics (); PreloadGraphics();
else else
died = false; died = false;
fizzlein = true; fizzlein = true;
DrawLevel (); DrawLevel();
#ifdef SPEAR #ifdef SPEAR
startplayloop: startplayloop:
#endif #endif
PlayLoop (); PlayLoop();
#ifdef SPEAR #ifdef SPEAR
if (spearflag) if (spearflag)
...@@ -1137,7 +1137,7 @@ startplayloop: ...@@ -1137,7 +1137,7 @@ startplayloop:
} }
#endif #endif
StopMusic (); StopMusic();
ingame = false; ingame = false;
if (demorecord && playstate != ex_warped) if (demorecord && playstate != ex_warped)
...@@ -1224,17 +1224,17 @@ startplayloop: ...@@ -1224,17 +1224,17 @@ startplayloop:
break; break;
case ex_died: case ex_died:
Died (); Died();
died = true; // don't "get psyched!" died = true; // don't "get psyched!"
if (gamestate.lives > -1) if (gamestate.lives > -1)
break; // more lives left break; // more lives left
VW_FadeOut (); VW_FadeOut();
ClearMemory (); ClearMemory();
CheckHighScore (gamestate.score,gamestate.mapon+1); CheckHighScore(gamestate.score,gamestate.mapon+1);
strcpy(MainMenu[viewscores].string,STR_VS); strcpy(MainMenu[viewscores].string,STR_VS);
MainMenu[viewscores].routine = (void *)CP_ViewScores; MainMenu[viewscores].routine = (void *)CP_ViewScores;
...@@ -1244,17 +1244,17 @@ startplayloop: ...@@ -1244,17 +1244,17 @@ startplayloop:
case ex_victorious: case ex_victorious:
#ifndef SPEAR #ifndef SPEAR
VW_FadeOut (); VW_FadeOut();
#else #else
VL_FadeOut (0,255,0,17,17,300); VL_FadeOut(0,255,0,17,17,300);
#endif #endif
ClearMemory (); ClearMemory();
Victory (); Victory();
ClearMemory (); ClearMemory();
CheckHighScore (gamestate.score,gamestate.mapon+1); CheckHighScore(gamestate.score,gamestate.mapon+1);
strcpy(MainMenu[viewscores].string,STR_VS); strcpy(MainMenu[viewscores].string,STR_VS);
MainMenu[viewscores].routine = (void *)CP_ViewScores; MainMenu[viewscores].routine = (void *)CP_ViewScores;
...@@ -1262,11 +1262,10 @@ startplayloop: ...@@ -1262,11 +1262,10 @@ startplayloop:
return; return;
default: default:
ClearMemory (); ClearMemory();
break; break;
} }
} while (1); } while (1);
} }
...@@ -224,7 +224,7 @@ void Victory (void) ...@@ -224,7 +224,7 @@ void Victory (void)
IN_Ack(); IN_Ack();
#ifndef SPEAR #ifndef SPEAR
if (IN_KeyDown(sc_P) && MS_CheckParm("goobers")) if (IN_KeyDown(sc_P) && MS_CheckParm("debugmode"))
PicturePause(); PicturePause();
#endif #endif
...@@ -833,7 +833,7 @@ void LevelCompleted() ...@@ -833,7 +833,7 @@ void LevelCompleted()
#endif #endif
#ifndef SPEAR #ifndef SPEAR
if (IN_KeyDown(sc_P) && MS_CheckParm("goobers")) if (IN_KeyDown(sc_P) && MS_CheckParm("debugmode"))
PicturePause(); PicturePause();
#endif #endif
......
...@@ -119,6 +119,8 @@ void CalcTics() ...@@ -119,6 +119,8 @@ void CalcTics()
} }
} }
/* ======================================================================== */
/* /*
==================== ====================
= =
...@@ -133,7 +135,6 @@ void ReadConfig() ...@@ -133,7 +135,6 @@ void ReadConfig()
SMMode sm; SMMode sm;
SDSMode sds; SDSMode sds;
#if 0 /* TODO */
int file; int file;
if ((file = open(configname, O_BINARY | O_RDONLY)) != -1) if ((file = open(configname, O_BINARY | O_RDONLY)) != -1)
...@@ -179,13 +180,16 @@ void ReadConfig() ...@@ -179,13 +180,16 @@ void ReadConfig()
MainMenu[6].active=1; MainMenu[6].active=1;
MainItems.curpos=0; MainItems.curpos=0;
} }
else else
#endif
{ {
// //
// no config file, so select by hardware // no config file, so select by hardware
// //
/* max viewsize is 20 */
viewsize = 15;
}
if (SoundBlasterPresent || AdLibPresent) if (SoundBlasterPresent || AdLibPresent)
{ {
sd = sdm_AdLib; sd = sdm_AdLib;
...@@ -209,15 +213,11 @@ void ReadConfig() ...@@ -209,15 +213,11 @@ void ReadConfig()
joypadenabled = false; joypadenabled = false;
joystickport = 0; joystickport = 0;
/* max viewsize is 20 */
viewsize = 15;
mouseadjustment = 5; mouseadjustment = 5;
}
SD_SetMusicMode (sm);
SD_SetSoundMode (sd);
SD_SetDigiDevice (sds);
SD_SetMusicMode(sm);
SD_SetSoundMode(sd);
SD_SetDigiDevice(sds);
} }
...@@ -261,9 +261,6 @@ void WriteConfig() ...@@ -261,9 +261,6 @@ void WriteConfig()
} }
} }
//===========================================================================
/* /*
===================== =====================
= =
...@@ -290,8 +287,6 @@ void NewGame(int difficulty, int episode) ...@@ -290,8 +287,6 @@ void NewGame(int difficulty, int episode)
startgame = true; startgame = true;
} }
/* ======================================================================== */
void DiskFlopAnim(int x, int y) void DiskFlopAnim(int x, int y)
{ {
static char which=0; static char which=0;
...@@ -399,8 +394,6 @@ boolean SaveTheGame(int file,int x,int y) ...@@ -399,8 +394,6 @@ boolean SaveTheGame(int file,int x,int y)
return true; return true;
} }
//===========================================================================
/* /*
================== ==================
= =
...@@ -534,7 +527,7 @@ void ShutdownId() ...@@ -534,7 +527,7 @@ void ShutdownId()
} }
//=========================================================================== /* ======================================================================== */
/* /*
================== ==================
......
...@@ -1508,7 +1508,7 @@ int CalibrateJoystick(void) ...@@ -1508,7 +1508,7 @@ int CalibrateJoystick(void)
if (IN_KeyDown(sc_Escape)) if (IN_KeyDown(sc_Escape))
return 0; return 0;
if (IN_KeyDown(sc_Tab) && IN_KeyDown(sc_P) && MS_CheckParm("goobers")) if (IN_KeyDown(sc_Tab) && IN_KeyDown(sc_P) && MS_CheckParm("debugmode"))
PicturePause(); PicturePause();
} while(!(jb&1)); } while(!(jb&1));
...@@ -1537,7 +1537,7 @@ int CalibrateJoystick(void) ...@@ -1537,7 +1537,7 @@ int CalibrateJoystick(void)
IN_CheckAck(); /* force update */ IN_CheckAck(); /* force update */
if (IN_KeyDown(sc_Escape)) if (IN_KeyDown(sc_Escape))
return 0; return 0;
if (IN_KeyDown(sc_Tab) && IN_KeyDown(sc_P) && MS_CheckParm("goobers")) if (IN_KeyDown(sc_Tab) && IN_KeyDown(sc_P) && MS_CheckParm("debugmode"))
PicturePause(); PicturePause();
} while(!(jb&2)); } while(!(jb&2));
...@@ -2859,11 +2859,7 @@ int HandleMenu(CP_iteminfo *item_i,CP_itemtype *items,void (*routine)(int w)) ...@@ -2859,11 +2859,7 @@ int HandleMenu(CP_iteminfo *item_i,CP_itemtype *items,void (*routine)(int w))
// //
// CHECK FOR SCREEN CAPTURE // CHECK FOR SCREEN CAPTURE
// //
#ifndef SPEAR
if (IN_KeyDown(sc_Tab) && IN_KeyDown(sc_P) && MS_CheckParm("goobers"))
#else
if (IN_KeyDown(sc_Tab) && IN_KeyDown(sc_P) && MS_CheckParm("debugmode")) if (IN_KeyDown(sc_Tab) && IN_KeyDown(sc_P) && MS_CheckParm("debugmode"))
#endif
PicturePause(); PicturePause();
...@@ -3220,7 +3216,7 @@ int Confirm(char *string) ...@@ -3220,7 +3216,7 @@ int Confirm(char *string)
set_TimeCount(0); set_TimeCount(0);
} }
if (IN_KeyDown(sc_Tab) && IN_KeyDown(sc_P) && MS_CheckParm("goobers")) if (IN_KeyDown(sc_Tab) && IN_KeyDown(sc_P) && MS_CheckParm("debugmode"))
PicturePause(); PicturePause();
} while(!IN_KeyDown(sc_Y) && !IN_KeyDown(sc_N) && !IN_KeyDown(sc_Escape)); } while(!IN_KeyDown(sc_Y) && !IN_KeyDown(sc_N) && !IN_KeyDown(sc_Escape));
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
============================================================================= =============================================================================
*/ */
boolean madenoise; // true when shooting or screaming boolean madenoise; // true when shooting or screaming
exit_t playstate; exit_t playstate;
...@@ -63,13 +63,11 @@ boolean buttonstate[NUMBUTTONS]; ...@@ -63,13 +63,11 @@ boolean buttonstate[NUMBUTTONS];
//=========================================================================== //===========================================================================
void CenterWindow(word w,word h); static void RemoveObj(objtype *gone);
void InitObjList (void); static void PollControls();
void RemoveObj (objtype *gone); void StopMusic();
void PollControls (void); void StartMusic();
void StopMusic(void); void PlayLoop();
void StartMusic(void);
void PlayLoop (void);
/* /*
============================================================================= =============================================================================
...@@ -79,9 +77,6 @@ void PlayLoop (void); ...@@ -79,9 +77,6 @@ void PlayLoop (void);
============================================================================= =============================================================================
*/ */
objtype dummyobj;
// //
// LIST OF SONGS FOR EACH VERSION // LIST OF SONGS FOR EACH VERSION
// //
...@@ -226,10 +221,6 @@ int songs[]= ...@@ -226,10 +221,6 @@ int songs[]=
#define BASEMOVE 35 #define BASEMOVE 35
#define RUNMOVE 70 #define RUNMOVE 70
#define BASETURN 35
#define RUNTURN 70
#define JOYSCALE 2
/* /*
=================== ===================
...@@ -239,9 +230,9 @@ int songs[]= ...@@ -239,9 +230,9 @@ int songs[]=
=================== ===================
*/ */
void PollKeyboardButtons (void) void PollKeyboardButtons()
{ {
int i; int i;
for (i=0;i<NUMBUTTONS;i++) for (i=0;i<NUMBUTTONS;i++)
if (IN_KeyDown(buttonscan[i])) if (IN_KeyDown(buttonscan[i]))
...@@ -257,11 +248,11 @@ void PollKeyboardButtons (void) ...@@ -257,11 +248,11 @@ void PollKeyboardButtons (void)
=================== ===================
*/ */
void PollMouseButtons (void) void PollMouseButtons()
{ {
int buttons; int buttons;
buttons = IN_MouseButtons (); buttons = IN_MouseButtons();
if (buttons&1) if (buttons&1)
buttonstate[buttonmouse[0]] = true; buttonstate[buttonmouse[0]] = true;
...@@ -281,11 +272,11 @@ void PollMouseButtons (void) ...@@ -281,11 +272,11 @@ void PollMouseButtons (void)
=================== ===================
*/ */
void PollJoystickButtons (void) void PollJoystickButtons()
{ {
int buttons; int buttons;
buttons = IN_JoyButtons (); buttons = IN_JoyButtons();
if (joystickport && !joypadenabled) if (joystickport && !joypadenabled)
{ {
...@@ -354,7 +345,7 @@ void PollKeyboardMove() ...@@ -354,7 +345,7 @@ void PollKeyboardMove()
=================== ===================
*/ */
void PollMouseMove (void) void PollMouseMove()
{ {
int mousexmove = 0, mouseymove = 0; int mousexmove = 0, mouseymove = 0;
...@@ -372,7 +363,7 @@ void PollMouseMove (void) ...@@ -372,7 +363,7 @@ void PollMouseMove (void)
=================== ===================
*/ */
void PollJoystickMove (void) void PollJoystickMove()
{ {
int joyx, joyy; int joyx, joyy;
...@@ -584,7 +575,7 @@ void CenterWindow(word w,word h) ...@@ -584,7 +575,7 @@ void CenterWindow(word w,word h)
===================== =====================
*/ */
void CheckKeys (void) void CheckKeys()
{ {
byte scan; byte scan;
...@@ -611,7 +602,7 @@ void CheckKeys (void) ...@@ -611,7 +602,7 @@ void CheckKeys (void)
IN_Ack(); IN_Ack();
godmode ^= 1; godmode ^= 1;
DrawAllPlayBorderSides (); DrawAllPlayBorderSides();
IN_ClearKeysDown(); IN_ClearKeysDown();
return; return;
} }
...@@ -655,7 +646,7 @@ void CheckKeys (void) ...@@ -655,7 +646,7 @@ void CheckKeys (void)
// //
if (IN_KeyDown(sc_BackSpace) && IN_KeyDown(sc_LShift) && if (IN_KeyDown(sc_BackSpace) && IN_KeyDown(sc_LShift) &&
IN_KeyDown(sc_Alt) && MS_CheckParm("debugmode")) { IN_KeyDown(sc_Alt) && MS_CheckParm("debugmode")) {
ClearMemory (); ClearMemory();
CA_CacheGrChunk (STARTFONT+1); CA_CacheGrChunk (STARTFONT+1);
ClearSplitVWB (); ClearSplitVWB ();
...@@ -872,7 +863,7 @@ void GetNewActor (void) ...@@ -872,7 +863,7 @@ void GetNewActor (void)
========================= =========================
*/ */
void RemoveObj(objtype *gone) static void RemoveObj(objtype *gone)
{ {
if (gone == player) if (gone == player)
Quit ("RemoveObj: Tried to remove the player!"); Quit ("RemoveObj: Tried to remove the player!");
...@@ -917,7 +908,7 @@ void RemoveObj(objtype *gone) ...@@ -917,7 +908,7 @@ void RemoveObj(objtype *gone)
================= =================
*/ */
void StopMusic(void) void StopMusic()
{ {
int i; int i;
...@@ -984,7 +975,7 @@ boolean palshifted; ...@@ -984,7 +975,7 @@ boolean palshifted;
===================== =====================
*/ */
void InitRedShifts (void) void InitRedShifts()
{ {
byte *workptr; byte *workptr;
const byte *baseptr; const byte *baseptr;
...@@ -1037,7 +1028,7 @@ void InitRedShifts (void) ...@@ -1037,7 +1028,7 @@ void InitRedShifts (void)
===================== =====================
*/ */
void ClearPaletteShifts (void) void ClearPaletteShifts()
{ {
bonuscount = damagecount = 0; bonuscount = damagecount = 0;
} }
...@@ -1051,7 +1042,7 @@ void ClearPaletteShifts (void) ...@@ -1051,7 +1042,7 @@ void ClearPaletteShifts (void)
===================== =====================
*/ */
void StartBonusFlash (void) void StartBonusFlash()
{ {
bonuscount = NUMWHITESHIFTS*WHITETICS; // white shift palette bonuscount = NUMWHITESHIFTS*WHITETICS; // white shift palette
} }
...@@ -1065,7 +1056,7 @@ void StartBonusFlash (void) ...@@ -1065,7 +1056,7 @@ void StartBonusFlash (void)
===================== =====================
*/ */
void StartDamageFlash (int damage) void StartDamageFlash(int damage)
{ {
damagecount += damage; damagecount += damage;
} }
...@@ -1079,9 +1070,9 @@ void StartDamageFlash (int damage) ...@@ -1079,9 +1070,9 @@ void StartDamageFlash (int damage)
===================== =====================
*/ */
void UpdatePaletteShifts (void) void UpdatePaletteShifts()
{ {
int red,white; int red, white;
if (bonuscount) if (bonuscount)
{ {
......
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
*/ */
dirtype opposite[9] = static dirtype opposite[9] =
{west,southwest,south,southeast,east,northeast,north,northwest,nodir}; {west,southwest,south,southeast,east,northeast,north,northwest,nodir};
dirtype diagonal[9][9] = static dirtype diagonal[9][9] =
{ {
/* east */ {nodir,nodir,northeast,nodir,nodir,nodir,southeast,nodir,nodir}, /* east */ {nodir,nodir,northeast,nodir,nodir,nodir,southeast,nodir,nodir},
{nodir,nodir,nodir,nodir,nodir,nodir,nodir,nodir,nodir}, {nodir,nodir,nodir,nodir,nodir,nodir,nodir,nodir,nodir},
...@@ -337,7 +337,7 @@ boolean TryWalk (objtype *ob) ...@@ -337,7 +337,7 @@ boolean TryWalk (objtype *ob)
================================== ==================================
*/ */
void SelectDodgeDir (objtype *ob) void SelectDodgeDir(objtype *ob)
{ {
int deltax,deltay,i; int deltax,deltay,i;
unsigned absdx,absdy; unsigned absdx,absdy;
......
...@@ -649,7 +649,7 @@ void ShowArticle(char *article) ...@@ -649,7 +649,7 @@ void ShowArticle(char *article)
break; break;
} }
if (IN_KeyDown(sc_Tab) && IN_KeyDown(sc_P) && MS_CheckParm("goobers")) if (IN_KeyDown(sc_Tab) && IN_KeyDown(sc_P) && MS_CheckParm("debugmode"))
PicturePause(); PicturePause();
} while (LastScan != sc_Escape); } while (LastScan != sc_Escape);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment