Commit f731c88d authored by Steven Fuller's avatar Steven Fuller

Removed more unused code.

vi_null.c: Added stub version of video/input code
parent 81ab1d53
......@@ -39,6 +39,7 @@ savegames until they are fixed to not use pointers
* menu code is a mess, always does things differently than the rest of the
code, it really needs to be cleaned up
* id_ca.c cache code: fix/readd/rewrite the "garbage collection" system?
* rewrite id_ca.c: uniform memory handling system
* clean up header files, especially wl_def.h, where some declarations aren't
in the right place
* every structure that is read/written must be PACKED, with datatypes
......@@ -69,9 +70,6 @@ function with same parameters, only difference is the name)
* 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
update once per frame or such...
and where is that stray pixel coming from (during fizzlefade with largest
window size, for example) in svgalib -- is that another bug with my geforce?
no idea how to do fizzlefade in TrueColor X
* check filehandling (ex, file missing, bad file type, and such)
PlayDemoFromFile specifically
* make sure all infinite loops are found (looping around Keyboard)
......@@ -81,8 +79,7 @@ same with the spear of destiny animation part of ending
* move all references to gfxbuf to vi_* only (gl will need this anyway,
since it would replace id_vh, (parts of) wl_draw, wl_scale)
by putting in code from id_vh (either by using Plot or just copying it in)
we can stop the large conversion before each UpdateScreen
but palette fades will still need it!
we can mostly stop the large conversion before each UpdateScreen
* 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
screen update
......
This diff is collapsed.
......@@ -6,8 +6,6 @@
#define NUMMAPS 60
#define MAPPLANES 2
//===========================================================================
typedef struct
{
long planestart[3];
......@@ -16,7 +14,7 @@ typedef struct
char name[16];
} PACKED maptype;
//===========================================================================
/* ======================================================================== */
extern int mapon;
......@@ -33,7 +31,7 @@ extern char extension[5],
aheadname[10],
afilename[10];
//===========================================================================
/* ======================================================================== */
boolean CA_FarRead(int handle, byte *dest, long length);
boolean CA_FarWrite(int handle, byte *source, long length);
......@@ -55,14 +53,6 @@ void CA_UnCacheGrChunk(int chunk);
void CA_UpLevel();
void CA_DownLevel();
/*
void CA_ClearMarks();
void CA_ClearAllMarks();
#define CA_MarkGrChunk(chunk) grneeded[chunk]|=ca_levelbit
void CA_CacheMarks();
*/
void CA_CacheScreen(int chunk);
......@@ -84,23 +74,19 @@ typedef struct {
longword offset; // Offset of chunk into file
word length; // Length of the chunk
memptr addr;
longword lastHit; // Last frame number of hit
} PageListStruct;
extern word ChunksInFile, PMSpriteStart, PMSoundStart;
extern word ChunksInFile, PMSpriteStart, PMSoundStart;
extern PageListStruct *PMPages;
extern PageListStruct *PMPages;
#define PM_GetSoundPage(v) PM_GetPage(PMSoundStart + (v))
#define PM_GetSpritePage(v) PM_GetPage(PMSpriteStart + (v))
void PM_Startup(void),
PM_Shutdown(void),
PM_Reset(void),
PM_Preload(boolean (*update)(word current,word total)),
PM_NextFrame(void),
PM_SetMainPurge(int level);
void PM_Startup();
void PM_Shutdown();
void PM_Preload(boolean (*update)(word current,word total));
memptr PM_GetPageAddress(int pagenum), PM_GetPage(int pagenum);
memptr PM_GetPage(int pagenum);
#endif
......@@ -37,12 +37,10 @@ typedef bool boolean;
#define PACKED __attribute__((packed))
#define LONGLONG long long
#define O_BINARY 0
#ifdef __cplusplus
typedef bool boolean;
#else
typedef enum {false,true} boolean;
typedef enum { false, true } boolean;
#endif
#endif
......@@ -58,6 +56,10 @@ typedef enum {false,true} boolean;
#include <sys/types.h>
#include <math.h>
#ifndef O_BINARY
#define O_BINARY 0
#endif
#include "misc.h"
#include "version.h"
......@@ -87,9 +89,9 @@ typedef enum {false,true} boolean;
/* ---------------- */
typedef unsigned char byte;
typedef unsigned short int word;
typedef unsigned long longword;
typedef unsigned char byte;
typedef unsigned short int word;
typedef unsigned long longword;
typedef long fixed;
typedef void * memptr;
......@@ -118,13 +120,13 @@ void Quit(char *error);
#undef PI
#define PI 3.141592657
#define MAXTICS 10
#define DEMOTICS 4
#define MAXTICS 10
#define DEMOTICS 4
extern unsigned mapwidth,mapheight,tics;
extern unsigned mapwidth, mapheight, tics;
extern byte fontcolor,backcolor;
extern byte fontcolor, backcolor;
#define SETFONTCOLOR(f,b) fontcolor=f;backcolor=b;
#define SETFONTCOLOR(f, b) { fontcolor = f; backcolor = b; }
#endif
This diff is collapsed.
......@@ -10,8 +10,8 @@
=============================================================================
*/
#define MOVESCALE 150l
#define BACKMOVESCALE 100l
#define MOVESCALE 150
#define BACKMOVESCALE 100
#define ANGLESCALE 20
/*
......@@ -43,17 +43,16 @@ objtype *LastAttacker;
*/
void T_Player (objtype *ob);
void T_Attack (objtype *ob);
void T_Player(objtype *ob);
void T_Attack(objtype *ob);
statetype s_player = {false,0,0,T_Player,NULL,NULL};
statetype s_attack = {false,0,0,T_Attack,NULL,NULL};
struct atkinf
{
char tics,attack,frame; // attack is 1 for gun, 2 for knife
char tics, attack, frame; // attack is 1 for gun, 2 for knife
} static attackinfo[4][14] =
{
{ {6,0,1},{6,2,2},{6,0,3},{6,-1,4} },
{ {6,0,1},{6,1,2},{6,0,3},{6,-1,4} },
......@@ -217,25 +216,22 @@ void StatusDrawPic(unsigned x, unsigned y, unsigned picnum)
==================
*/
void DrawFace (void)
void DrawFace()
{
if (gamestate.health)
{
if (gamestate.health) {
#ifdef SPEAR
if (godmode)
StatusDrawPic (17,4,GODMODEFACE1PIC+gamestate.faceframe);
StatusDrawPic(17,4,GODMODEFACE1PIC+gamestate.faceframe);
else
#endif
StatusDrawPic (17,4,FACE1APIC+3*((100-gamestate.health)/16)+gamestate.faceframe);
}
else
{
} else {
#ifndef SPEAR
if (LastAttacker->obclass == needleobj)
StatusDrawPic (17,4,MUTANTBJPIC);
else
if (LastAttacker->obclass == needleobj)
StatusDrawPic(17,4,MUTANTBJPIC);
else
#endif
StatusDrawPic (17,4,FACE8APIC);
StatusDrawPic (17,4,FACE8APIC);
}
}
......@@ -334,7 +330,7 @@ void DrawHealth (void)
===============
*/
void TakeDamage (int points,objtype *attacker)
void TakeDamage(int points, objtype *attacker)
{
LastAttacker = attacker;
......
......@@ -546,13 +546,6 @@ void CacheLayoutGraphics (void)
numpages++;
if (ch == 'E') // end of file, so load graphics and return
{
/*
CA_MarkGrChunk(H_TOPWINDOWPIC);
CA_MarkGrChunk(H_LEFTWINDOWPIC);
CA_MarkGrChunk(H_RIGHTWINDOWPIC);
CA_MarkGrChunk(H_BOTTOMINFOPIC);
CA_CacheMarks ();
*/
CA_CacheGrChunk(H_TOPWINDOWPIC);
CA_CacheGrChunk(H_LEFTWINDOWPIC);
CA_CacheGrChunk(H_RIGHTWINDOWPIC);
......@@ -564,13 +557,11 @@ void CacheLayoutGraphics (void)
if (ch == 'G') // draw graphic command, so mark graphics
{
ParsePicCommand ();
/* CA_MarkGrChunk (picnum); */
CA_CacheGrChunk(picnum);
}
if (ch == 'T') // timed draw graphic command, so mark graphics
{
ParseTimedCommand ();
/* CA_MarkGrChunk (picnum); */
CA_CacheGrChunk(picnum);
}
}
......@@ -599,7 +590,6 @@ void ShowArticle(char *article)
text = article;
oldfontnumber = fontnumber;
fontnumber = 0;
/* CA_MarkGrChunk(STARTFONT); */
CA_CacheGrChunk(STARTFONT);
VW_Bar (0,0,320,200,BACKCOLOR);
CacheLayoutGraphics ();
......
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