Commit 40624c24 authored by Steven Fuller's avatar Steven Fuller

Added the "wolfhack" floor and ceiling drawing code just to see if it

worked.  After removing the modex-ness, it does.
parent e13d79d1
...@@ -16,10 +16,10 @@ XOBJS = $(OBJS) $(ROBJS) vi_xlib.o ...@@ -16,10 +16,10 @@ XOBJS = $(OBJS) $(ROBJS) vi_xlib.o
LFLAGS = -lm LFLAGS = -lm
#OBJS += sd_null.o OBJS += sd_null.o
OBJS += sd_oss.o fmopl.o #OBJS += sd_oss.o fmopl.o
CFLAGS += -D_REENTRANT #CFLAGS += -D_REENTRANT
LFLAGS += -lpthread #LFLAGS += -lpthread
SLFLAGS = $(LFLAGS) -lvga SLFLAGS = $(LFLAGS) -lvga
......
...@@ -22,6 +22,8 @@ SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + chunk]); ...@@ -22,6 +22,8 @@ SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + chunk]);
=> =>
SD_StartMusic(chunk); SD_StartMusic(chunk);
* refresh rate under svgalib is horrible. the screen keeps getting updated
midframe. it's due to the way CalcTics works
* rewrite hw (sound, input) code, remove stuff like SD_SetSoundMode * rewrite hw (sound, input) code, remove stuff like SD_SetSoundMode
* proper left/right sound * proper left/right sound
* adlib sounds seem like they play at twice the freq * adlib sounds seem like they play at twice the freq
...@@ -63,12 +65,11 @@ function with same parameters, only difference is the name) ...@@ -63,12 +65,11 @@ 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...
* retrace problems (esp. with svgalib).
* 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
* 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 (during fizzlefade with largest
window size) in svgalib -- is that another bug with my geforce? window size, for example) in svgalib -- is that another bug with my geforce?
no idea how to do fizzlefade in TrueColor 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
...@@ -84,7 +85,8 @@ but palette fades will still need it! ...@@ -84,7 +85,8 @@ but palette fades will still need it!
* the higher depths are a hack since a palette lookup has to be done * the higher depths are a hack since a palette lookup has to be done
for every byte when transferring to the pixmap, palette fades require a for every byte when transferring to the pixmap, palette fades require a
screen update screen update
* make sure none of the code tries to handle gfx/sound data directly * make sure none of the non-loader code tries to handle gfx/sound data
directly
* when window loses focus, it should clear the keys * when window loses focus, it should clear the keys
* clean up vi_xlib.c: fix vid mode changing, fix dga for non8bit modes and * clean up vi_xlib.c: fix vid mode changing, fix dga for non8bit modes and
the nonpalette setting stuff... lots of if statements the nonpalette setting stuff... lots of if statements
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
boolean SoundSourcePresent, AdLibPresent, SoundBlasterPresent; boolean SoundSourcePresent, AdLibPresent, SoundBlasterPresent;
static boolean SoundPositioned;
SDMode SoundMode, MusicMode; SDMode SoundMode, MusicMode;
SDSMode DigiMode; SDSMode DigiMode;
...@@ -53,8 +51,6 @@ void SD_Startup() ...@@ -53,8 +51,6 @@ void SD_Startup()
{ {
if (SD_Started) if (SD_Started)
return; return;
SD_Started = true;
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
...@@ -67,9 +63,6 @@ void SD_Shutdown() ...@@ -67,9 +63,6 @@ void SD_Shutdown()
if (!SD_Started) if (!SD_Started)
return; return;
SD_MusicOff();
SD_StopSound();
SD_Started = false; SD_Started = false;
} }
...@@ -78,8 +71,9 @@ void SD_Shutdown() ...@@ -78,8 +71,9 @@ void SD_Shutdown()
// SD_PlaySound() - plays the specified sound on the appropriate hardware // SD_PlaySound() - plays the specified sound on the appropriate hardware
// //
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
void SD_PlaySound(soundnames sound) boolean SD_PlaySound(soundnames sound)
{ {
return false;
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
...@@ -167,112 +161,6 @@ boolean SD_MusicPlaying() ...@@ -167,112 +161,6 @@ boolean SD_MusicPlaying()
//=========================================================================== //===========================================================================
/*
==========================
=
= SetSoundLoc - Given the location of an object (in terms of global
= coordinates, held in globalsoundx and globalsoundy), munges the values
= for an approximate distance from the left and right ear, and puts
= those values into leftchannel and rightchannel.
=
= JAB
=
==========================
*/
static fixed globalsoundx, globalsoundy;
static int leftchannel, rightchannel;
#define ATABLEMAX 15
static byte righttable[ATABLEMAX][ATABLEMAX * 2] = {
{ 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 6, 0, 0, 0, 0, 0, 1, 3, 5, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 6, 4, 0, 0, 0, 0, 0, 2, 4, 6, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 4, 1, 0, 0, 0, 1, 2, 4, 6, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 6, 5, 4, 2, 1, 0, 1, 2, 3, 5, 7, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 6, 5, 4, 3, 2, 2, 3, 3, 5, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 6, 6, 5, 4, 4, 4, 4, 5, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 6, 6, 5, 5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 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8}
};
static void SetSoundLoc(fixed gx, fixed gy)
{
// fixed xt, yt;
int x, y;
#if 0
//
// translate point to view centered coordinates
//
gx -= viewx;
gy -= viewy;
//
// calculate newx
//
xt = FixedByFrac(gx,viewcos);
yt = FixedByFrac(gy,viewsin);
x = (xt - yt) >> TILESHIFT;
//
// calculate newy
//
xt = FixedByFrac(gx,viewsin);
yt = FixedByFrac(gy,viewcos);
y = (yt + xt) >> TILESHIFT;
#endif
if (y >= ATABLEMAX)
y = ATABLEMAX - 1;
else if (y <= -ATABLEMAX)
y = -ATABLEMAX;
if (x < 0)
x = -x;
if (x >= ATABLEMAX)
x = ATABLEMAX - 1;
leftchannel = lefttable[x][y + ATABLEMAX];
rightchannel = righttable[x][y + ATABLEMAX];
}
///////////////////////////////////////////////////////////////////////////
//
// SD_PositionSound() - Sets up a stereo imaging location for the next
// sound to be played. Each channel ranges from 0 to 15.
//
///////////////////////////////////////////////////////////////////////////
static void SD_PositionSound(int leftvol, int rightvol)
{
}
static void SD_SetPosition(int leftpos, int rightpos)
{
}
/* /*
========================== ==========================
= =
...@@ -285,20 +173,9 @@ static void SD_SetPosition(int leftpos, int rightpos) ...@@ -285,20 +173,9 @@ static void SD_SetPosition(int leftpos, int rightpos)
*/ */
void PlaySoundLocGlobal(word s,fixed gx,fixed gy) void PlaySoundLocGlobal(word s,fixed gx,fixed gy)
{ {
SetSoundLoc(gx,gy);
SD_PositionSound(leftchannel,rightchannel);
SD_PlaySound(s); SD_PlaySound(s);
globalsoundx = gx;
globalsoundy = gy;
} }
void UpdateSoundLoc(fixed x, fixed y, int angle) void UpdateSoundLoc(fixed x, fixed y, int angle)
{ {
if (SoundPositioned)
{
SetSoundLoc(globalsoundx,globalsoundy);
SD_SetPosition(leftchannel,rightchannel);
}
} }
...@@ -44,12 +44,15 @@ void Quit(char *error) ...@@ -44,12 +44,15 @@ void Quit(char *error)
void VL_WaitVBL(int vbls) void VL_WaitVBL(int vbls)
{ {
vga_waitretrace(); int i;
for (i = 0; i < vbls; i++)
vga_waitretrace();
} }
void VW_UpdateScreen() void VW_UpdateScreen()
{ {
/* VL_WaitVBL(1); */ VL_WaitVBL(1);
memcpy(graph_mem, gfxbuf, 64000); memcpy(graph_mem, gfxbuf, 64000);
} }
......
...@@ -597,7 +597,171 @@ static void WallRefresh() ...@@ -597,7 +597,171 @@ static void WallRefresh()
AsmRefresh(); AsmRefresh();
} }
//========================================================================== /* ======================================================================== */
#define MAXVIEWHEIGHT 200
static int spanstart[MAXVIEWHEIGHT/2];
static fixed basedist[MAXVIEWHEIGHT/2];
static unsigned char planepics[8192]; /* 4k of ceiling, 4k of floor */
static int halfheight = 0;
static byte *planeylookup[MAXVIEWHEIGHT/2];
static unsigned mirrorofs[MAXVIEWHEIGHT/2];
static unsigned short int mr_rowofs;
static unsigned short int mr_count;
static unsigned short int mr_xstep;
static unsigned short int mr_ystep;
static unsigned short int mr_xfrac;
static unsigned short int mr_yfrac;
static char *mr_dest;
static void MapRow()
{
unsigned int ebx, edx, esi;
edx = (mr_ystep << 16) | (mr_xstep);
esi = (mr_yfrac << 16) | (mr_xfrac);
while (mr_count--) {
ebx = ((esi & 0xFC000000) >> 25) | ((esi & 0xFC00) >> 3);
esi += edx;
/*
mr_dest[0] = planepics[0x1F00|(planepics[(ebx&0x1FFE)+0]&0xFF)];
mr_dest[mr_rowofs] = planepics[0x1F00|(planepics[(ebx&0x1FFE)+1]&0xFF)];
*/
mr_dest[0] = planepics[ebx+0];
mr_dest[mr_rowofs] = planepics[ebx+1];
mr_dest++;
}
}
/*
==============
=
= DrawSpans
=
= Height ranges from 0 (infinity) to viewheight/2 (nearest)
==============
*/
static void DrawSpans(int x1, int x2, int height)
{
fixed length;
int prestep;
fixed startxfrac, startyfrac;
byte *toprow;
toprow = planeylookup[height]+(320*yoffset+xoffset);
mr_rowofs = mirrorofs[height];
mr_xstep = (viewsin / height) >> 1;
mr_ystep = (viewcos / height) >> 1;
length = basedist[height];
startxfrac = (viewx + FixedByFrac(length, viewcos));
startyfrac = (viewy - FixedByFrac(length, viewsin));
// draw two spans simultaniously
prestep = viewwidth/2 - x1;
mr_xfrac = startxfrac - mr_xstep*prestep;
mr_yfrac = startyfrac - mr_ystep*prestep;
mr_dest = toprow + x1;
mr_count = x2 - x1 + 1;
if (mr_count)
MapRow();
}
/*
===================
=
= SetPlaneViewSize
=
===================
*/
static void SetPlaneViewSize()
{
int x, y;
byte *dest, *src;
halfheight = viewheight >> 1;
for (y = 0; y < halfheight; y++) {
planeylookup[y] = gfxbuf + (halfheight-1-y)*320;
mirrorofs[y] = (y*2+1)*320;
if (y > 0)
basedist[y] = GLOBAL1/2*scale/y;
}
src = PM_GetPage(0);
dest = planepics;
for (x = 0; x < 4096; x++) {
*dest = *src++;
dest += 2;
}
src = PM_GetPage(1);
dest = planepics+1;
for (x = 0; x < 4096; x++) {
*dest = *src++;
dest += 2;
}
}
/*
===================
=
= DrawPlanes
=
===================
*/
void DrawPlanes()
{
int height, lastheight;
int x;
if ((viewheight>>1) != halfheight)
SetPlaneViewSize(); // screen size has changed
//
// loop over all columns
//
lastheight = halfheight;
for (x = 0; x < viewwidth; x++)
{
height = wallheight[x]>>3;
if (height < lastheight) { // more starts
do
{
spanstart[--lastheight] = x;
} while (lastheight > height);
} else if (height > lastheight) { // draw spans
if (height > halfheight)
height = halfheight;
for (; lastheight < height; lastheight++)
DrawSpans(spanstart[lastheight], x-1, lastheight);
}
}
height = halfheight;
for (; lastheight < height; lastheight++)
DrawSpans(spanstart[lastheight], x-1, lastheight);
}
/* ======================================================================== */
/* /*
======================== ========================
...@@ -622,11 +786,13 @@ void ThreeDRefresh() ...@@ -622,11 +786,13 @@ void ThreeDRefresh()
ClearScreen(); ClearScreen();
WallRefresh(); WallRefresh();
#if 0
DrawPlanes(); /* silly floor/ceiling drawing */
#endif
// //
// draw all the scaled images // draw all the scaled images
// //
DrawScaleds(); // draw scaled stuff DrawScaleds(); /* draw scaled stuff */
DrawPlayerWeapon(); /* draw player's hands */ DrawPlayerWeapon(); /* draw player's hands */
// //
...@@ -640,7 +806,7 @@ void ThreeDRefresh() ...@@ -640,7 +806,7 @@ void ThreeDRefresh()
lasttimecount = 0; /* don't make a big tic count */ lasttimecount = 0; /* don't make a big tic count */
set_TimeCount(0); set_TimeCount(0);
} }
VW_UpdateScreen(); VW_UpdateScreen();
frameon++; frameon++;
} }
...@@ -655,17 +821,17 @@ void ThreeDRefresh() ...@@ -655,17 +821,17 @@ void ThreeDRefresh()
static int samex(int intercept, int tile) static int samex(int intercept, int tile)
{ {
if (xtilestep > 0) { if (xtilestep > 0) {
if ((intercept>>16) >= tile) if ((intercept>>16) >= tile)
return 0; return 0;
else else
return 1; return 1;
} else { } else {
if ((intercept>>16) <= tile) if ((intercept>>16) <= tile)
return 0; return 0;
else else
return 1; return 1;
} }
} }
static int samey(int intercept, int tile) static int samey(int intercept, int tile)
...@@ -703,9 +869,9 @@ static void AsmRefresh() ...@@ -703,9 +869,9 @@ static void AsmRefresh()
angle = midangle + pixelangle[postx]; angle = midangle + pixelangle[postx];
if (angle < 0) { if (angle < 0) {
/* -90 - -1 degree arc */ /* -90 - -1 degree arc */
angle += FINEANGLES; angle += FINEANGLES;
goto entry360; goto entry360;
} else if (angle < DEG90) { } else if (angle < DEG90) {
/* 0-89 degree arc */ /* 0-89 degree arc */
entry90: entry90:
...@@ -715,7 +881,7 @@ static void AsmRefresh() ...@@ -715,7 +881,7 @@ static void AsmRefresh()
ystep = -finetangent[angle]; ystep = -finetangent[angle];
xpartial = xpartialup; xpartial = xpartialup;
ypartial = ypartialdown; ypartial = ypartialdown;
} else if (angle < DEG180) { } else if (angle < DEG180) {
/* 90-179 degree arc */ /* 90-179 degree arc */
xtilestep = -1; xtilestep = -1;
ytilestep = -1; ytilestep = -1;
...@@ -723,7 +889,7 @@ static void AsmRefresh() ...@@ -723,7 +889,7 @@ static void AsmRefresh()
ystep = -finetangent[DEG180-1-angle]; ystep = -finetangent[DEG180-1-angle];
xpartial = xpartialdown; xpartial = xpartialdown;
ypartial = ypartialdown; ypartial = ypartialdown;
} else if (angle < DEG270) { } else if (angle < DEG270) {
/* 180-269 degree arc */ /* 180-269 degree arc */
xtilestep = -1; xtilestep = -1;
ytilestep = 1; ytilestep = 1;
...@@ -731,7 +897,7 @@ static void AsmRefresh() ...@@ -731,7 +897,7 @@ static void AsmRefresh()
ystep = finetangent[angle-DEG180]; ystep = finetangent[angle-DEG180];
xpartial = xpartialdown; xpartial = xpartialdown;
ypartial = ypartialup; ypartial = ypartialup;
} else if (angle < DEG360) { } else if (angle < DEG360) {
/* 270-359 degree arc */ /* 270-359 degree arc */
entry360: entry360:
xtilestep = 1; xtilestep = 1;
...@@ -740,11 +906,11 @@ static void AsmRefresh() ...@@ -740,11 +906,11 @@ static void AsmRefresh()
ystep = finetangent[DEG360-1-angle]; ystep = finetangent[DEG360-1-angle];
xpartial = xpartialup; xpartial = xpartialup;
ypartial = ypartialup; ypartial = ypartialup;
} else { } else {
angle -= FINEANGLES; angle -= FINEANGLES;
goto entry90; goto entry90;
} }
yintercept = viewy + xpartialbyystep (); yintercept = viewy + xpartialbyystep ();
xtile = focaltx + xtilestep; xtile = focaltx + xtilestep;
...@@ -786,8 +952,7 @@ static void AsmRefresh() ...@@ -786,8 +952,7 @@ static void AsmRefresh()
xintercept = (xtile << 16) + 32768; xintercept = (xtile << 16) + 32768;
HitVertDoor(); HitVertDoor();
} }
} } else {
else {
xintercept = xtile << 16; xintercept = xtile << 16;
HitVertWall(); HitVertWall();
} }
...@@ -817,8 +982,7 @@ static void AsmRefresh() ...@@ -817,8 +982,7 @@ static void AsmRefresh()
xintercept = xtemp; xintercept = xtemp;
yintercept = ytile << 16; yintercept = ytile << 16;
HitHorizPWall(); HitHorizPWall();
} } else {
else {
doorxhit = xintercept + xstep / 2; doorxhit = xintercept + xstep / 2;
if (TILE (doorxhit) != TILE (xintercept)) if (TILE (doorxhit) != TILE (xintercept))
goto passhoriz; goto passhoriz;
...@@ -829,8 +993,7 @@ static void AsmRefresh() ...@@ -829,8 +993,7 @@ static void AsmRefresh()
yintercept = (ytile << 16) + 32768; yintercept = (ytile << 16) + 32768;
HitHorizDoor(); HitHorizDoor();
} }
} } else {
else {
yintercept = ytile << 16; yintercept = ytile << 16;
HitHorizWall(); HitHorizWall();
} }
...@@ -845,7 +1008,6 @@ static void AsmRefresh() ...@@ -845,7 +1008,6 @@ static void AsmRefresh()
} }
} }
static void HitVertWall() static void HitVertWall()
{ {
int wallpic; int wallpic;
...@@ -936,7 +1098,6 @@ static void HitHorizPWall() ...@@ -936,7 +1098,6 @@ static void HitHorizPWall()
ScalePost(wall, texture); ScalePost(wall, texture);
} }
/* /*
==================== ====================
= =
......
...@@ -442,7 +442,7 @@ void PollControls() ...@@ -442,7 +442,7 @@ void PollControls()
lasttimecount += DEMOTICS; lasttimecount += DEMOTICS;
tics = DEMOTICS; tics = DEMOTICS;
} else } else
CalcTics (); CalcTics();
controlx = 0; controlx = 0;
controly = 0; controly = 0;
...@@ -1291,15 +1291,15 @@ void PlayLoop() ...@@ -1291,15 +1291,15 @@ void PlayLoop()
// //
madenoise = false; madenoise = false;
MoveDoors (); MoveDoors();
MovePWalls (); MovePWalls();
for (obj = player;obj;obj = obj->next) for (obj = player;obj;obj = obj->next)
DoActor (obj); DoActor (obj);
UpdatePaletteShifts (); UpdatePaletteShifts();
ThreeDRefresh (); ThreeDRefresh();
// //
// MAKE FUNNY FACE IF BJ DOESN'T MOVE FOR AWHILE // MAKE FUNNY FACE IF BJ DOESN'T MOVE FOR AWHILE
......
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