Commit 0dde4e74 authored by Steven Fuller's avatar Steven Fuller

Few more cleanups

parent e123336b
...@@ -41,3 +41,4 @@ Trying to free null audio chunk 207! ...@@ -41,3 +41,4 @@ Trying to free null audio chunk 207!
CA_FarRead hit EOF? CA_FarRead hit EOF?
CA_FarRead hit EOF? CA_FarRead hit EOF?
CA_FarRead hit EOF? CA_FarRead hit EOF?
* if possible fix/or at least add ViewMap?
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
/* WL6 = 1 */ /* WL6 = 1 */
/* SDM = 2 */ /* SDM = 2 */
/* SOD = 3 */ /* SOD = 3 */
#ifndef WMODE
#define WMODE 1 #define WMODE 1
#endif
#if WMODE == 0 #if WMODE == 0
/* #define SPEAR */ /* #define SPEAR */
......
...@@ -229,8 +229,7 @@ static char buf[10]; ...@@ -229,8 +229,7 @@ static char buf[10];
// draw the wall // draw the wall
// //
postx = 128; postx = 128;
postwidth = 1; for (x=0;x<64;x++,postx++)
for (x=0;x<64;x++,postx++,postsource+=64)
{ {
wallheight[postx] = 256; wallheight[postx] = 256;
ScalePost((byte *)addr, x); ScalePost((byte *)addr, x);
...@@ -439,7 +438,6 @@ int DebugKeys (void) ...@@ -439,7 +438,6 @@ int DebugKeys (void)
DebugMemory(); DebugMemory();
return 1; return 1;
} }
#ifdef SPEAR
else if (Keyboard[sc_N]) // N = no clip else if (Keyboard[sc_N]) // N = no clip
{ {
noclip^=1; noclip^=1;
...@@ -452,7 +450,6 @@ int DebugKeys (void) ...@@ -452,7 +450,6 @@ int DebugKeys (void)
IN_Ack (); IN_Ack ();
return 1; return 1;
} }
#endif
#if 0 #if 0
else if (Keyboard[sc_O]) // O = overhead else if (Keyboard[sc_O]) // O = overhead
{ {
...@@ -503,6 +500,7 @@ int DebugKeys (void) ...@@ -503,6 +500,7 @@ int DebugKeys (void)
{ {
CenterWindow(26,3); CenterWindow(26,3);
PrintY+=6; PrintY+=6;
/* TODO: wouldn't work on sod demo etc */
#ifndef SPEAR #ifndef SPEAR
US_Print(" Warp to which level(1-10):"); US_Print(" Warp to which level(1-10):");
#else #else
...@@ -525,15 +523,6 @@ int DebugKeys (void) ...@@ -525,15 +523,6 @@ int DebugKeys (void)
} }
return 1; return 1;
} }
else if (Keyboard[sc_X]) // X = item cheat
{
CenterWindow (12,3);
US_PrintCentered ("Extra stuff!");
VW_UpdateScreen();
// DEBUG: put stuff here
IN_Ack ();
return 1;
}
return 0; return 0;
} }
......
...@@ -553,17 +553,15 @@ typedef enum { ...@@ -553,17 +553,15 @@ typedef enum {
en_death en_death
} enemy_t; } enemy_t;
typedef struct statestruct typedef struct statestruct
{ {
boolean rotate; boolean rotate;
int shapenum; /* a shapenum of -1 means get from ob->temp1 */ int shapenum; /* a shapenum of -1 means get from ob->temp1 */
int tictime; int tictime;
void (*think) (),(*action) (); void (*think)(), (*action)();
struct statestruct *next; struct statestruct *next;
} PACKED statetype; } PACKED statetype;
//--------------------- //---------------------
// //
// trivial actor structure // trivial actor structure
...@@ -652,7 +650,7 @@ typedef enum { ...@@ -652,7 +650,7 @@ typedef enum {
} weapontype; } weapontype;
/* typedef */ enum { enum {
gd_baby, gd_baby,
gd_easy, gd_easy,
gd_medium, gd_medium,
...@@ -735,7 +733,6 @@ extern fixed sintable[], *costable; ...@@ -735,7 +733,6 @@ extern fixed sintable[], *costable;
// derived constants // derived constants
// //
extern fixed maxslope; extern fixed maxslope;
extern int minheightdiv;
extern char configname[13]; extern char configname[13];
...@@ -876,7 +873,6 @@ void CheckHighScore (long score,word other); ...@@ -876,7 +873,6 @@ void CheckHighScore (long score,word other);
void Victory (void); void Victory (void);
void ClearSplitVWB (void); void ClearSplitVWB (void);
/* /*
============================================================================= =============================================================================
...@@ -888,7 +884,6 @@ void ClearSplitVWB (void); ...@@ -888,7 +884,6 @@ void ClearSplitVWB (void);
int DebugKeys (void); int DebugKeys (void);
void PicturePause (void); void PicturePause (void);
/* /*
============================================================================= =============================================================================
...@@ -905,13 +900,12 @@ extern unsigned wallheight[MAXVIEWWIDTH]; ...@@ -905,13 +900,12 @@ extern unsigned wallheight[MAXVIEWWIDTH];
extern fixed tileglobal; extern fixed tileglobal;
extern fixed focallength; extern fixed focallength;
extern fixed mindist;
// //
// derived constants // derived constants
// //
extern fixed scale; extern fixed scale;
extern long heightnumerator,mindist; extern long heightnumerator;
// //
// refresh variables // refresh variables
...@@ -920,10 +914,7 @@ extern fixed viewx,viewy; // the focal point ...@@ -920,10 +914,7 @@ extern fixed viewx,viewy; // the focal point
extern int viewangle; extern int viewangle;
extern fixed viewsin,viewcos; extern fixed viewsin,viewcos;
extern long postsource;
extern unsigned postx; extern unsigned postx;
extern unsigned postwidth;
extern int horizwall[],vertwall[]; extern int horizwall[],vertwall[];
...@@ -950,12 +941,9 @@ void ThreeDRefresh (void); ...@@ -950,12 +941,9 @@ void ThreeDRefresh (void);
#define SPDPATROL 512 #define SPDPATROL 512
#define SPDDOG 1500 #define SPDDOG 1500
extern dirtype opposite[9]; extern dirtype opposite[9];
extern dirtype diagonal[9][9]; extern dirtype diagonal[9][9];
void InitHitRect (objtype *ob, unsigned radius);
void SpawnNewObj (unsigned tilex, unsigned tiley, statetype *state); void SpawnNewObj (unsigned tilex, unsigned tiley, statetype *state);
void NewState (objtype *ob, statetype *state); void NewState (objtype *ob, statetype *state);
......
...@@ -268,9 +268,7 @@ int CalcHeight (void) ...@@ -268,9 +268,7 @@ int CalcHeight (void)
=================== ===================
*/ */
long postsource;
unsigned postx; unsigned postx;
unsigned postwidth;
void ScalePost (byte *wall, int texture) // VGA version void ScalePost (byte *wall, int texture) // VGA version
{ {
......
...@@ -48,8 +48,6 @@ int centerx; ...@@ -48,8 +48,6 @@ int centerx;
int shootdelta; // pixels away from centerx a target can be int shootdelta; // pixels away from centerx a target can be
fixed scale,maxslope; fixed scale,maxslope;
long heightnumerator; long heightnumerator;
int minheightdiv;
void Quit (char *error); void Quit (char *error);
...@@ -584,7 +582,6 @@ void CalcProjection (long focal) ...@@ -584,7 +582,6 @@ void CalcProjection (long focal)
// the heightbuffer. The pixel height is height>>2 // the heightbuffer. The pixel height is height>>2
// //
heightnumerator = (TILEGLOBAL*scale)>>6; heightnumerator = (TILEGLOBAL*scale)>>6;
minheightdiv = heightnumerator/0x7fff +1;
// //
// calculate the angle offset from view angle of each pixel's ray // calculate the angle offset from view angle of each pixel's ray
......
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