Commit d7208f64 authored by Steven Fuller's avatar Steven Fuller

The Very-Very-Very Slow version.

Wolfenstein 3D is now capable of running in (almost) any screen resolution
(using a few hacks).
parent 50a0ca9f
...@@ -52,7 +52,7 @@ sdlwolf3d: $(DOBJS) ...@@ -52,7 +52,7 @@ sdlwolf3d: $(DOBJS)
gcc -o sdlwolf3d $(DOBJS) $(DLFLAGS) gcc -o sdlwolf3d $(DOBJS) $(DLFLAGS)
clean: clean:
rm -rf swolf3d xwolf3d *.o rm -rf swolf3d xwolf3d sdlwolf3d *.o
distclean: clean distclean: clean
rm -rf *~ DEADJOE rm -rf *~ DEADJOE
......
...@@ -14,57 +14,14 @@ Sound Menu: ...@@ -14,57 +14,14 @@ Sound Menu:
* Sampling Rate: * Sampling Rate:
- 44100 - 44100
- 22050 - 22050
------------------------------------------------------------------------------
[Indexed?]:
Yes:
- palette (8bit)
No:
- truecolor (15, 16, 24, 32)
[Shm?]:
Yes:
- XShmImage
No:
- XImage
[Windowed]:
- [Indexed?]
- [Shm?]
[DGA1?]:
Yes:
- YES
No:
- NO
[DGA2?]:
Yes:
- YES
No:
- [DGA1?]
[DGA?]:
- [DGA2?]
Yes:
- [Indexed?]
No:
- [Windowed]
[Fullscreen?]:
Yes:
- [DGA?]
No:
- [Windowed]
[Init]:
- [Fullscreen?]
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
* *
SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + chunk]); SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + chunk]);
=> =>
SD_StartMusic(chunk); SD_StartMusic(chunk);
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
* fix fix fix different size stuff
* add ylookup
* remove farmapylookup? * remove farmapylookup?
* would be nice if Quit() used vsnprintf, etc * would be nice if Quit() used vsnprintf, etc
* actor walking through door is drawn in front of door: near end of E1M1 for * actor walking through door is drawn in front of door: near end of E1M1 for
......
#include "id_heads.h" #include "wl_def.h"
typedef struct typedef struct
{ {
......
#include "id_heads.h" #include "wl_def.h"
// Global variables // Global variables
boolean NoWait; boolean NoWait;
......
#include "id_heads.h" #include "wl_def.h"
/* ======================================================================== */
pictabletype *pictable; pictabletype *pictable;
...@@ -14,68 +12,6 @@ static byte palette1[256][3], palette2[256][3]; ...@@ -14,68 +12,6 @@ static byte palette1[256][3], palette2[256][3];
/* ======================================================================== */ /* ======================================================================== */
void VW_DrawPropString(char *string)
{
fontstruct *font;
int width, step, height;
byte *source, *dest, *ptrs, *ptrd;
byte ch;
font = (fontstruct *)grsegs[STARTFONT+fontnumber];
height = font->height;
dest = gfxbuf + py * 320 + px;
while ((ch = *string++) != 0) {
width = step = font->width[ch];
source = ((byte *)font)+font->location[ch];
while (width--) {
height = font->height;
ptrs = source;
ptrd = dest;
while (height--) {
if (*ptrs)
*ptrd = fontcolor;
ptrs += step;
ptrd += 320;
}
source++;
dest++;
}
}
}
void VWL_MeasureString(char *string, word *width, word *height,
fontstruct *font)
{
/* proportional width */
*height = font->height;
for (*width = 0;*string;string++)
*width += font->width[*((byte *)string)];
}
void VW_MeasurePropString (char *string, word *width, word *height)
{
VWL_MeasureString(string,width,height,(fontstruct *)grsegs[STARTFONT+fontnumber]);
}
void VWB_DrawTile8(int x, int y, int tile)
{
VL_MemToScreen(grsegs[STARTTILE8]+(tile*64), 8, 8, x, y);
}
void VWB_DrawPic(int x, int y, int chunknum)
{
int picnum = chunknum - STARTPICS;
unsigned width,height;
x &= ~7;
width = pictable[picnum].width;
height = pictable[picnum].height;
VL_MemToScreen(grsegs[chunknum],width,height,x,y);
}
/* /*
=================== ===================
= =
...@@ -108,7 +44,7 @@ void LoadLatchMem() ...@@ -108,7 +44,7 @@ void LoadLatchMem()
=================== ===================
*/ */
boolean FizzleFade(unsigned xx, unsigned yy, unsigned width,unsigned height, unsigned frames, boolean abortable) boolean FizzleFade(unsigned xx, unsigned yy, unsigned width, unsigned height, unsigned frames, boolean abortable)
{ {
int pixperframe; int pixperframe;
unsigned x, y, p, frame; unsigned x, y, p, frame;
...@@ -117,13 +53,13 @@ boolean FizzleFade(unsigned xx, unsigned yy, unsigned width,unsigned height, uns ...@@ -117,13 +53,13 @@ boolean FizzleFade(unsigned xx, unsigned yy, unsigned width,unsigned height, uns
rndval = 1; rndval = 1;
pixperframe = 64000/frames; pixperframe = 64000/frames;
IN_StartAck (); IN_StartAck();
frame=0; frame = 0;
set_TimeCount(0); set_TimeCount(0);
do { do {
if (abortable && IN_CheckAck ()) if (abortable && IN_CheckAck())
return true; return true;
for (p = 0; p < pixperframe; p++) { for (p = 0; p < pixperframe; p++) {
y = (rndval & 0x00FF) - 1; y = (rndval & 0x00FF) - 1;
...@@ -135,7 +71,7 @@ boolean FizzleFade(unsigned xx, unsigned yy, unsigned width,unsigned height, uns ...@@ -135,7 +71,7 @@ boolean FizzleFade(unsigned xx, unsigned yy, unsigned width,unsigned height, uns
} else } else
rndval >>= 1; rndval >>= 1;
if ((x>width) || (y>height)) if ((x > width) || (y > height))
continue; continue;
VL_DirectPlot(xx+x, yy+y, xx+x, yy+y); VL_DirectPlot(xx+x, yy+y, xx+x, yy+y);
...@@ -145,10 +81,23 @@ boolean FizzleFade(unsigned xx, unsigned yy, unsigned width,unsigned height, uns ...@@ -145,10 +81,23 @@ boolean FizzleFade(unsigned xx, unsigned yy, unsigned width,unsigned height, uns
} }
frame++; frame++;
while (get_TimeCount() < frame) ; while (get_TimeCount() < frame);
} while (1); } while (1);
} }
void VL_FillPalette(int red, int green, int blue)
{
char pal[768];
int i;
for (i = 0; i < 256; i++) {
pal[i*3+0] = red;
pal[i*3+1] = green;
pal[i*3+2] = blue;
}
VL_SetPalette(pal);
}
/* /*
================= =================
= =
...@@ -199,7 +148,6 @@ void VL_FadeOut(int start, int end, int red, int green, int blue, int steps) ...@@ -199,7 +148,6 @@ void VL_FadeOut(int start, int end, int red, int green, int blue, int steps)
screenfaded = true; screenfaded = true;
} }
/* /*
================= =================
= =
...@@ -212,7 +160,7 @@ void VL_FadeIn(int start, int end, const byte *palette, int steps) ...@@ -212,7 +160,7 @@ void VL_FadeIn(int start, int end, const byte *palette, int steps)
{ {
int i,j,delta; int i,j,delta;
VL_GetPalette (&palette1[0][0]); VL_GetPalette(&palette1[0][0]);
memcpy(&palette2[0][0],&palette1[0][0],sizeof(palette1)); memcpy(&palette2[0][0],&palette1[0][0],sizeof(palette1));
start *= 3; start *= 3;
...@@ -272,3 +220,236 @@ void VL_DeModeXize(byte *buf, int width, int height) ...@@ -272,3 +220,236 @@ void VL_DeModeXize(byte *buf, int width, int height)
memcpy(buf, mem, width * height); memcpy(buf, mem, width * height);
free(mem); free(mem);
} }
/*
=================
=
= VL_Plot
=
=================
*/
static void VL_Plot(int x, int y, int color)
{
int xend, yend, xfrac, yfrac, xs, ys;
xend = x + 1;
yend = y + 1;
xfrac = (vwidth << 16) / 320;
yfrac = (vheight << 16) / 200;
x *= xfrac;
y *= yfrac;
xend *= xfrac;
yend *= yfrac;
xfrac = (320 << 16) / vwidth;
yfrac = (200 << 16) / vheight;
for (xs = x; xs < xend; xs += xfrac)
for (ys = y; ys < yend; ys += yfrac)
*(gfxbuf + (ys >> 16) * vwidth + (xs >> 16)) = color;
/*
*(gfxbuf + vwidth * y + x) = color;
*/
}
void VW_Plot(int x, int y, int color)
{
*(gfxbuf + vwidth * y + x) = color;
}
void VW_DrawPropString(char *string)
{
fontstruct *font;
int width, step, height, x, xs, y;
byte *source, *ptrs;
/* byte *dest, *ptrd; */
byte ch;
font = (fontstruct *)grsegs[STARTFONT+fontnumber];
height = font->height;
xs = 0;
while ((ch = *string++) != 0) {
width = step = font->width[ch];
source = ((byte *)font)+font->location[ch];
for (x = 0; x < width; x++) {
height = font->height;
ptrs = source;
for (y = 0; y < height; y++) {
if (*ptrs)
VL_Plot(px+xs, py+y, fontcolor);
ptrs += step;
}
xs++;
source++;
}
}
/*
dest = gfxbuf + py * vwidth + px;
while ((ch = *string++) != 0) {
width = step = font->width[ch];
source = ((byte *)font)+font->location[ch];
while (width--) {
height = font->height;
ptrs = source;
ptrd = dest;
while (height--) {
if (*ptrs)
*ptrd = fontcolor;
ptrs += step;
ptrd += vwidth;
}
source++;
dest++;
}
}
*/
}
void VWL_MeasureString(char *string, word *width, word *height,
fontstruct *font)
{
/* proportional width */
*height = font->height;
for (*width = 0;*string;string++)
*width += font->width[*((byte *)string)];
}
void VW_MeasurePropString (char *string, word *width, word *height)
{
VWL_MeasureString(string,width,height,(fontstruct *)grsegs[STARTFONT+fontnumber]);
}
void VWB_DrawTile8(int x, int y, int tile)
{
VL_MemToScreen(grsegs[STARTTILE8]+(tile*64), 8, 8, x, y);
}
void VWB_DrawPic(int x, int y, int chunknum)
{
int picnum = chunknum - STARTPICS;
unsigned width,height;
x &= ~7;
width = pictable[picnum].width;
height = pictable[picnum].height;
VL_MemToScreen(grsegs[chunknum],width,height,x,y);
}
/*
=================
=
= VL_Hlin
=
=================
*/
void VL_Hlin(unsigned x, unsigned y, unsigned width, unsigned color)
{
int w;
for (w = 0; w < width; w++)
VL_Plot(x+w, y, color);
/*
memset(gfxbuf + vwidth * y + x, color, width);
*/
}
/*
=================
=
= VL_Vlin
=
=================
*/
void VL_Vlin(int x, int y, int height, int color)
{
int h;
for (h = 0; h < height; h++)
VL_Plot(x, y+h, color);
/*
byte *ptr = gfxbuf + vwidth * y + x;
while (height--) {
*ptr = color;
ptr += vwidth;
}
*/
}
/*
=================
=
= VL_Bar
=
=================
*/
void VW_Bar(int x, int y, int width, int height, int color)
{
int w, h;
for (w = 0; w < width; w++)
for (h = 0; h < height; h++)
VL_Plot(x+w, y+h, color);
/*
byte *ptr;
width *= vwidth / 320;
height *= vheight / 200;
x *= vwidth / 320;
y *= vheight / 200;
ptr = gfxbuf + vwidth * y + x;
while (height--) {
memset(ptr, color, width);
ptr += vwidth;
}
*/
}
void VL_Bar(int x, int y, int width, int height, int color)
{
byte *ptr = gfxbuf + vwidth * y + x;
while (height--) {
memset(ptr, color, width);
ptr += vwidth;
}
}
/*
=================
=
= VL_MemToScreen
=
= Draws a block of data to the screen.
=
=================
*/
void VL_MemToScreen(const byte *source, int width, int height, int x, int y)
{
int w, h;
for (w = 0; w < width; w++)
for (h = 0; h < height; h++)
VL_Plot(x+w, y+h, source[h*width+w]);
/*
byte *ptr = gfxbuf + vwidth * y + x;
while(height--) {
memcpy(ptr, source, width);
source += width;
ptr += vwidth;
}
*/
}
...@@ -35,8 +35,6 @@ extern boolean screenfaded; ...@@ -35,8 +35,6 @@ extern boolean screenfaded;
#define VW_Startup VL_Startup #define VW_Startup VL_Startup
#define VW_Shutdown VL_Shutdown #define VW_Shutdown VL_Shutdown
#define VW_Bar VL_Bar
#define VW_Plot VL_Plot
#define VW_Hlin(x,z,y,c) VL_Hlin(x,y,(z)-(x)+1,c) #define VW_Hlin(x,z,y,c) VL_Hlin(x,y,(z)-(x)+1,c)
#define VW_Vlin(y,z,x,c) VL_Vlin(x,y,(z)-(y)+1,c) #define VW_Vlin(y,z,x,c) VL_Vlin(x,y,(z)-(y)+1,c)
#define VW_WaitVBL VL_WaitVBL #define VW_WaitVBL VL_WaitVBL
...@@ -55,4 +53,6 @@ void LoadLatchMem(); ...@@ -55,4 +53,6 @@ void LoadLatchMem();
void VL_CacheScreen(int chunk); void VL_CacheScreen(int chunk);
void VW_Bar(int x, int y, int width, int height, int color);
#endif #endif
#include "id_heads.h" #include "wl_def.h"
#ifdef DOSISM /* TODO: bad name.. since djgpp code would use interrupt (maybe uclock?) most likely */ #ifdef DOSISM /* TODO: bad name.. since djgpp code would use interrupt (maybe uclock?) most likely */
......
#include "id_heads.h" #include "wl_def.h"
boolean SoundSourcePresent, AdLibPresent, SoundBlasterPresent; boolean SoundSourcePresent, AdLibPresent, SoundBlasterPresent;
......
...@@ -8,8 +8,6 @@ extern byte *gfxbuf; ...@@ -8,8 +8,6 @@ extern byte *gfxbuf;
void VL_Startup(); void VL_Startup();
void VL_Shutdown(); void VL_Shutdown();
void VL_ClearVideo(byte color);
void VL_WaitVBL(int vbls); void VL_WaitVBL(int vbls);
void VW_UpdateScreen(); void VW_UpdateScreen();
...@@ -17,7 +15,7 @@ void VL_FillPalette(int red, int green, int blue); ...@@ -17,7 +15,7 @@ void VL_FillPalette(int red, int green, int blue);
void VL_SetPalette(const byte *palette); void VL_SetPalette(const byte *palette);
void VL_GetPalette(byte *palette); void VL_GetPalette(byte *palette);
void VL_Plot(int x, int y, int color); void VW_Plot(int x, int y, int color);
void VL_Hlin(unsigned x, unsigned y, unsigned width, unsigned color); void VL_Hlin(unsigned x, unsigned y, unsigned width, unsigned color);
void VL_Vlin(int x, int y, int height, int color); void VL_Vlin(int x, int y, int height, int color);
void VL_Bar(int x, int y, int width, int height, int color); void VL_Bar(int x, int y, int width, int height, int color);
...@@ -28,6 +26,7 @@ void VL_DeModeXize(byte *buf, int width, int height); ...@@ -28,6 +26,7 @@ void VL_DeModeXize(byte *buf, int width, int height);
void VL_DirectPlot(int x1, int y1, int x2, int y2); void VL_DirectPlot(int x1, int y1, int x2, int y2);
#define MaxPlayers 4 #define MaxPlayers 4
#define MaxJoys 2 #define MaxJoys 2
#define NumCodes 128 #define NumCodes 128
......
...@@ -81,46 +81,6 @@ void VL_Shutdown() ...@@ -81,46 +81,6 @@ void VL_Shutdown()
//=========================================================================== //===========================================================================
/*
=================
=
= VL_ClearVideo
=
= Fill the entire video buffer with a given color
=
=================
*/
void VL_ClearVideo(byte color)
{
memset(gfxbuf, color, 64000);
}
/*
=============================================================================
PALETTE OPS
To avoid snow, do a WaitVBL BEFORE calling these
=============================================================================
*/
/*
=================
=
= VL_FillPalette
=
=================
*/
void VL_FillPalette(int red, int green, int blue)
{
}
//===========================================================================
/* /*
================= =================
= =
...@@ -133,8 +93,6 @@ void VL_SetPalette(const byte *palette) ...@@ -133,8 +93,6 @@ void VL_SetPalette(const byte *palette)
{ {
} }
//===========================================================================
/* /*
================= =================
= =
...@@ -147,102 +105,6 @@ void VL_GetPalette(byte *palette) ...@@ -147,102 +105,6 @@ void VL_GetPalette(byte *palette)
{ {
} }
/*
=============================================================================
PIXEL OPS
=============================================================================
*/
/*
=================
=
= VL_Plot
=
=================
*/
void VL_Plot(int x, int y, int color)
{
*(gfxbuf + 320 * y + x) = color;
}
/*
=================
=
= VL_Hlin
=
=================
*/
void VL_Hlin(unsigned x, unsigned y, unsigned width, unsigned color)
{
memset(gfxbuf + 320 * y + x, color, width);
}
/*
=================
=
= VL_Vlin
=
=================
*/
void VL_Vlin (int x, int y, int height, int color)
{
byte *ptr = gfxbuf + 320 * y + x;
while (height--) {
*ptr = color;
ptr += 320;
}
}
/*
=================
=
= VL_Bar
=
=================
*/
void VL_Bar(int x, int y, int width, int height, int color)
{
byte *ptr = gfxbuf + 320 * y + x;
while (height--) {
memset(ptr, color, width);
ptr += 320;
}
}
/*
============================================================================
MEMORY OPS
============================================================================
*/
/*
=================
=
= VL_MemToScreen
=
= Draws a block of data to the screen.
=
=================
*/
void VL_MemToScreen(const byte *source, int width, int height, int x, int y)
{
byte *ptr = gfxbuf + 320 * y + x;
while(height--) {
memcpy(ptr, source, width);
source += width;
ptr += 320;
}
}
void VL_DirectPlot(int x1, int y1, int x2, int y2) void VL_DirectPlot(int x1, int y1, int x2, int y2)
{ {
} }
......
/* id_vl.c */
#include "wl_def.h" #include "wl_def.h"
#include "SDL.h" #include "SDL.h"
...@@ -17,6 +15,9 @@ SDL_Surface *surface; ...@@ -17,6 +15,9 @@ SDL_Surface *surface;
int main (int argc, char *argv[]) int main (int argc, char *argv[])
{ {
vwidth = 320;
vheight = 200;
return WolfMain(argc, argv); return WolfMain(argc, argv);
} }
...@@ -38,8 +39,6 @@ void Quit(char *error) ...@@ -38,8 +39,6 @@ void Quit(char *error)
ShutdownId(); ShutdownId();
if (screen) { if (screen) {
printf("TODO: spiffy ansi screen goes here..\n");
/* doesn't look too good on console at the moment ...*/
//DisplayTextSplash(screen); //DisplayTextSplash(screen);
} }
...@@ -59,8 +58,8 @@ void VL_WaitVBL(int vbls) ...@@ -59,8 +58,8 @@ void VL_WaitVBL(int vbls)
void VW_UpdateScreen() void VW_UpdateScreen()
{ {
//VL_WaitVBL(1); //VL_WaitVBL(1);
memcpy(surface->pixels, gfxbuf, 64000); memcpy(surface->pixels, gfxbuf, vwidth*vheight);
SDL_UpdateRect(surface,0,0,0,0); SDL_UpdateRect(surface, 0, 0, 0, 0);
} }
/* /*
...@@ -74,19 +73,18 @@ void VW_UpdateScreen() ...@@ -74,19 +73,18 @@ void VW_UpdateScreen()
void VL_Startup() void VL_Startup()
{ {
if (gfxbuf == NULL) if (gfxbuf == NULL)
gfxbuf = malloc(320 * 200 * 1); gfxbuf = malloc(vwidth * vheight * 1);
if (SDL_Init (SDL_INIT_VIDEO) < 0) { if (SDL_Init(SDL_INIT_VIDEO) < 0) {
Quit("Couldn't init SDL"); Quit("Couldn't init SDL");
} }
if (MS_CheckParm("fullscreen")) if (MS_CheckParm("fullscreen"))
surface = SDL_SetVideoMode (320,200,8, SDL_SWSURFACE|SDL_HWPALETTE| SDL_FULLSCREEN); surface = SDL_SetVideoMode(vwidth, vheight, 8, SDL_SWSURFACE|SDL_HWPALETTE|SDL_FULLSCREEN);
else else
surface = SDL_SetVideoMode (320,200,8, SDL_SWSURFACE|SDL_HWPALETTE); surface = SDL_SetVideoMode(vwidth, vheight, 8, SDL_SWSURFACE|SDL_HWPALETTE);
if (surface == NULL) if (surface == NULL) {
{
SDL_Quit(); SDL_Quit();
Quit ("Couldn't set 320x200 mode"); Quit ("Couldn't set 320x200 mode");
} }
...@@ -115,56 +113,6 @@ void VL_Shutdown() ...@@ -115,56 +113,6 @@ void VL_Shutdown()
//=========================================================================== //===========================================================================
/*
=================
=
= VL_ClearVideo
=
= Fill the entire video buffer with a given color
=
=================
*/
void VL_ClearVideo(byte color)
{
memset(gfxbuf, color, 64000);
}
/*
=============================================================================
PALETTE OPS
To avoid snow, do a WaitVBL BEFORE calling these
=============================================================================
*/
/*
=================
=
= VL_FillPalette
=
=================
*/
void VL_FillPalette(int red, int green, int blue)
{
SDL_Color colors[256];
int i;
for (i = 0; i < 256; i++)
{
colors[i].r = red << 2;
colors[i].g = green << 2;
colors[i].b = blue << 2;
}
SDL_SetColors (surface, colors, 0, 256);
}
//===========================================================================
/* /*
================= =================
= =
...@@ -184,7 +132,7 @@ void VL_SetPalette(const byte *palette) ...@@ -184,7 +132,7 @@ void VL_SetPalette(const byte *palette)
colors[i].g = palette[i*3+1] << 2; colors[i].g = palette[i*3+1] << 2;
colors[i].b = palette[i*3+2] << 2; colors[i].b = palette[i*3+2] << 2;
} }
SDL_SetColors (surface, colors, 0, 256); SDL_SetColors(surface, colors, 0, 256);
} }
...@@ -209,105 +157,9 @@ void VL_GetPalette(byte *palette) ...@@ -209,105 +157,9 @@ void VL_GetPalette(byte *palette)
} }
} }
/*
=============================================================================
PIXEL OPS
=============================================================================
*/
/*
=================
=
= VL_Plot
=
=================
*/
void VL_Plot(int x, int y, int color)
{
*(gfxbuf + 320 * y + x) = color;
}
/*
=================
=
= VL_Hlin
=
=================
*/
void VL_Hlin(unsigned x, unsigned y, unsigned width, unsigned color)
{
memset(gfxbuf + 320 * y + x, color, width);
}
/*
=================
=
= VL_Vlin
=
=================
*/
void VL_Vlin (int x, int y, int height, int color)
{
byte *ptr = gfxbuf + 320 * y + x;
while (height--) {
*ptr = color;
ptr += 320;
}
}
/*
=================
=
= VL_Bar
=
=================
*/
void VL_Bar(int x, int y, int width, int height, int color)
{
byte *ptr = gfxbuf + 320 * y + x;
while (height--) {
memset(ptr, color, width);
ptr += 320;
}
}
/*
============================================================================
MEMORY OPS
============================================================================
*/
/*
=================
=
= VL_MemToScreen
=
= Draws a block of data to the screen.
=
=================
*/
void VL_MemToScreen(const byte *source, int width, int height, int x, int y)
{
byte *ptr = gfxbuf + 320 * y + x;
while(height--) {
memcpy(ptr, source, width);
source += width;
ptr += 320;
}
}
void VL_DirectPlot(int x1, int y1, int x2, int y2) void VL_DirectPlot(int x1, int y1, int x2, int y2)
{ {
*(((Uint8 *)surface->pixels) + x1 + y1 * 320) = *(gfxbuf + x2 + y2 * 320); *(((Uint8 *)surface->pixels) + x1 + y1 * vwidth) = *(gfxbuf + x2 + y2 * vwidth);
//SDL_UpdateRect(surface, x1,y1,x1,y1); //SDL_UpdateRect(surface, x1,y1,x1,y1);
} }
...@@ -875,7 +727,7 @@ boolean IN_UserInput(longword delay) ...@@ -875,7 +727,7 @@ boolean IN_UserInput(longword delay)
=================== ===================
*/ */
byte IN_MouseButtons (void) byte IN_MouseButtons()
{ {
return 0; return 0;
} }
...@@ -888,7 +740,7 @@ byte IN_MouseButtons (void) ...@@ -888,7 +740,7 @@ byte IN_MouseButtons (void)
=================== ===================
*/ */
byte IN_JoyButtons (void) byte IN_JoyButtons()
{ {
return 0; return 0;
} }
...@@ -102,39 +102,6 @@ void VL_Shutdown() ...@@ -102,39 +102,6 @@ void VL_Shutdown()
//=========================================================================== //===========================================================================
/*
=================
=
= VL_ClearVideo
=
= Fill the entire video buffer with a given color
=
=================
*/
void VL_ClearVideo(byte color)
{
memset(gfxbuf, color, 64000);
}
/*
=================
=
= VL_FillPalette
=
=================
*/
void VL_FillPalette(int red, int green, int blue)
{
int i;
for (i = 0; i < 256; i++)
vga_setpalette(i, red, green, blue);
}
//===========================================================================
/* /*
================= =================
= =
...@@ -151,9 +118,6 @@ void VL_SetPalette(const byte *palette) ...@@ -151,9 +118,6 @@ void VL_SetPalette(const byte *palette)
vga_setpalette(i, palette[i*3+0], palette[i*3+1], palette[i*3+2]); vga_setpalette(i, palette[i*3+0], palette[i*3+1], palette[i*3+2]);
} }
//===========================================================================
/* /*
================= =================
= =
...@@ -174,102 +138,6 @@ void VL_GetPalette(byte *palette) ...@@ -174,102 +138,6 @@ void VL_GetPalette(byte *palette)
} }
} }
/*
=============================================================================
PIXEL OPS
=============================================================================
*/
/*
=================
=
= VL_Plot
=
=================
*/
void VL_Plot(int x, int y, int color)
{
*(gfxbuf + 320 * y + x) = color;
}
/*
=================
=
= VL_Hlin
=
=================
*/
void VL_Hlin(unsigned x, unsigned y, unsigned width, unsigned color)
{
memset(gfxbuf + 320 * y + x, color, width);
}
/*
=================
=
= VL_Vlin
=
=================
*/
void VL_Vlin (int x, int y, int height, int color)
{
byte *ptr = gfxbuf + 320 * y + x;
while (height--) {
*ptr = color;
ptr += 320;
}
}
/*
=================
=
= VL_Bar
=
=================
*/
void VL_Bar(int x, int y, int width, int height, int color)
{
byte *ptr = gfxbuf + 320 * y + x;
while (height--) {
memset(ptr, color, width);
ptr += 320;
}
}
/*
============================================================================
MEMORY OPS
============================================================================
*/
/*
=================
=
= VL_MemToScreen
=
= Draws a block of data to the screen.
=
=================
*/
void VL_MemToScreen(const byte *source, int width, int height, int x, int y)
{
byte *ptr = gfxbuf + 320 * y + x;
while(height--) {
memcpy(ptr, source, width);
source += width;
ptr += 320;
}
}
void VL_DirectPlot(int x1, int y1, int x2, int y2) void VL_DirectPlot(int x1, int y1, int x2, int y2)
{ {
*(graph_mem + x1 + y1 * 320) = *(gfxbuf + x2 + y2 * 320); *(graph_mem + x1 + y1 * 320) = *(gfxbuf + x2 + y2 * 320);
...@@ -772,12 +640,15 @@ byte IN_MouseButtons (void) ...@@ -772,12 +640,15 @@ byte IN_MouseButtons (void)
=================== ===================
*/ */
byte IN_JoyButtons (void) byte IN_JoyButtons()
{ {
return 0; return 0;
} }
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
vwidth = 320;
vheight = 200;
return WolfMain(argc, argv); return WolfMain(argc, argv);
} }
...@@ -107,7 +107,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine ...@@ -107,7 +107,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
win = hwnd; win = hwnd;
return WolfMain(0, NULL); /* TODO ... need to do something for silly windows */ return WolfMain(0, NULL); /* TODO ... need to parse commandline */
} }
/* /*
...@@ -356,52 +356,6 @@ void VL_Shutdown (void) ...@@ -356,52 +356,6 @@ void VL_Shutdown (void)
//=========================================================================== //===========================================================================
/*
=================
=
= VL_ClearVideo
=
= Fill the entire video buffer with a given color
=
=================
*/
void VL_ClearVideo(byte color)
{
memset(gfxbuf, color, 64000);
}
/*
=============================================================================
PALETTE OPS
To avoid snow, do a WaitVBL BEFORE calling these
=============================================================================
*/
/*
=================
=
= VL_FillPalette
=
=================
*/
void VL_FillPalette(int red, int green, int blue)
{
int i;
for (i = 0; i < 256; i++) {
mypal[i*3+0] = red;
mypal[i*3+1] = green;
mypal[i*3+2] = blue;
}
}
//===========================================================================
/* /*
================= =================
= =
...@@ -416,9 +370,6 @@ void VL_SetPalette(const byte *palette) ...@@ -416,9 +370,6 @@ void VL_SetPalette(const byte *palette)
VW_UpdateScreen(); VW_UpdateScreen();
} }
//===========================================================================
/* /*
================= =================
= =
...@@ -432,102 +383,6 @@ void VL_GetPalette(byte *palette) ...@@ -432,102 +383,6 @@ void VL_GetPalette(byte *palette)
memcpy(palette, mypal, 768); memcpy(palette, mypal, 768);
} }
/*
=============================================================================
PIXEL OPS
=============================================================================
*/
/*
=================
=
= VL_Plot
=
=================
*/
void VL_Plot(int x, int y, int color)
{
*(gfxbuf + 320 * y + x) = color;
}
/*
=================
=
= VL_Hlin
=
=================
*/
void VL_Hlin(unsigned x, unsigned y, unsigned width, unsigned color)
{
memset(gfxbuf + 320 * y + x, color, width);
}
/*
=================
=
= VL_Vlin
=
=================
*/
void VL_Vlin (int x, int y, int height, int color)
{
byte *ptr = gfxbuf + 320 * y + x;
while (height--) {
*ptr = color;
ptr += 320;
}
}
/*
=================
=
= VL_Bar
=
=================
*/
void VL_Bar(int x, int y, int width, int height, int color)
{
byte *ptr = gfxbuf + 320 * y + x;
while (height--) {
memset(ptr, color, width);
ptr += 320;
}
}
/*
============================================================================
MEMORY OPS
============================================================================
*/
/*
=================
=
= VL_MemToScreen
=
= Draws a block of data to the screen.
=
=================
*/
void VL_MemToScreen(const byte *source, int width, int height, int x, int y)
{
byte *ptr = gfxbuf + 320 * y + x;
while(height--) {
memcpy(ptr, source, width);
source += width;
ptr += 320;
}
}
void VL_DirectPlot(int x1, int y1, int x2, int y2) void VL_DirectPlot(int x1, int y1, int x2, int y2)
{ {
......
This diff is collapsed.
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#include "wl_menu.h" #include "wl_menu.h"
#include "foreign.h" #include "foreign.h"
extern int vwidth, vheight; /* size of screen */
/* /*
============================================================================= =============================================================================
...@@ -55,9 +57,7 @@ ...@@ -55,9 +57,7 @@
#define MINDIST (0x5800l) #define MINDIST (0x5800l)
#define MAXSCALEHEIGHT 512 /* largest scale on largest view */ #define MAXVIEWWIDTH 1280
#define MAXVIEWWIDTH 320
#define MAPSIZE 64 // maps are 64*64 max #define MAPSIZE 64 // maps are 64*64 max
...@@ -676,14 +676,16 @@ extern char str[80], str2[20]; ...@@ -676,14 +676,16 @@ extern char str[80], str2[20];
extern fixed focallength; extern fixed focallength;
extern unsigned viewangles; extern unsigned viewangles;
extern int viewwidth;
extern int viewheight; extern int viewwidth, viewheight;
extern int viewwidthwin, viewheightwin;
extern int xoffset, yoffset;
extern int centerx; extern int centerx;
extern int shootdelta; extern int shootdelta;
extern boolean startgame,loadedgame; extern boolean startgame,loadedgame;
extern int mouseadjustment; extern int mouseadjustment;
extern unsigned xoffset, yoffset;
// //
// math tables // math tables
...@@ -695,7 +697,6 @@ extern fixed sintable[], *costable; ...@@ -695,7 +697,6 @@ extern fixed sintable[], *costable;
extern char configname[13]; extern char configname[13];
void CalcProjection (long focal); void CalcProjection (long focal);
boolean SetViewSize (unsigned width, unsigned height);
void NewGame (int difficulty,int episode); void NewGame (int difficulty,int episode);
void NewViewSize (int width); void NewViewSize (int width);
boolean LoadTheGame(int file,int x,int y); boolean LoadTheGame(int file,int x,int y);
...@@ -726,7 +727,6 @@ extern unsigned spearangle; ...@@ -726,7 +727,6 @@ extern unsigned spearangle;
extern boolean spearflag; extern boolean spearflag;
void DrawPlayBorder (void);
void ScanInfoPlane (void); void ScanInfoPlane (void);
void SetupGameLevel (void); void SetupGameLevel (void);
void DrawPlayScreen (void); void DrawPlayScreen (void);
...@@ -735,10 +735,10 @@ void GameLoop (void); ...@@ -735,10 +735,10 @@ void GameLoop (void);
void ClearMemory (void); void ClearMemory (void);
void PlayDemo(int demonumber); void PlayDemo(int demonumber);
int PlayDemoFromFile(char *demoname); int PlayDemoFromFile(char *demoname);
void RecordDemo (void); void RecordDemo();
void DrawPlayBorder (void); void DrawHighScores();
void DrawHighScores(void); void DrawPlayBorder();
void DrawPlayBorderSides (void); void DrawPlayBorderSides();
#define PlaySoundLocTile(s,tx,ty) PlaySoundLocGlobal(s,(((long)(tx) << TILESHIFT) + (1L << (TILESHIFT - 1))),(((long)ty << TILESHIFT) + (1L << (TILESHIFT - 1)))) #define PlaySoundLocTile(s,tx,ty) PlaySoundLocGlobal(s,(((long)(tx) << TILESHIFT) + (1L << (TILESHIFT - 1))),(((long)ty << TILESHIFT) + (1L << (TILESHIFT - 1))))
#define PlaySoundLocActor(s,ob) PlaySoundLocGlobal(s,(ob)->x,(ob)->y) #define PlaySoundLocActor(s,ob) PlaySoundLocGlobal(s,(ob)->x,(ob)->y)
...@@ -782,7 +782,7 @@ extern int buttonjoy[4]; ...@@ -782,7 +782,7 @@ extern int buttonjoy[4];
extern boolean buttonheld[NUMBUTTONS]; extern boolean buttonheld[NUMBUTTONS];
extern int viewsize; extern int viewsize;
// //
// curent user input // curent user input
......
...@@ -522,7 +522,7 @@ static void DrawSpans(int x1, int x2, int height) ...@@ -522,7 +522,7 @@ static void DrawSpans(int x1, int x2, int height)
fixed startxfrac, startyfrac; fixed startxfrac, startyfrac;
byte *toprow; byte *toprow;
toprow = planeylookup[height]+(320*yoffset+xoffset); toprow = planeylookup[height]+(vwidth*yoffset+xoffset);
mr_rowofs = mirrorofs[height]; mr_rowofs = mirrorofs[height];
mr_xstep = (viewsin / height) >> 1; mr_xstep = (viewsin / height) >> 1;
...@@ -562,8 +562,8 @@ static void SetPlaneViewSize() ...@@ -562,8 +562,8 @@ static void SetPlaneViewSize()
halfheight = viewheight >> 1; halfheight = viewheight >> 1;
for (y = 0; y < halfheight; y++) { for (y = 0; y < halfheight; y++) {
planeylookup[y] = gfxbuf + (halfheight-1-y)*320; planeylookup[y] = gfxbuf + (halfheight-1-y)*vwidth;
mirrorofs[y] = (y*2+1)*320; mirrorofs[y] = (y*2+1)*vwidth;
if (y > 0) if (y > 0)
basedist[y] = GLOBAL1/2*scale/y; basedist[y] = GLOBAL1/2*scale/y;
...@@ -684,21 +684,21 @@ void ThreeDRefresh() ...@@ -684,21 +684,21 @@ void ThreeDRefresh()
/* ======================================================================== */ /* ======================================================================== */
/* TODO: this accesses gfxbuf directly! */ #if 0
static void ScaledDraw(byte *gfx, int scale, byte *vid, unsigned long tfrac, unsigned long tint, unsigned long delta) static void ScaledDraw(byte *gfx, int scale, byte *vid, unsigned long tfrac, unsigned long tint, unsigned long delta)
{ {
unsigned long OldDelta; unsigned long OldDelta;
while (scale--) { while (scale--) {
*vid = *gfx; *vid = *gfx;
vid += 320; /* TODO: compiled in constant! */ vid += vwidth;
OldDelta = delta; OldDelta = delta;
delta += tfrac; delta += tfrac;
gfx += tint; gfx += tint;
if (OldDelta > delta) if (OldDelta > delta)
gfx += 1; gfx += 1;
} }
} }
static void ScaledDrawTrans(byte *gfx, int scale, byte *vid, unsigned long tfrac, unsigned long tint, unsigned long delta) static void ScaledDrawTrans(byte *gfx, int scale, byte *vid, unsigned long tfrac, unsigned long tint, unsigned long delta)
...@@ -708,7 +708,7 @@ static void ScaledDrawTrans(byte *gfx, int scale, byte *vid, unsigned long tfrac ...@@ -708,7 +708,7 @@ static void ScaledDrawTrans(byte *gfx, int scale, byte *vid, unsigned long tfrac
while (scale--) { while (scale--) {
if (*gfx != 255) if (*gfx != 255)
*vid = *gfx; *vid = *gfx;
vid += 320; /* TODO: compiled in constant! */ vid += vwidth;
OldDelta = delta; OldDelta = delta;
delta += tfrac; delta += tfrac;
gfx += tint; gfx += tint;
...@@ -718,7 +718,7 @@ static void ScaledDrawTrans(byte *gfx, int scale, byte *vid, unsigned long tfrac ...@@ -718,7 +718,7 @@ static void ScaledDrawTrans(byte *gfx, int scale, byte *vid, unsigned long tfrac
} }
} }
void ScaleLine(unsigned int height, byte *source, int x) static void ScaleLine(unsigned int height, byte *source, int x)
{ {
unsigned long TheFrac; unsigned long TheFrac;
unsigned long TheInt; unsigned long TheInt;
...@@ -732,7 +732,7 @@ void ScaleLine(unsigned int height, byte *source, int x) ...@@ -732,7 +732,7 @@ void ScaleLine(unsigned int height, byte *source, int x)
TheInt = TheFrac >> 24; TheInt = TheFrac >> 24;
TheFrac <<= 8; TheFrac <<= 8;
ScaledDraw(source, height, gfxbuf + (y * 320) + x + xoffset, ScaledDraw(source, height, gfxbuf + (y * vwidth) + x + xoffset,
TheFrac, TheInt, 0); TheFrac, TheInt, 0);
return; return;
...@@ -744,7 +744,7 @@ void ScaleLine(unsigned int height, byte *source, int x) ...@@ -744,7 +744,7 @@ void ScaleLine(unsigned int height, byte *source, int x)
TheInt = TheFrac >> 24; TheInt = TheFrac >> 24;
TheFrac <<= 8; TheFrac <<= 8;
ScaledDraw(&source[y >> 24], viewheight, gfxbuf + (yoffset * 320) + x + xoffset, ScaledDraw(&source[y >> 24], viewheight, gfxbuf + (yoffset * vwidth) + x + xoffset,
TheFrac, TheInt, y << 8); TheFrac, TheInt, y << 8);
} }
} }
...@@ -756,14 +756,14 @@ static void ScaleLineTrans(unsigned int height, byte *source, int x) ...@@ -756,14 +756,14 @@ static void ScaleLineTrans(unsigned int height, byte *source, int x)
unsigned long y; unsigned long y;
if (height) { if (height) {
TheFrac = 0x40000000UL / height; TheFrac = (64 << 16) / height;
if (height < viewheight) { if (height < viewheight) {
y = yoffset + (viewheight - height) / 2; y = yoffset + (viewheight - height) / 2;
TheInt = TheFrac >> 24; TheInt = TheFrac >> 24;
TheFrac <<= 8; TheFrac <<= 8;
ScaledDrawTrans(source, height, gfxbuf + (y * 320) + x + xoffset, ScaledDrawTrans(source, height, gfxbuf + (y * vwidth) + x + xoffset,
TheFrac, TheInt, 0); TheFrac, TheInt, 0);
return; return;
...@@ -775,10 +775,80 @@ static void ScaleLineTrans(unsigned int height, byte *source, int x) ...@@ -775,10 +775,80 @@ static void ScaleLineTrans(unsigned int height, byte *source, int x)
TheInt = TheFrac >> 24; TheInt = TheFrac >> 24;
TheFrac <<= 8; TheFrac <<= 8;
ScaledDrawTrans(&source[y >> 24], viewheight, gfxbuf + (yoffset * 320) + x + xoffset, ScaledDrawTrans(&source[y >> 24], viewheight, gfxbuf + (yoffset * vwidth) + x + xoffset,
TheFrac, TheInt, y << 8); TheFrac, TheInt, y << 8);
} }
} }
#endif
static void ScaledDraw(byte *gfx, int count, byte *vid, unsigned int frac, unsigned int delta)
{
while (count--) {
*vid = gfx[frac >> 16];
vid += vwidth;
frac += delta;
}
}
static void ScaledDrawTrans(byte *gfx, int scale, byte *vid, unsigned int frac, unsigned int delta)
{
while (scale--) {
if (gfx[frac >> 16] != 255)
*vid = gfx[frac >> 16];
vid += vwidth;
frac += delta;
}
}
static void ScaleLine(unsigned int height, byte *source, int x)
{
unsigned long TheFrac;
unsigned long y;
if (height) {
TheFrac = (64 << 16) / height;
if (height < viewheight) {
y = yoffset + (viewheight - height) / 2;
ScaledDraw(source, height, gfxbuf + (y * vwidth) + x + xoffset,
0, TheFrac);
return;
}
y = (height - viewheight) / 2;
y *= TheFrac;
ScaledDraw(source, viewheight, gfxbuf + (yoffset * vwidth) + x + xoffset,
y, TheFrac);
}
}
static void ScaleLineTrans(unsigned int height, byte *source, int x)
{
unsigned long TheFrac;
unsigned long y;
if (height) {
TheFrac = 0x00400000UL / height;
if (height < viewheight) {
y = yoffset + (viewheight - height) / 2;
ScaledDrawTrans(source, height, gfxbuf + (y * vwidth) + x + xoffset,
0, TheFrac);
return;
}
y = (height - viewheight) / 2;
y *= TheFrac;
ScaledDrawTrans(&source[y >> 24], viewheight, gfxbuf + (yoffset * vwidth) + x + xoffset,
y, TheFrac);
}
}
static unsigned char *spritegfx[SPR_TOTAL]; static unsigned char *spritegfx[SPR_TOTAL];
......
...@@ -589,18 +589,18 @@ void SetupGameLevel() ...@@ -589,18 +589,18 @@ void SetupGameLevel()
void DrawPlayBorderSides() void DrawPlayBorderSides()
{ {
int xl, yl; int xl, yl;
xl = 160-viewwidth/2; xl = 160-viewwidthwin/2;
yl = (200-STATUSLINES-viewheight)/2; yl = (200-STATUSLINES-viewheightwin)/2;
if (xl == 0) { if (xl == 0) {
return; return;
} else { } else {
VW_Bar(0,0,xl-1,200-STATUSLINES,127); VW_Bar(0,0,xl-1,200-STATUSLINES,127);
VW_Bar(xl+viewwidth+1,0,xl-2,200-STATUSLINES,127); VW_Bar(xl+viewwidthwin+1,0,xl-2,200-STATUSLINES,127);
VW_Vlin(yl-1,yl+viewheight,xl-1,0); VW_Vlin(yl-1,yl+viewheightwin,xl-1,0);
VW_Vlin(yl-1,yl+viewheight,xl+viewwidth,125); VW_Vlin(yl-1,yl+viewheightwin,xl+viewwidthwin,125);
} }
} }
...@@ -618,18 +618,18 @@ void DrawPlayBorder() ...@@ -618,18 +618,18 @@ void DrawPlayBorder()
VW_Bar(0,0,320,200-STATUSLINES+1,127); VW_Bar(0,0,320,200-STATUSLINES+1,127);
xl = 160-viewwidth/2; xl = 160-viewwidthwin/2;
yl = (200-STATUSLINES-viewheight)/2; yl = (200-STATUSLINES-viewheightwin)/2;
VW_Bar(xl,yl,viewwidth,viewheight+1,0); VW_Bar(xl,yl,viewwidthwin,viewheightwin+1,0);
if (xl == 0) { if (xl == 0) {
VW_Hlin(0,viewwidth-1,viewheight,125); VW_Hlin(0,viewwidthwin-1,viewheightwin,125);
} else { } else {
VW_Hlin(xl-1,xl+viewwidth,yl-1,0); VW_Hlin(xl-1,xl+viewwidthwin,yl-1,0);
VW_Hlin(xl-1,xl+viewwidth,yl+viewheight,125); VW_Hlin(xl-1,xl+viewwidthwin,yl+viewheightwin,125);
VW_Vlin(yl-1,yl+viewheight,xl-1,0); VW_Vlin(yl-1,yl+viewheightwin,xl-1,0);
VW_Vlin(yl-1,yl+viewheight,xl+viewwidth,125); VW_Vlin(yl-1,yl+viewheightwin,xl+viewwidthwin,125);
VW_Plot(xl-1,yl+viewheight,124); VW_Plot(xl-1,yl+viewheightwin,124);
} }
} }
......
This diff is collapsed.
...@@ -2417,24 +2417,21 @@ void DrawCustKeys(int hilight) ...@@ -2417,24 +2417,21 @@ void DrawCustKeys(int hilight)
// CHANGE SCREEN VIEWING SIZE // CHANGE SCREEN VIEWING SIZE
// //
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void CP_ChangeView(void) void CP_ChangeView()
{ {
int exit=0,oldview,newview; int exit = 0, oldview, newview;
ControlInfo ci; ControlInfo ci;
WindowX=WindowY=0; WindowX=WindowY=0;
WindowW=320; WindowW=320;
WindowH=200; WindowH=200;
newview=oldview=viewwidth/16; newview=oldview=viewsize;
DrawChangeView(oldview); DrawChangeView(oldview);
do do {
{
CheckPause(); CheckPause();
ReadAnyControl(&ci); ReadAnyControl(&ci);
switch(ci.dir) switch(ci.dir) {
{
case dir_South: case dir_South:
case dir_West: case dir_West:
newview--; newview--;
...@@ -2464,20 +2461,16 @@ void CP_ChangeView(void) ...@@ -2464,20 +2461,16 @@ void CP_ChangeView(void)
PicturePause(); PicturePause();
if (ci.button0 || IN_KeyDown(sc_Enter)) if (ci.button0 || IN_KeyDown(sc_Enter))
exit=1; exit = 1;
else if (ci.button1 || IN_KeyDown(sc_Escape)) { else if (ci.button1 || IN_KeyDown(sc_Escape)) {
viewwidth=oldview*16;
SD_PlaySound(ESCPRESSEDSND); SD_PlaySound(ESCPRESSEDSND);
MenuFadeOut(); MenuFadeOut();
return; return;
} }
} while(!exit); } while(!exit);
if (oldview != newview) {
if (oldview!=newview) SD_PlaySound(SHOOTSND);
{
SD_PlaySound (SHOOTSND);
Message(STR_THINK"..."); Message(STR_THINK"...");
NewViewSize(newview); NewViewSize(newview);
} }
......
...@@ -38,8 +38,6 @@ int buttonscan[NUMBUTTONS] = ...@@ -38,8 +38,6 @@ int buttonscan[NUMBUTTONS] =
int buttonmouse[4]={bt_attack,bt_strafe,bt_use,bt_nobutton}; int buttonmouse[4]={bt_attack,bt_strafe,bt_use,bt_nobutton};
int buttonjoy[4]={bt_attack,bt_strafe,bt_use,bt_run}; int buttonjoy[4]={bt_attack,bt_strafe,bt_use,bt_run};
int viewsize;
boolean buttonheld[NUMBUTTONS]; boolean buttonheld[NUMBUTTONS];
boolean demorecord,demoplayback; boolean demorecord,demoplayback;
......
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