Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wolf3d
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
wolf3d
Commits
dd97540c
Commit
dd97540c
authored
Apr 23, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the status bar pics
parent
0dde4e74
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
72 additions
and
153 deletions
+72
-153
IDEAS
src/IDEAS
+5
-3
NOTES
src/NOTES
+5
-0
README
src/README
+1
-0
TODO
src/TODO
+8
-0
id_vh.c
src/id_vh.c
+20
-25
id_vh.h
src/id_vh.h
+8
-11
id_vl.c
src/id_vl.c
+0
-86
wl_draw.c
src/wl_draw.c
+20
-22
wl_game.c
src/wl_game.c
+0
-1
wl_menu.c
src/wl_menu.c
+4
-0
wl_menu.h
src/wl_menu.h
+1
-5
No files found.
src/IDEAS
View file @
dd97540c
...
@@ -4,11 +4,13 @@
...
@@ -4,11 +4,13 @@
handles this transparently
handles this transparently
* Audio support using OpenAL
* Audio support using OpenAL
- Problem is, that SDL and OpenAL would need pthread, which with SVGAlib is
- Problem is, that SDL and OpenAL would need pthread, which with SVGAlib is
a no-go... oh well.
a no-go... oh well. Using DGA (if possible at 320x200) would fulfill the
desire for full screen mode
* Add support for the Mac version, if possible
* Add support for the Mac version, if possible
* Network support!
* Network support!
* Fully compile with no warnings/errors using -Wall -ansi -pedantic
* Fully compile with no warnings/errors using -Wall -ansi -pedantic
* Port to: Linux/SVGAlib, Linux/X
, Linux/OpenGL, DOS/Allegro, Win32/GDI
,
* Port to: Linux/SVGAlib, Linux/X
(Windowed and DGA), Linux/OpenGL
,
Win32/DX, Win32/D3D, Win32/OpenGL, BeOS?, MacOS?
DOS/Allegro, Win32/GDI,
Win32/DX, Win32/D3D, Win32/OpenGL, BeOS?, MacOS?
* Ease in using demos. Playing demos from files, recording to files, batch
* Ease in using demos. Playing demos from files, recording to files, batch
playing, and so on.
playing, and so on.
* Make Wolf3D the game it was originally planned to be...
src/NOTES
0 → 100644
View file @
dd97540c
Just some random facts/thoughts/ideas/musings:
Wolfenstein 3D was originally planned to be a much more complex game. ...
... lots of unused code ... possibly from previous projects and incarnations
of wolf3d.
src/README
0 → 100644
View file @
dd97540c
Someone is actually reading the README...
src/TODO
View file @
dd97540c
...
@@ -42,3 +42,11 @@ CA_FarRead hit EOF?
...
@@ -42,3 +42,11 @@ CA_FarRead hit EOF?
CA_FarRead hit EOF?
CA_FarRead hit EOF?
CA_FarRead hit EOF?
CA_FarRead hit EOF?
* if possible fix/or at least add ViewMap?
* if possible fix/or at least add ViewMap?
* remove the #else at the end of each header since nothing is being doubly
included now (if ever)
* i don't like this latch nonsense. i think it was for originally storing
data in vga memory. so figure it out, fix it, and remove
* especially with the video functions, there are functions/defines which
just call a different function (most are left from the update block code)
remove them
* implement fizzlefade, and get that last pixel!
src/id_vh.c
View file @
dd97540c
...
@@ -10,7 +10,11 @@ int px,py;
...
@@ -10,7 +10,11 @@ int px,py;
byte
fontcolor
,
backcolor
;
byte
fontcolor
,
backcolor
;
int
fontnumber
;
int
fontnumber
;
unsigned
freelatch
;
/* TODO: more latch nonsense
unsigned freelatch;
unsigned latchpics[NUMLATCHPICS];
*/
/* ======================================================================== */
/* ======================================================================== */
void
VW_DrawPropString
(
char
*
string
)
void
VW_DrawPropString
(
char
*
string
)
...
@@ -65,9 +69,10 @@ void VW_MeasurePropString (char *string, word *width, word *height)
...
@@ -65,9 +69,10 @@ void VW_MeasurePropString (char *string, word *width, word *height)
=============================================================================
=============================================================================
*/
*/
void
VWB_DrawTile8
(
int
x
,
int
y
,
int
tile
)
void
VWB_DrawTile8
(
int
x
,
int
y
,
int
tile
)
{
{
LatchDrawChar
(
x
,
y
,
tile
);
/* TODO: 'latches' do not work */
/* LatchDrawChar(x,y,tile); */
}
}
void
VWB_DrawPic
(
int
x
,
int
y
,
int
chunknum
)
void
VWB_DrawPic
(
int
x
,
int
y
,
int
chunknum
)
...
@@ -85,13 +90,12 @@ void VWB_DrawPic(int x, int y, int chunknum)
...
@@ -85,13 +90,12 @@ void VWB_DrawPic(int x, int y, int chunknum)
void
VWB_DrawPropString
(
char
*
string
)
void
VWB_DrawPropString
(
char
*
string
)
{
{
VW_DrawPropString
(
string
);
VW_DrawPropString
(
string
);
}
}
void
VWB_Bar
(
int
x
,
int
y
,
int
width
,
int
height
,
int
color
)
void
VWB_Bar
(
int
x
,
int
y
,
int
width
,
int
height
,
int
color
)
{
{
VW_Bar
(
x
,
y
,
width
,
height
,
color
);
VW_Bar
(
x
,
y
,
width
,
height
,
color
);
}
}
void
VWB_Plot
(
int
x
,
int
y
,
int
color
)
void
VWB_Plot
(
int
x
,
int
y
,
int
color
)
...
@@ -111,17 +115,9 @@ void VWB_Vlin(int y1, int y2, int x, int color)
...
@@ -111,17 +115,9 @@ void VWB_Vlin(int y1, int y2, int x, int color)
void
VW_UpdateScreen
(
void
)
void
VW_UpdateScreen
(
void
)
{
{
VL_UpdateScreen
();
VL_UpdateScreen
();
}
}
/*
=============================================================================
WOLFENSTEIN STUFF
=============================================================================
*/
/*
/*
=====================
=====================
=
=
...
@@ -130,15 +126,9 @@ void VW_UpdateScreen(void)
...
@@ -130,15 +126,9 @@ void VW_UpdateScreen(void)
=====================
=====================
*/
*/
void
LatchDrawPic
(
unsigned
x
,
unsigned
y
,
unsigned
picnum
)
void
LatchDrawPic
(
unsigned
x
,
unsigned
y
,
unsigned
picnum
)
{
{
unsigned
wide
,
height
,
source
;
VWB_DrawPic
(
x
*
8
,
y
+
160
,
picnum
);
wide
=
pictable
[
picnum
-
STARTPICS
].
width
;
height
=
pictable
[
picnum
-
STARTPICS
].
height
;
source
=
latchpics
[
2
+
picnum
-
LATCHPICS_LUMP_START
];
VL_LatchToScreen
(
source
,
wide
/
4
,
height
,
x
*
8
,
y
);
}
}
/* ======================================================================== */
/* ======================================================================== */
...
@@ -160,6 +150,7 @@ void LoadLatchMem(void)
...
@@ -160,6 +150,7 @@ void LoadLatchMem(void)
/*
/*
tile 8s
tile 8s
*/
*/
#if 0 /* I can't get these to extract, if at all */
latchpics[0] = freelatch;
latchpics[0] = freelatch;
CA_CacheGrChunk (STARTTILE8);
CA_CacheGrChunk (STARTTILE8);
src = (byte *)grsegs[STARTTILE8];
src = (byte *)grsegs[STARTTILE8];
...
@@ -172,8 +163,9 @@ void LoadLatchMem(void)
...
@@ -172,8 +163,9 @@ void LoadLatchMem(void)
destoff +=16;
destoff +=16;
}
}
UNCACHEGRCHUNK (STARTTILE8);
UNCACHEGRCHUNK (STARTTILE8);
#endif
#if 0
/* ran out of latch space! */
#if 0
/*
/*
tile 16s
tile 16s
*/
*/
...
@@ -199,13 +191,16 @@ void LoadLatchMem(void)
...
@@ -199,13 +191,16 @@ void LoadLatchMem(void)
for
(
i
=
start
;
i
<=
end
;
i
++
)
for
(
i
=
start
;
i
<=
end
;
i
++
)
{
{
latchpics
[
2
+
i
-
start
]
=
destoff
;
/* TODO: this just caches them for eternity */
CA_CacheGrChunk
(
i
);
CA_CacheGrChunk
(
i
);
#if 0
latchpics[2+i-start] = destoff;
width = pictable[i-STARTPICS].width;
width = pictable[i-STARTPICS].width;
height = pictable[i-STARTPICS].height;
height = pictable[i-STARTPICS].height;
VL_MemToLatch (grsegs[i],width,height,destoff);
VL_MemToLatch (grsegs[i],width,height,destoff);
destoff += width/4 *height;
destoff += width/4 *height;
UNCACHEGRCHUNK(i);
UNCACHEGRCHUNK(i);
#endif
}
}
}
}
...
...
src/id_vh.h
View file @
dd97540c
...
@@ -28,12 +28,6 @@ extern int px,py;
...
@@ -28,12 +28,6 @@ extern int px,py;
void
VW_UpdateScreen
(
void
);
void
VW_UpdateScreen
(
void
);
//
// mode independant routines
// coordinates in pixels, rounded to best screen res
// regions marked in double buffer
//
void
VWB_DrawTile8
(
int
x
,
int
y
,
int
tile
);
void
VWB_DrawTile8
(
int
x
,
int
y
,
int
tile
);
void
VWB_DrawPic
(
int
x
,
int
y
,
int
chunknum
);
void
VWB_DrawPic
(
int
x
,
int
y
,
int
chunknum
);
void
VWB_Bar
(
int
x
,
int
y
,
int
width
,
int
height
,
int
color
);
void
VWB_Bar
(
int
x
,
int
y
,
int
width
,
int
height
,
int
color
);
...
@@ -51,22 +45,25 @@ extern byte gamepal;
...
@@ -51,22 +45,25 @@ extern byte gamepal;
#define VW_Plot VL_Plot
#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_ColorBorder VL_ColorBorder
#define VW_ColorBorder
VL_ColorBorder
#define VW_WaitVBL VL_WaitVBL
#define VW_WaitVBL VL_WaitVBL
#define VW_FadeIn() VL_FadeIn(0,255,&gamepal,30);
#define VW_FadeIn() VL_FadeIn(0,255,&gamepal,30);
#define VW_FadeOut() VL_FadeOut(0,255,0,0,0,30);
#define VW_FadeOut()
VL_FadeOut(0,255,0,0,0,30);
void
VW_MeasurePropString
(
char
*
string
,
word
*
width
,
word
*
height
);
void
VW_MeasurePropString
(
char
*
string
,
word
*
width
,
word
*
height
);
#define LatchDrawChar(x,y,p) VL_LatchToScreen(latchpics[0]+(p)*16,2,8,x,y)
boolean
FizzleFade
(
byte
*
source
,
unsigned
width
,
unsigned
height
,
unsigned
frames
,
boolean
abortable
);
#define LatchDrawTile(x,y,p) VL_LatchToScreen(latchpics[1]+(p)*64,4,16,x,y)
void
LatchDrawPic
(
unsigned
x
,
unsigned
y
,
unsigned
picnum
);
void
LatchDrawPic
(
unsigned
x
,
unsigned
y
,
unsigned
picnum
);
void
LoadLatchMem
(
void
);
void
LoadLatchMem
(
void
);
boolean
FizzleFade
(
byte
*
source
,
unsigned
width
,
unsigned
height
,
unsigned
frames
,
boolean
abortable
);
#if 0 /* TODO: find some way to remove this ... */
#define LatchDrawChar(x,y,p) VL_LatchToScreen(latchpics[0]+(p)*16,2,8,x,y)
#define LatchDrawTile(x,y,p) VL_LatchToScreen(latchpics[1]+(p)*64,4,16,x,y)
#define NUMLATCHPICS 100
#define NUMLATCHPICS 100
extern unsigned latchpics[NUMLATCHPICS];
extern unsigned latchpics[NUMLATCHPICS];
extern unsigned freelatch;
extern unsigned freelatch;
#endif
#else
#else
#error "fix me: TODO"
#error "fix me: TODO"
...
...
src/id_vl.c
View file @
dd97540c
...
@@ -355,45 +355,6 @@ void VL_Bar(int x, int y, int width, int height, int color)
...
@@ -355,45 +355,6 @@ void VL_Bar(int x, int y, int width, int height, int color)
============================================================================
============================================================================
*/
*/
/*
=================
=
= VL_MemToLatch
=
=================
*/
void
VL_MemToLatch
(
byte
*
source
,
int
width
,
int
height
,
word
dest
)
{
#if 0
unsigned count;
byte plane,mask;
count = ((width+3)/4)*height;
mask = 1;
for (plane = 0; plane<4 ; plane++)
{
VGAMAPMASK(mask);
mask <<= 1;
asm mov cx,count
asm mov ax,SCREENSEG
asm mov es,ax
asm mov di,[dest]
asm lds si,[source]
asm rep movsb
asm mov ax,ss
asm mov ds,ax
source+= count;
}
#endif
}
//===========================================================================
/*
/*
=================
=================
=
=
...
@@ -414,53 +375,6 @@ void VL_MemToScreen(byte *source, int width, int height, int x, int y)
...
@@ -414,53 +375,6 @@ void VL_MemToScreen(byte *source, int width, int height, int x, int y)
}
}
}
}
/* ======================================================================== */
/*
=================
=
= VL_LatchToScreen
=
=================
*/
void
VL_LatchToScreen
(
unsigned
source
,
int
width
,
int
height
,
int
x
,
int
y
)
{
#if 0
VGAWRITEMODE(1);
VGAMAPMASK(15);
asm mov di,[y] // dest = bufferofs+ylookup[y]+(x>>2)
asm shl di,1
asm mov di,[WORD PTR ylookup+di]
asm add di,[bufferofs]
asm mov ax,[x]
asm shr ax,2
asm add di,ax
asm mov si,[source]
asm mov ax,[width]
asm mov bx,[linewidth]
asm sub bx,ax
asm mov dx,[height]
asm mov cx,SCREENSEG
asm mov ds,cx
asm mov es,cx
drawline:
asm mov cx,ax
asm rep movsb
asm add di,bx
asm dec dx
asm jnz drawline
asm mov ax,ss
asm mov ds,ax
VGAWRITEMODE(0);
#endif
}
void
VL_DeModeXize
(
byte
*
buf
,
int
width
,
int
height
)
void
VL_DeModeXize
(
byte
*
buf
,
int
width
,
int
height
)
{
{
byte
*
mem
,
*
ptr
,
*
destline
;
byte
*
mem
,
*
ptr
,
*
destline
;
...
...
src/wl_draw.c
View file @
dd97540c
...
@@ -268,17 +268,19 @@ int CalcHeight (void)
...
@@ -268,17 +268,19 @@ int CalcHeight (void)
===================
===================
*/
*/
unsigned
postx
;
unsigned
postx
;
void
ScalePost
(
byte
*
wall
,
int
texture
)
// VGA version
void
ScalePost
(
byte
*
wall
,
int
texture
)
{
{
int
height
;
int
height
;
byte
*
source
;
byte
*
source
;
height
=
(
wallheight
[
postx
]
&
0xfff8
)
>>
1
;
if
(
height
>
maxscaleshl2
)
height
=
(
wallheight
[
postx
]
&
0xfff8
)
>>
1
;
height
=
maxscaleshl2
;
if
(
height
>
maxscaleshl2
)
source
=
wall
+
texture
;
height
=
maxscaleshl2
;
xBuildCompScale
(
height
/
2
,
source
,
postx
);
source
=
wall
+
texture
;
xBuildCompScale
(
height
/
2
,
source
,
postx
);
}
}
...
@@ -318,9 +320,8 @@ void HitHorizDoor (void)
...
@@ -318,9 +320,8 @@ void HitHorizDoor (void)
break
;
break
;
}
}
wall
=
PM_GetPage
(
doorpage
);
wall
=
PM_GetPage
(
doorpage
);
ScalePost
(
wall
,
texture
);
ScalePost
(
wall
,
texture
);
}
}
//==========================================================================
//==========================================================================
...
@@ -695,7 +696,7 @@ void ThreeDRefresh (void)
...
@@ -695,7 +696,7 @@ void ThreeDRefresh (void)
//
//
// clear out the traced array
// clear out the traced array
//
//
memset
(
spotvis
,
0
,
sizeof
(
spotvis
));
memset
(
spotvis
,
0
,
sizeof
(
spotvis
));
//
//
// follow the walls from there to the right, drawwing as we go
// follow the walls from there to the right, drawwing as we go
...
@@ -724,7 +725,7 @@ void ThreeDRefresh (void)
...
@@ -724,7 +725,7 @@ void ThreeDRefresh (void)
}
}
VL_UpdateScreen
();
VL_UpdateScreen
();
frameon
++
;
frameon
++
;
}
}
...
@@ -736,8 +737,8 @@ void ThreeDRefresh (void)
...
@@ -736,8 +737,8 @@ void ThreeDRefresh (void)
ystep = 32 bit fixed 32,16
ystep = 32 bit fixed 32,16
*/
*/
#define xpartialbyystep() FixedByFrac
(xpartial, ystep)
#define xpartialbyystep() FixedByFrac(xpartial, ystep)
#define ypartialbyxstep() FixedByFrac
(ypartial, xstep)
#define ypartialbyxstep() FixedByFrac(ypartial, xstep)
int
samex
(
int
intercept
,
int
tile
)
int
samex
(
int
intercept
,
int
tile
)
{
{
...
@@ -746,8 +747,7 @@ int samex (int intercept, int tile)
...
@@ -746,8 +747,7 @@ int samex (int intercept, int tile)
return
0
;
return
0
;
else
else
return
1
;
return
1
;
}
}
else
{
else
{
if
((
intercept
>>
16
)
<=
tile
)
if
((
intercept
>>
16
)
<=
tile
)
return
0
;
return
0
;
else
else
...
@@ -762,8 +762,7 @@ int samey (int intercept, int tile)
...
@@ -762,8 +762,7 @@ int samey (int intercept, int tile)
return
0
;
return
0
;
else
else
return
1
;
return
1
;
}
}
else
{
else
{
if
((
intercept
>>
16
)
<=
tile
)
if
((
intercept
>>
16
)
<=
tile
)
return
0
;
return
0
;
else
else
...
@@ -980,8 +979,7 @@ void HitVertWall (void)
...
@@ -980,8 +979,7 @@ void HitVertWall (void)
}
}
void
void
HitHorizWall
(
void
)
HitHorizWall
(
void
)
{
{
int
wallpic
;
int
wallpic
;
unsigned
texture
;
unsigned
texture
;
...
...
src/wl_game.c
View file @
dd97540c
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
*/
*/
boolean
ingame
,
fizzlein
;
boolean
ingame
,
fizzlein
;
unsigned
latchpics
[
NUMLATCHPICS
];
gametype
gamestate
;
gametype
gamestate
;
long
spearx
,
speary
;
long
spearx
,
speary
;
...
...
src/wl_menu.c
View file @
dd97540c
...
@@ -49,7 +49,11 @@ char endStrings[9][80]=
...
@@ -49,7 +49,11 @@ char endStrings[9][80]=
};
};
CP_iteminfo
CP_iteminfo
#if !defined(GOODTIMES) && !defined(SPEAR)
MainItems
=
{
MENU_X
,
MENU_Y
,
10
,
STARTITEM
,
24
},
MainItems
=
{
MENU_X
,
MENU_Y
,
10
,
STARTITEM
,
24
},
#else
MainItems
=
{
MENU_X
,
MENU_Y
,
9
,
STARTITEM
,
24
},
#endif
SndItems
=
{
SM_X
,
SM_Y1
,
12
,
0
,
52
},
SndItems
=
{
SM_X
,
SM_Y1
,
12
,
0
,
52
},
LSItems
=
{
LSM_X
,
LSM_Y
,
10
,
0
,
24
},
LSItems
=
{
LSM_X
,
LSM_Y
,
10
,
0
,
24
},
CtlItems
=
{
CTL_X
,
CTL_Y
,
6
,
-
1
,
56
},
CtlItems
=
{
CTL_X
,
CTL_Y
,
6
,
-
1
,
56
},
...
...
src/wl_menu.h
View file @
dd97540c
...
@@ -202,13 +202,9 @@ enum
...
@@ -202,13 +202,9 @@ enum
loadgame
,
loadgame
,
savegame
,
savegame
,
changeview
,
changeview
,
#if !defined(GOODTIMES) && !defined(SPEAR)
#ifndef GOODTIMES
#ifndef SPEAR
readthis
,
readthis
,
#endif
#endif
#endif
viewscores
,
viewscores
,
backtodemo
,
backtodemo
,
quit
quit
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment