Commit 29eca737 authored by Steven Fuller's avatar Steven Fuller

Even more things made static.

Doc updates...

Even more small formatting changes.
parent 6fe38b42
......@@ -7,7 +7,7 @@
* A key to change viewsize while playing (note: max == 20, min == 5 or so...)
* Game able to cope at any virtual resolution in software mode. OpenGL
handles this transparently (after setting correct glViewport)
* Audio support using OpenAL (somewhat decently supported at the moment)
* Audio support using OpenAL
* Add support for the Mac version, if possible
* Network support!
* Fully compile with no warnings/errors using -Wall -ansi -pedantic and with
......
......@@ -4,3 +4,7 @@ Someone is actually reading the README...
http://rinkworks.com/apogee/s/2.4.5.shtml
http://www.3dportal.com/hideout/stuff/odd.html
http://www.maccentral.com/news/0001/24.wolf3d.shtml
-----
Steven Fuller
relnev@atdot.org
------------- Please Disregard the Following Outdated Text: ----------------
*
SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + chunk]);
=>
SD_StartMusic(chunk);
General:
* half of these things belong in IDEAS; they are not bugs, just random
musings
* inconsistancy:
id_ca.c has code for setting the data filenames' extension
so does wl_menu.c
* 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: nice idea but messy and maybe can be fixed
in an effort to not allocate everything to memory and forget about it
some sort of garbage collection
* id_ca.c cache code: fix/rewrite the "garbage collection" 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
specifically set! (ie, no int, but short or long int)
specifially set to correct size!
* or at least have PACKED versions of read/write structures, and transfer
to/from just for reading, so only not-packed structures are used during
actual gameplay/etc.
......@@ -22,23 +28,17 @@ actual gameplay/etc.
would be nice to show what version is loaded, but doom just printed text
and the intro screen which came with wolf3d has copyrighted/trademarked images
maybe make a new intro screen...
* then, what about PG13? OH NO!!!! -- people would probably want the first
two screens for nostalga
* fix the input code, everything is spread out... ideally everything should
work the same, let the input handler do it all instead
i think its safe for now to go with the scancodes as being the "universal"
key type, and for everything not scancode-based, have a function to
translate
* remove GOODTIMES?
* Consider removing the SOD manual check
* Remove the SOD manual check?
* perhaps rename UPLOAD
* TOO MANY #IFDEFs
* and upload builds with lots of wl6 code anyway (sound references were just
ifndefed out)
* verify if the sounds and graphics are correctly numbered, once again...
* add a ViewMap?
* remove the #else at the end of each header since nothing is being doubly
included now (if ever)
* add a ViewMap? (could be done similar to mac version)
* find and remove any function stubs (functions which just call another
function with same parameters, only difference is the name)
* fix wl_debug.c, lots of junk code..
......@@ -51,14 +51,10 @@ calling wait vbl when doing palette stuffs
* wl_menu uses specific scancodes for names, config file will have to use
metaname like sc_Left etc or something
* fizzlefade is hackish, stipple buf would work ok in opengl, maybe only
update once per frame or such.. hm
update once per frame or such...
and where is that stray pixel coming from (when using end game with largest
window size) in svgalib
window size) in svgalib -- is that another bug with my geforce?
no idea how to do fizzlefade in 16bit X
* change id_sd to sd_oss, sd_win, sd_dos, sd_oal, etc
idea is that different <outputs> can share some drivers, unlike video
although glx and x11 share a lot of code (i guess since gl will be a great
undertaking, better to keep them seperated)
* check filehandling (ex, file missing, bad file type, and such)
PlayDemoFromFile specifically
* make sure all infinite loops are found (looping around Keyboard)
......@@ -69,38 +65,28 @@ same with the spear of destiny animation part of ending
since it deprecates: 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! damnit
* what are special keys... ?
but palette fades will still need it!
* 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
* make sure none of the code tries to handle gfx/sound data directly
* GL_EXT_shared_texture_palette for opengl
* if window looses focus, should it clear the keys ?
* if window loses focus, should it clear the keys? most likely
* clean up vi_xlib.c: fix vid mode changing, fix dga for non8bit modes and
the nonpalette setting stuff... lots of if statements
* fix broken opengl.. argh wolf3d updates lots of stuff used in other parts
of the game (namely stuff used for hit testing when firing weapon) in the
draw loop.. start by cp wl_draw.c vi_ogl.c and just take out the actual
drawing bits and replace with opengl.
also, it should be able to compile without extensions
* rename visable to visible
* fix up windows port
* create 'sound channels' with priority.. ie a door can only make one sound
at a time
* beos is c++ (and uses gcc as a compiler i think) but wolf3d will need many
cleanups for c++
either that or use extern "C" { ... } in the header files
* beos is c++ but wolf3d will need many cleanups for c++ either that or use
extern "C" { ... } in the header files
* change wl_scale to use mac wolf3d's version of scaling
wall drawing is done, just needed to fix sprite code
* check in wolftools and add mac wolftools (currently the res dumping stuff)
* have vi_xlib.c compile without the extensions
* cat file.c | perl -e 'while($in = <STDIN>)
{$in =~ s/\/\/(.*)$/\/\* \1\ *\//gm;print $in;}'
or
cat foo.txt |sed -e "s/\/\/\(.*\)$/\/\*\1\*\//g"
* oal version locks up at end of level (hit switch but before the ratios)
the api is a bit unstable at the moment so wait for 1.0 of linux version to
be released before fixing it, although that lame sampling bug got fixed
Things to try:
* Any speed gain with comparing values in screen before writing?
......
......@@ -30,16 +30,16 @@ typedef struct
=============================================================================
*/
byte *tinf;
int mapon;
static byte *tinf;
int mapon;
word *mapsegs[MAPPLANES];
maptype *mapheaderseg[NUMMAPS];
byte *audiosegs[NUMSNDCHUNKS];
byte *grsegs[NUMCHUNKS];
maptype *mapheaderseg[NUMMAPS];
byte *audiosegs[NUMSNDCHUNKS];
byte *grsegs[NUMCHUNKS];
byte grneeded[NUMCHUNKS];
byte ca_levelbit,ca_levelnum;
static byte grneeded[NUMCHUNKS];
static byte ca_levelbit, ca_levelnum;
/*
=============================================================================
......@@ -56,21 +56,22 @@ char extension[5],
mheadname[10] = "maphead.",
gmapsname[10] = "gamemaps.",
aheadname[10] = "audiohed.",
afilename[10] = "audiot.";
afilename[10] = "audiot.",
pfilename[10] = "vswap.";
long *grstarts; /* array of offsets in vgagraph, -1 for sparse */
long *audiostarts; /* array of offsets in audio / audiot */
static long *grstarts; /* array of offsets in vgagraph, -1 for sparse */
static long *audiostarts; /* array of offsets in audio / audiot */
huffnode grhuffman[255];
static huffnode grhuffman[255];
int grhandle; /* handle to VGAGRAPH */
int maphandle; /* handle to MAPTEMP / GAMEMAPS */
int audiohandle; /* handle to AUDIOT / AUDIO */
static int grhandle; /* handle to VGAGRAPH */
static int maphandle; /* handle to MAPTEMP / GAMEMAPS */
static int audiohandle; /* handle to AUDIOT / AUDIO */
SDMode oldsoundmode;
#define FILEPOSSIZE 3
long GRFILEPOS(int c)
static long GRFILEPOS(int c)
{
long value;
int offset;
......@@ -471,7 +472,7 @@ void CA_RLEWexpand(word *source, word *dest, long length, word rlewtag)
============================
*/
long CAL_GetGrChunkLength(int chunk)
static long CAL_GetGrChunkLength(int chunk)
{
long chunkexplen;
......@@ -488,7 +489,7 @@ long CAL_GetGrChunkLength(int chunk)
======================
*/
void CAL_SetupGrFile()
static void CAL_SetupGrFile()
{
char fname[13];
int handle;
......@@ -555,9 +556,9 @@ void CAL_SetupGrFile()
======================
*/
void CAL_SetupMapFile()
static void CAL_SetupMapFile()
{
int i;
int i;
int handle;
long length,pos;
char fname[13];
......@@ -565,8 +566,8 @@ void CAL_SetupMapFile()
//
// load maphead.ext (offsets and tileinfo for map file)
//
strcpy(fname,mheadname);
strcat(fname,extension);
strcpy(fname, mheadname);
strcat(fname, extension);
if ((handle = open(fname, O_RDONLY | O_BINARY)) == -1)
CA_CannotOpen(fname);
......@@ -622,7 +623,7 @@ void CAL_SetupMapFile()
======================
*/
void CAL_SetupAudioFile()
static void CAL_SetupAudioFile()
{
int handle;
long length;
......@@ -663,7 +664,7 @@ void CAL_SetupAudioFile()
======================
*/
void CA_Startup(void)
void CA_Startup()
{
CAL_SetupMapFile();
CAL_SetupGrFile();
......@@ -806,7 +807,7 @@ cachein:
======================
*/
void CAL_ExpandGrChunk(int chunk, byte *source)
static void CAL_ExpandGrChunk(int chunk, byte *source)
{
int tilecount = 0, i;
long expanded;
......@@ -1383,11 +1384,11 @@ void MM_SortMem()
{
}
boolean PMStarted;
char PageFileName[13] = {"vswap."};
int PageFile = -1;
word ChunksInFile;
word PMSpriteStart,PMSoundStart;
static boolean PMStarted;
static int PageFile = -1;
static word ChunksInFile;
word PMSpriteStart, PMSoundStart;
word PMNumBlocks;
long PMFrameCount;
......@@ -1419,14 +1420,18 @@ static void PML_ReadFromFile(byte *buf, long offset, word length)
//
static void PML_OpenPageFile()
{
int i;
long size;
void *buf;
longword *offsetptr;
word *lengthptr;
int i;
long size;
void *buf;
longword *offsetptr;
word *lengthptr;
PageListStruct *page;
PageFile = open(PageFileName, O_RDONLY | O_BINARY);
char fname[13];
strcpy(fname, pfilename);
strcat(fname, extension);
PageFile = open(fname, O_RDONLY | O_BINARY);
if (PageFile == -1)
Quit("PML_OpenPageFile: Unable to open page file");
......
......@@ -18,7 +18,6 @@ typedef struct
//===========================================================================
extern byte *tinf;
extern int mapon;
extern word *mapsegs[MAPPLANES];
......@@ -26,9 +25,6 @@ extern maptype *mapheaderseg[NUMMAPS];
extern byte *audiosegs[NUMSNDCHUNKS];
extern byte *grsegs[NUMCHUNKS];
extern byte grneeded[NUMCHUNKS];
extern byte ca_levelbit,ca_levelnum;
extern char extension[5],
gheadname[10],
gfilename[10],
......@@ -37,9 +33,6 @@ extern char extension[5],
aheadname[10],
afilename[10];
extern long *grstarts; // array of offsets in vgagraph, -1 for sparse
extern long *audiostarts; // array of offsets in audio / audiot
//===========================================================================
boolean CA_FarRead(int handle, byte *dest, long length);
......@@ -50,25 +43,25 @@ boolean CA_WriteFile(char *filename, void *ptr, long length);
void CA_RLEWexpand(word *source, word *dest, long length, word rlewtag);
void CA_Startup (void);
void CA_Shutdown (void);
void CA_Startup();
void CA_Shutdown();
void CA_SetGrPurge (void);
void CA_SetGrPurge();
void CA_CacheAudioChunk(int chunk);
void CA_UnCacheAudioChunk(int chunk);
void CA_LoadAllSounds (void);
void CA_LoadAllSounds();
void CA_CacheMap (int mapnum);
void CA_CacheMap(int mapnum);
void CA_CacheGrChunk(int chunk);
void CA_UnCacheGrChunk(int chunk);
void CA_UpLevel (void);
void CA_DownLevel (void);
void CA_UpLevel();
void CA_DownLevel();
/*
void CA_SetAllPurge (void);
void CA_SetAllPurge();
void CA_ClearMarks (void);
void CA_ClearAllMarks (void);
void CA_ClearMarks();
void CA_ClearAllMarks();
#define CA_MarkGrChunk(chunk) grneeded[chunk]|=ca_levelbit
......@@ -105,15 +98,13 @@ extern PageListStruct *PMPages;
#define PM_GetSoundPage(v) PM_GetPage(PMSoundStart + (v))
#define PM_GetSpritePage(v) PM_GetPage(PMSpriteStart + (v))
extern char PageFileName[13];
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);
PM_Shutdown(void),
PM_Reset(void),
PM_Preload(boolean (*update)(word current,word total)),
PM_NextFrame(void),
PM_SetMainPurge(int level);
memptr PM_GetPageAddress(int pagenum), PM_GetPage(int pagenum);
#endif
......@@ -3428,7 +3428,6 @@ void CheckForEpisodes()
strcat(configname, extension);
strcat(SaveName, extension);
strcat(PageFileName, extension);
#else
......@@ -3485,7 +3484,6 @@ void CheckForEpisodes()
strcat(configname, extension);
strcat(SaveName, extension);
strcat(PageFileName, extension);
#endif
#else
......@@ -3539,8 +3537,6 @@ void CheckForEpisodes()
strcat(configname, extension);
strcat(SaveName, extension);
strcat(PageFileName, extension);
#endif
}
......@@ -941,16 +941,13 @@ void StopMusic(void)
=================
*/
void StartMusic(void)
void StartMusic()
{
musicnames chunk;
musicnames chunk;
SD_MusicOff();
chunk = songs[gamestate.mapon+gamestate.episode*10];
// if ((chunk == -1) || (MusicMode != smm_AdLib))
//DEBUG control panel return;
CA_CacheAudioChunk(STARTMUSIC + chunk);
MM_SetLock((memptr)&(audiosegs[STARTMUSIC + chunk]),true);
SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + chunk]);
......
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