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

Minor code changes...

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