Commit d9003143 authored by Steven Fuller's avatar Steven Fuller

Now just gotta fix linking problems, then actually fix the code!

parent 65d7dc44
......@@ -101,7 +101,7 @@ static void INL_KeyService(void)
byte k, c, temp;
int i;
k = inportb(0x60); // Get the scan code
/* k = inportb(0x60); // Get the scan code */
if (k == 0xe0) // Special key prefix
special = true;
......
......@@ -12,6 +12,7 @@ int px,py;
byte fontcolor,backcolor;
int fontnumber;
unsigned freelatch;
/* ======================================================================== */
void VW_DrawPropString(char *string)
......
......@@ -2,13 +2,12 @@
#include "id_heads.h"
unsigned bufferofs;
unsigned displayofs;
boolean screenfaded;
byte palette1[256][3], palette2[256][3];
byte *gfxbuf;
void VL_WaitVBL(int vbls)
{
}
......
......@@ -331,7 +331,7 @@ void InitAreas (void)
void InitDoorList (void)
{
memset (areabyplayer,0,sizeof(areabyplayer));
_fmemset (areaconnect,0,sizeof(areaconnect));
memset (areaconnect,0,sizeof(areaconnect));
lastdoorobj = &doorobjlist[0];
doornum = 0;
......
......@@ -59,8 +59,6 @@ void DebugMemory (void)
US_CPrint ("Memory Usage");
US_CPrint ("------------");
US_Print ("Total :");
US_PrintUnsigned (mminfo.mainmem/1024);
US_Print ("k\nFree :");
US_PrintUnsigned (MM_UnusedMemory()/1024);
US_Print ("k\nWith purge:");
......@@ -216,21 +214,10 @@ static char buf[10];
US_Print(" (Sound)");
US_Print("\n XMS: ");
if (page->xmsPage != -1)
US_PrintUnsigned(page->xmsPage);
else
US_Print("No");
US_Print("No");
US_Print("\n Main: ");
if (page->mainPage != -1)
US_PrintUnsigned(page->mainPage);
else if (page->emsPage != -1)
{
US_Print("EMS ");
US_PrintUnsigned(page->emsPage);
}
else
US_Print("No");
US_Print("No");
US_Print("\n Last hit: ");
US_PrintUnsigned(page->lastHit);
......@@ -247,7 +234,6 @@ static char buf[10];
//
// draw the wall
//
bufferofs += 32*SCREENWIDTH;
postx = 128;
postwidth = 1;
postsource = ((long)((unsigned)addr))<<16;
......@@ -256,16 +242,13 @@ static char buf[10];
wallheight[postx] = 256;
FarScalePost ();
}
bufferofs -= 32*SCREENWIDTH;
}
else if (i < PMSoundStart)
{
//
// draw the sprite
//
bufferofs += 32*SCREENWIDTH;
SimpleScaleShape (160, i-PMSpriteStart, 64);
bufferofs -= 32*SCREENWIDTH;
}
else if (i == ChunksInFile - 1)
{
......@@ -283,7 +266,7 @@ static char buf[10];
}
else
{
byte *dp = (byte *)MK_FP(addr,0);
byte *dp = addr;
for (j = 0;j < NumDigi;j++)
{
k = (DigiList[(j * 2) + 1] + (PMPageSize - 1)) / PMPageSize;
......
......@@ -56,6 +56,8 @@
#define NUMBERCHARS 9
#define HEIGHTRATIO 0.50
//----------------
#define EXTRAPOINTS 40000
......
......@@ -75,7 +75,6 @@ void AsmRefresh (void);
=
========================
*/
#if 0
fixed FixedByFrac (fixed a, fixed b)
{
long long ra = a;
......@@ -86,7 +85,6 @@ fixed FixedByFrac (fixed a, fixed b)
r >>= 16;
return (fixed)r;
}
#endif
//==========================================================================
......
This diff is collapsed.
// WL_PLAY.C
/* wl_play.c */
#include "WL_DEF.H"
#pragma hdrstop
#include "wl_def.h"
/*
......@@ -67,7 +66,7 @@ int viewsize;
boolean buttonheld[NUMBUTTONS];
boolean demorecord,demoplayback;
char far *demoptr, far *lastdemoptr;
char *demoptr, *lastdemoptr;
memptr demobuffer;
//
......@@ -374,11 +373,7 @@ void PollKeyboardMove (void)
void PollMouseMove (void)
{
int mousexmove,mouseymove;
Mouse(MDelta);
mousexmove = _CX;
mouseymove = _DX;
int mousexmove = 0, mouseymove = 0;
controlx += mousexmove*10/(13-mouseadjustment);
controly += mouseymove*20/(13-mouseadjustment);
......@@ -684,7 +679,6 @@ void CheckKeys (void)
STR_CHEATER5);
UNCACHEGRCHUNK(STARTFONT+1);
PM_CheckMainMem ();
IN_ClearKeysDown();
IN_Ack();
......@@ -713,7 +707,6 @@ void CheckKeys (void)
Message("Debugging keys are\nnow available!");
UNCACHEGRCHUNK(STARTFONT+1);
PM_CheckMainMem ();
IN_ClearKeysDown();
IN_Ack();
......@@ -739,7 +732,6 @@ void CheckKeys (void)
"that - right, Cheatmeister?!");
UNCACHEGRCHUNK(STARTFONT+1);
PM_CheckMainMem ();
IN_ClearKeysDown();
IN_Ack();
......@@ -758,8 +750,6 @@ void CheckKeys (void)
IN_ClearKeysDown ();
SD_MusicOn();
Paused = false;
if (MousePresent)
Mouse(MDelta); // Clear accumulated mouse movement
return;
}
......@@ -783,7 +773,6 @@ void CheckKeys (void)
if (scan == sc_F9)
StartMusic ();
PM_CheckMainMem ();
SETFONTCOLOR(0,15);
IN_ClearKeysDown();
return;
......@@ -808,9 +797,6 @@ void CheckKeys (void)
if (loadedgame)
playstate = ex_abort;
lasttimecount = TimeCount;
if (MousePresent)
Mouse(MDelta); // Clear accumulated mouse movement
PM_CheckMainMem ();
return;
}
......@@ -823,8 +809,6 @@ void CheckKeys (void)
fontnumber=0;
SETFONTCOLOR(0,15);
DebugKeys();
if (MousePresent)
Mouse(MDelta); // Clear accumulated mouse movement
lasttimecount = TimeCount;
return;
}
......@@ -1001,8 +985,8 @@ void StopMusic(void)
for (i = 0;i < LASTMUSIC;i++)
if (audiosegs[STARTMUSIC + i])
{
MM_SetPurge(&((memptr)audiosegs[STARTMUSIC + i]),3);
MM_SetLock(&((memptr)audiosegs[STARTMUSIC + i]),false);
MM_SetPurge((memptr)&(audiosegs[STARTMUSIC + i]),3);
MM_SetLock((memptr)&(audiosegs[STARTMUSIC + i]),false);
}
}
......@@ -1030,13 +1014,8 @@ void StartMusic(void)
MM_BombOnError (false);
CA_CacheAudioChunk(STARTMUSIC + chunk);
MM_BombOnError (true);
if (mmerror)
mmerror = false;
else
{
MM_SetLock(&((memptr)audiosegs[STARTMUSIC + chunk]),true);
SD_StartMusic((MusicGroup far *)audiosegs[STARTMUSIC + chunk]);
}
MM_SetLock((memptr)&(audiosegs[STARTMUSIC + chunk]),true);
SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + chunk]);
}
......@@ -1056,13 +1035,13 @@ void StartMusic(void)
#define WHITETICS 6
byte far redshifts[NUMREDSHIFTS][768];
byte far whiteshifts[NUMREDSHIFTS][768];
byte redshifts[NUMREDSHIFTS][768];
byte whiteshifts[NUMREDSHIFTS][768];
int damagecount,bonuscount;
boolean palshifted;
extern byte far gamepal;
extern byte gamepal;
/*
=====================
......@@ -1074,7 +1053,7 @@ extern byte far gamepal;
void InitRedShifts (void)
{
byte far *workptr, far *baseptr;
byte *workptr, *baseptr;
int i,j,delta;
......@@ -1083,7 +1062,7 @@ void InitRedShifts (void)
//
for (i=1;i<=NUMREDSHIFTS;i++)
{
workptr = (byte far *)&redshifts[i-1][0];
workptr = (byte *)&redshifts[i-1][0];
baseptr = &gamepal;
for (j=0;j<=255;j++)
......@@ -1099,7 +1078,7 @@ void InitRedShifts (void)
for (i=1;i<=NUMWHITESHIFTS;i++)
{
workptr = (byte far *)&whiteshifts[i-1][0];
workptr = (byte *)&whiteshifts[i-1][0];
baseptr = &gamepal;
for (j=0;j<=255;j++)
......@@ -1376,9 +1355,6 @@ void PlayLoop (void)
memset (buttonstate,0,sizeof(buttonstate));
ClearPaletteShifts ();
if (MousePresent)
Mouse(MDelta); // Clear accumulated mouse movement
if (demoplayback)
IN_StartAck ();
......@@ -1386,7 +1362,7 @@ void PlayLoop (void)
{
if (virtualreality)
{
helmetangle = peek (0x40,0xf0);
helmetangle = 0; /* TODO: virtualreality can be removed */
player->angle += helmetangle;
if (player->angle >= ANGLES)
player->angle -= ANGLES;
......
// WL_STATE.C
/* wl_state.c */
#include "WL_DEF.H"
#pragma hdrstop
#include "wl_def.h"
/*
=============================================================================
......
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