Commit 250feebc authored by Steven Fuller's avatar Steven Fuller

NOTES, README, TODO: Doc updates

id_heads.h, wl_game.c, wl_play.c: changed mapwidth/mapheight to #defines,
since only maps with size 64x64 are allowed

vi_xlib.c, vi_svga.c, vi_null.c, vi_wdx.c, id_vh.c: moved VL_DeModeXize
to id_vh.c

vi_xlib.c: Part 2 of rewrite
parent 1ae2b9f3
......@@ -12,9 +12,9 @@ Just some random facts/thoughts/ideas/musings:
* Rumored/Never Released?
- Atari Lynx
- Sega Genesis (was cancelled after a month)
- Japanese PC Version
- Spanish PC Version
- Japanese Mac Version
- Japanese PC Version (referenced in source)
- Spanish PC Version (referenced in source)
- Japanese Mac Version (referenced in source ??)
* Unofficial ports:
- Linux (this, xwolf, wolfgl)
......@@ -24,20 +24,36 @@ Just some random facts/thoughts/ideas/musings:
- Windows (wolfgl) [http://www.sourceforge.net/projects/wolfgl/]
- Acorn/Archemedes
* PC source released on:
- now many ports, projects, etc
- urls
- http://www.abraxis.com/brucel/wolf3d.html
- http://www.wolf3dbunker.com
* Macintosh source released January 22(?), 2000
- url
* TED source (editor used for tons of games including wolf3d)
* PC source released August(?) ??, 1995:
- ftp://ftp.idsoftware.com/idstuff/source/wolfsrc.zip
* now many ports, projects, etc
- http://www.abraxis.com/brucel/wolf3d.html
- http://www.wolf3dbunker.com
- http://www.wolf3dmansion.com/index.phtml
* Macintosh source released January 21, 2000
- http://www.maccentral.com/news/0001/24.wolf3d.shtml
* TED5 source (editor used for tons of games including wolf3d)
- ftp://ftp.3drealms.com/misc/ted5.zip
* Games which used the Wolfenstein 3D Engine:
- Blake Stone
- Corridor 7
- Operation Body Count
Apogee FAQ (lots of information regarding Wolf3D):
- http://www.rinkworks.com/apogee/
Wolfenstein 3D FAQ:
- http://www.wolf3d.co.uk/Wolfenstein-3D.faq
How to get Wolfenstein 3D:
- Wolfenstein 3D Shareware:
ftp://ftp.gamers.org/pub/games/wolf3d/official/1wolf14.zip
http://www.3drealms.com/downloads.html
- Spear of Destiny Demo:
ftp://ftp.gamers.org/pub/3daction/00archives/speardestiny/releases/soddemo2.zip
- Macintosh versions: TODO
- Where to Buy: TODO
Wolfenstein 3D was originally planned to be a much more complex game. ...
... lots of unused code ... possibly from previous projects and incarnations
of wolf3d.
......@@ -46,3 +62,6 @@ Version 1.4 of Wolfenstein 3D (full) did not had a Read Me! option, but the
text still exists in the data files, but all the graphics are incorrect
(wrong graphic numbers, etc).
-----
Steven Fuller
relnev@atdot.org
Someone is actually reading the README...
<put links here>
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
Hi.
-----
Steven Fuller
......
------------------------------------------------------------------------------
Control Menu:
* TODO
......@@ -13,32 +14,70 @@ Sound Menu:
* Sampling Rate:
- 44100
- 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(chunk);
------------------------------------------------------------------------------
* would be nice if Quit() used vsnprintf, etc
* actor walking through door is drawn in front of door: near end of E1M1 for
example
* move DeModeXize so it does not have to be in every vi_ file
* clean up vi_xlib.c: fix vid mode changing, fix dga for non8bit modes and
the nonpalette setting stuff... lots of if statements
also, it should be able to compile without extensions
also, update xlib code with new knowledge of how things work
* getenv so that you can point an env. var to the proper dir
* 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
* proper left/right sound
* adlib sounds seem like they play at twice the freq
* set up a "build number" system where every time a file is recompiled via
make (ver.c depends on the source code) the number is incremented and so on
note: this debug system would have to be disabled for all public releases to
prevent confusion. OR ver.c would depend on the source, but it does not have
a version number, just __TIME__. this version id would be used for
savegames until they are fixed to not use pointers
* fix config file and savegames
* use static and const where appropriate
* convert uses of open() to fopen(), etc maybe
* menu code is a mess, always does things differently than the rest of the
......@@ -63,7 +102,6 @@ key type, and for everything not scancode-based, have a function to
translate
* wl_menu uses specific scancodes for names, config file will have to use
metaname like sc_Left etc or something
* perhaps rename UPLOAD
* 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)
......@@ -80,13 +118,8 @@ PlayDemoFromFile specifically
* deathcam went by too fast, and right before the fizzlefade was being done
on the border
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)
by putting in code from id_vh (either by using Plot or just copying it in)
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
* reduce code duplication in the vi_* files.
* split wl_draw into two files (draw independent, draw dependent)
* make sure none of the non-loader code tries to handle gfx/sound data
directly
* when window loses focus, it should clear the keys
......@@ -99,3 +132,4 @@ pcm sound len / 100).
Things to try:
* Create a native palette format instead of doing conversions each frame
------------------------------------------------------------------------------
......@@ -91,7 +91,9 @@ typedef enum { false, true } boolean;
typedef unsigned char byte;
typedef unsigned short int word;
typedef unsigned long longword;
typedef unsigned int longword;
typedef unsigned long dword;
typedef long fixed;
typedef void * memptr;
......@@ -123,7 +125,10 @@ void Quit(char *error);
#define MAXTICS 10
#define DEMOTICS 4
extern unsigned mapwidth, mapheight, tics;
extern unsigned tics;
#define mapwidth 64
#define mapheight 64
extern byte fontcolor, backcolor;
......
......@@ -10,7 +10,7 @@ int fontnumber;
boolean screenfaded;
byte palette1[256][3], palette2[256][3];
static byte palette1[256][3], palette2[256][3];
/* ======================================================================== */
......@@ -259,3 +259,29 @@ void VL_CacheScreen(int chunk)
VL_MemToScreen(grsegs[chunk], 320, 200, 0, 0);
CA_UnCacheGrChunk(chunk);
}
void VL_DeModeXize(byte *buf, int width, int height)
{
byte *mem, *ptr, *destline;
int plane, x, y;
if (width & 3) {
printf("Not divisible by 4?\n");
return;
}
mem = malloc(width * height);
ptr = buf;
for (plane = 0; plane < 4; plane++) {
destline = mem;
for (y = 0; y < height; y++) {
for (x = 0; x < width / 4; x++)
*(destline + x*4 + plane) = *ptr++;
destline += width;
}
}
memcpy(buf, mem, width * height);
free(mem);
}
......@@ -173,27 +173,20 @@ extern ScanCode LastScan;
extern KeyboardDef KbdDefs;
extern ControlType Controls[MaxPlayers];
// Function prototypes
#define IN_KeyDown(code) (Keyboard[(code)])
#define IN_ClearKey(code) { \
Keyboard[code] = false; \
if (code == LastScan) \
LastScan = sc_None; \
}
extern void IN_Startup(void),IN_Shutdown(void),
IN_ClearKeysDown(void),
extern void IN_Startup(), IN_Shutdown(), IN_ClearKeysDown(),
IN_ReadControl(int,ControlInfo *),
IN_GetJoyAbs(word joy,word *xp,word *yp),
IN_SetupJoy(word joy,word minx,word maxx,word miny,word maxy),
IN_Ack(void);
IN_Ack();
extern boolean IN_UserInput(longword delay);
extern char *IN_GetScanName(ScanCode);
extern boolean IN_UserInput(longword delay);
extern char *IN_GetScanName(ScanCode);
byte IN_MouseButtons();
byte IN_JoyButtons();
byte IN_MouseButtons();
byte IN_JoyButtons();
void INL_GetJoyDelta(word joy,int *dx,int *dy);
void IN_StartAck();
......
......@@ -243,30 +243,6 @@ void VL_MemToScreen(const byte *source, int width, int height, int x, int y)
}
}
void VL_DeModeXize(byte *buf, int width, int height)
{
byte *mem, *ptr, *destline;
int plane, x, y;
if (width & 3) {
printf("Not divisible by 4?\n");
return;
}
mem = malloc(width * height);
ptr = buf;
for (plane = 0; plane < 4; plane++) {
destline = mem;
for (y = 0; y < height; y++) {
for (x = 0; x < width / 4; x++)
*(destline + x*4 + plane) = *ptr++;
destline += width;
}
}
memcpy(buf, mem, width * height);
free(mem);
}
void VL_DirectPlot(int x1, int y1, int x2, int y2)
{
}
......
......@@ -277,30 +277,6 @@ void VL_MemToScreen(const byte *source, int width, int height, int x, int y)
}
}
void VL_DeModeXize(byte *buf, int width, int height)
{
byte *mem, *ptr, *destline;
int plane, x, y;
if (width & 3) {
printf("Not divisible by 4?\n");
return;
}
mem = malloc(width * height);
ptr = buf;
for (plane = 0; plane < 4; plane++) {
destline = mem;
for (y = 0; y < height; y++) {
for (x = 0; x < width / 4; x++)
*(destline + x*4 + plane) = *ptr++;
destline += width;
}
}
memcpy(buf, mem, width * height);
free(mem);
}
void VL_DirectPlot(int x1, int y1, int x2, int y2)
{
*(graph_mem + x1 + y1 * 320) = *(gfxbuf + x2 + y2 * 320);
......
......@@ -528,32 +528,6 @@ void VL_MemToScreen(const byte *source, int width, int height, int x, int y)
}
}
/* TODO: can this go in id_vh.c? */
void VL_DeModeXize(byte *buf, int width, int height)
{
byte *mem, *ptr, *destline;
int plane, x, y;
if (width & 3) {
printf("Not divisible by 4?\n");
return;
}
/* TODO: is there a better way without mallocing extra memory? */
mem = malloc(width * height);
ptr = buf;
for (plane = 0; plane < 4; plane++) {
destline = mem;
for (y = 0; y < height; y++) {
for (x = 0; x < width / 4; x++)
*(destline + x*4 + plane) = *ptr++;
destline += width;
}
}
memcpy(buf, mem, width * height);
free(mem);
}
void VL_DirectPlot(int x1, int y1, int x2, int y2)
{
......
This diff is collapsed.
......@@ -294,8 +294,8 @@ void T_Projectile (objtype *ob)
ob->x += deltax;
ob->y += deltay;
deltax = LABS(ob->x - player->x);
deltay = LABS(ob->y - player->y);
deltax = labs(ob->x - player->x);
deltay = labs(ob->y - player->y);
if (!ProjectileTryMove (ob))
{
......@@ -3289,11 +3289,11 @@ void T_DogChase (objtype *ob)
===============
*/
void SelectPathDir (objtype *ob)
void SelectPathDir(objtype *ob)
{
unsigned spot;
spot = MAPSPOT(ob->tilex,ob->tiley,1)-ICONARROWS;
spot = *(mapsegs[1]+farmapylookup[ob->tiley]+ob->tilex)-ICONARROWS;
if (spot<8)
{
......
......@@ -6,18 +6,6 @@
#include "wl_menu.h"
#include "foreign.h"
/*
=============================================================================
MACROS
=============================================================================
*/
#define MAPSPOT(x,y,plane) (*(mapsegs[plane]+farmapylookup[y]+x))
#define LABS(x) ((long)(x)>0?(x):-(x))
/*
=============================================================================
......
......@@ -456,15 +456,14 @@ void SetupGameLevel()
int x,y;
word *map,tile;
if (!loadedgame)
{
gamestate.TimeCount=
gamestate.secrettotal=
gamestate.killtotal=
gamestate.treasuretotal=
gamestate.secretcount=
gamestate.killcount=
gamestate.treasurecount=0;
if (!loadedgame) {
gamestate.TimeCount =
gamestate.secrettotal =
gamestate.killtotal =
gamestate.treasuretotal =
gamestate.secretcount =
gamestate.killcount =
gamestate.treasurecount = 0;
}
if (demoplayback || demorecord)
......@@ -476,12 +475,9 @@ void SetupGameLevel()
// load the level
//
CA_CacheMap(gamestate.mapon+10*gamestate.episode);
mapon-=gamestate.episode*10;
mapwidth = mapheaderseg[mapon]->width;
mapheight = mapheaderseg[mapon]->height;
mapon -= gamestate.episode*10;
if (mapwidth != 64 || mapheight != 64)
if ((mapheaderseg[mapon]->width != 64) || (mapheaderseg[mapon]->height != 64))
Quit("Map not 64*64!");
......@@ -492,14 +488,13 @@ void SetupGameLevel()
memset(actorat, 0, sizeof(actorat));
map = mapsegs[0];
for (y=0;y<mapheight;y++)
for (x=0;x<mapwidth;x++)
{
for (y = 0; y < mapheight; y++)
for (x = 0; x < mapwidth; x++) {
tile = *map++;
if (tile<AREATILE) { // solid wall
if (tile < AREATILE) { /* solid wall */
tilemap[x][y] = tile;
(unsigned)actorat[x][y] = tile;
} else { // area floor
} else { /* area floor */
tilemap[x][y] = 0;
actorat[x][y] = NULL;
}
......@@ -558,7 +553,7 @@ void SetupGameLevel()
if (tile == AMBUSHTILE)
{
tilemap[x][y] = 0;
if ( (unsigned)actorat[x][y] == AMBUSHTILE)
if ((unsigned)actorat[x][y] == AMBUSHTILE)
actorat[x][y] = NULL;
if (*map >= AREATILE)
......@@ -567,7 +562,7 @@ void SetupGameLevel()
tile = *(map-1-mapwidth);
if (*(map-1+mapwidth) >= AREATILE)
tile = *(map-1+mapwidth);
if ( *(map-2) >= AREATILE)
if (*(map-2) >= AREATILE)
tile = *(map-2);
*(map-1) = tile;
......
......@@ -149,8 +149,9 @@ CusMenu[]=
static int color_hlite[] = { DEACTIVE, HIGHLIGHT, READHCOLOR, 0x67 };
static int color_norml[] = { DEACTIVE, TEXTCOLOR, READCOLOR, 0x6b };
static int EpisodeSelect[6]={1};
#ifndef SPEAR
static int EpisodeSelect[6] = { 1 };
#endif
int SaveGamesAvail[10],StartGame,SoundStatus=1,pickquick;
char SaveGameNames[10][32],SaveName[13]="savegam?.";
......
......@@ -26,10 +26,7 @@ byte tilemap[MAPSIZE][MAPSIZE]; // wall values only
byte spotvis[MAPSIZE][MAPSIZE];
objtype *actorat[MAPSIZE][MAPSIZE];
//
// replacing refresh manager
//
unsigned mapwidth,mapheight,tics;
unsigned tics;
//
// control info
......@@ -345,7 +342,7 @@ void PollKeyboardMove()
void PollMouseMove()
{
int mousexmove = 0, mouseymove = 0;
int mousexmove = 0, mouseymove = 0;
controlx += mousexmove*10/(13-mouseadjustment);
controly += mouseymove*20/(13-mouseadjustment);
......
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