Commit 33b6fa93 authored by Steven Fuller's avatar Steven Fuller

Minor code changes...

parent d9136e3d
...@@ -293,9 +293,9 @@ void VL_Startup() ...@@ -293,9 +293,9 @@ void VL_Startup()
} }
} }
//attr.colormap = cmap; attr.colormap = cmap;
attr.event_mask = KeyPressMask | KeyReleaseMask | ExposureMask; attr.event_mask = KeyPressMask | KeyReleaseMask | ExposureMask;
attrmask = /*CWColormap |*/ CWEventMask; attrmask = CWColormap | CWEventMask;
if (fullscreen || dga) { if (fullscreen || dga) {
attrmask |= CWOverrideRedirect; attrmask |= CWOverrideRedirect;
...@@ -309,7 +309,7 @@ void VL_Startup() ...@@ -309,7 +309,7 @@ void VL_Startup()
Quit("Unable to create window!"); Quit("Unable to create window!");
} }
if (dga) { if (fullscreen || dga) {
XMapWindow(dpy, win); XMapWindow(dpy, win);
XRaiseWindow(dpy, win); XRaiseWindow(dpy, win);
XGrabKeyboard(dpy, win, True, GrabModeAsync, GrabModeAsync, CurrentTime); XGrabKeyboard(dpy, win, True, GrabModeAsync, GrabModeAsync, CurrentTime);
...@@ -543,17 +543,6 @@ void VW_UpdateScreen() ...@@ -543,17 +543,6 @@ void VW_UpdateScreen()
XPutImage(dpy, win, gc, img, 0, 0, 0, 0, 320, 200); XPutImage(dpy, win, gc, img, 0, 0, 0, 0, 320, 200);
} }
/*
=============================================================================
PALETTE OPS
To avoid snow, do a WaitVBL BEFORE calling these
=============================================================================
*/
/* /*
================= =================
= =
......
...@@ -859,12 +859,6 @@ void PicturePause (void); ...@@ -859,12 +859,6 @@ void PicturePause (void);
extern long lasttimecount; extern long lasttimecount;
extern long frameon; extern long frameon;
extern boolean fizzlein;
extern unsigned wallheight[MAXVIEWWIDTH];
extern fixed tileglobal;
extern fixed focallength;
// //
// derived constants // derived constants
...@@ -916,18 +910,6 @@ void DamageActor (objtype *ob, unsigned damage); ...@@ -916,18 +910,6 @@ void DamageActor (objtype *ob, unsigned damage);
boolean CheckLine (objtype *ob); boolean CheckLine (objtype *ob);
boolean CheckSight (objtype *ob); boolean CheckSight (objtype *ob);
/*
=============================================================================
WL_SCALE DEFINITIONS
=============================================================================
*/
void ScaleShape(int xcenter, int shapenum, unsigned height);
void SimpleScaleShape(int xcenter, int shapenum, unsigned height);
/* /*
============================================================================= =============================================================================
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#define ACTORSIZE 0x4000 #define ACTORSIZE 0x4000
unsigned wallheight[MAXVIEWWIDTH]; static unsigned wallheight[MAXVIEWWIDTH];
// //
// refresh variables // refresh variables
...@@ -45,6 +45,9 @@ static void AsmRefresh(); ...@@ -45,6 +45,9 @@ static void AsmRefresh();
}) })
#endif #endif
void ScaleShape(int xcenter, int shapenum, unsigned height);
void SimpleScaleShape(int xcenter, int shapenum, unsigned height);
/* ======================================================================== */ /* ======================================================================== */
/* /*
...@@ -892,19 +895,19 @@ static int CalcHeight() ...@@ -892,19 +895,19 @@ static int CalcHeight()
{ {
fixed gxt,gyt,nx,gx,gy; fixed gxt,gyt,nx,gx,gy;
gx = xintercept-viewx; gx = xintercept - viewx;
gxt = FixedByFrac(gx,viewcos); gxt = FixedByFrac(gx, viewcos);
gy = yintercept-viewy; gy = yintercept - viewy;
gyt = FixedByFrac(gy,viewsin); gyt = FixedByFrac(gy, viewsin);
nx = gxt-gyt; nx = gxt-gyt;
// //
// calculate perspective ratio (heightnumerator/(nx>>8)) // calculate perspective ratio (heightnumerator/(nx>>8))
// //
if (nx<MINDIST) if (nx < MINDIST)
nx=MINDIST; /* don't let divide overflow */ nx = MINDIST; /* don't let divide overflow */
return heightnumerator/(nx>>8); return heightnumerator/(nx>>8);
} }
......
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