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
ec83e834
Commit
ec83e834
authored
Mar 15, 2001
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed FizzleFade
parent
761d01e5
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
41 additions
and
197 deletions
+41
-197
TODO
src/TODO
+6
-12
id_vh.c
src/id_vh.c
+4
-86
id_vh.h
src/id_vh.h
+10
-2
vi_comm.h
src/vi_comm.h
+1
-11
vi_null.c
src/vi_null.c
+0
-8
vi_sdl.c
src/vi_sdl.c
+0
-16
vi_svga.c
src/vi_svga.c
+0
-14
vi_xlib.c
src/vi_xlib.c
+0
-30
wl_act2.c
src/wl_act2.c
+7
-6
wl_def.h
src/wl_def.h
+2
-2
wl_draw.c
src/wl_draw.c
+4
-1
wl_game.c
src/wl_game.c
+7
-9
No files found.
src/TODO
View file @
ec83e834
...
@@ -29,9 +29,12 @@ B M - use something like config file or getenv to point at data directories
...
@@ -29,9 +29,12 @@ B M - use something like config file or getenv to point at data directories
P I - finish handling/mapping for all keys in sys. specific code
P I - finish handling/mapping for all keys in sys. specific code
B I - add mouse support
B I - add mouse support
B M - add joystick/gamepad support
B M - add joystick/gamepad support
P I - fix or remove fizzlefade
P I - add an appropiate replacement where fizzlefade was
P I - add sound "emulation" to the necessary targets so WaitSoundDone works
Complete:
Complete:
P I - fix or remove fizzle fade
- Removed [nice, but very hacky effect]
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Control Menu:
Control Menu:
* TODO
* TODO
...
@@ -62,24 +65,15 @@ code, it really needs to be cleaned up
...
@@ -62,24 +65,15 @@ code, it really needs to be cleaned up
in the right place
in the right place
* change the current parameter handling code to something like getopt
* change the current parameter handling code to something like getopt
* remove check for debugmode?
* remove check for debugmode?
* fizzlefade is hackish, stipple buf would work ok in opengl, maybe only
update once per frame or such...
no idea how to do fizzlefade in TrueColor X
fix fizzlefade for non 320x200 resolutions
* check filehandling (ex, file missing, bad file type, and such)
* check filehandling (ex, file missing, bad file type, and such)
PlayDemoFromFile specifically
PlayDemoFromFile specifically
* deathcam went by too fast, and right before the fizzlefade was being done
* deathcam went by too fast, same with the spear of destiny ending animation
on the border
- probably due to waiting for sounds to finish
same with the spear of destiny animation part of ending
* reduce code duplication in the vi_* files.
* split wl_draw into two files (draw independent, draw dependent)
* split wl_draw into two files (draw independent, draw dependent)
* when window loses focus, it should clear the keys
* when window loses focus, it should clear the keys
* rename visable to visible
* rename visable to visible
* create 'sound channels' with priority.. ie a door can only make one sound
* create 'sound channels' with priority.. ie a door can only make one sound
at a time
at a time
* systems with no sound should still have working WaitSoundDone.. it's
possible to calculate the sound lengths in terms of 70Hz (adlib sound len / 2,
pcm sound len / 100).
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Save game header:
Save game header:
8 bytes: WOLF3D, 0, 0
8 bytes: WOLF3D, 0, 0
...
...
src/id_vh.c
View file @
ec83e834
...
@@ -14,80 +14,6 @@ int xfrac, yfrac;
...
@@ -14,80 +14,6 @@ int xfrac, yfrac;
/* ======================================================================== */
/* ======================================================================== */
/*
===================
=
= FizzleFade
=
= returns true if aborted
=
===================
*/
boolean
FizzleFade
(
unsigned
xx
,
unsigned
yy
,
unsigned
width
,
unsigned
height
,
unsigned
frames
,
boolean
abortable
)
{
int
pixperframe
;
int
x
,
y
,
p
,
frame
;
unsigned
int
rndval
;
int
retr
;
int
blocksize
;
rndval
=
1
;
pixperframe
=
64000
/
frames
;
IN_StartAck
();
frame
=
0
;
set_TimeCount
(
0
);
if
(
vwidth
&
3
)
return
false
;
blocksize
=
(
vwidth
/
320
);
retr
=
-
1
;
/* VL_DirectPlotInit(); */
do
{
if
(
abortable
&&
IN_CheckAck
())
retr
=
true
;
else
for
(
p
=
0
;
p
<
pixperframe
;
p
++
)
{
y
=
((
rndval
&
0x00FF
)
-
1
)
*
blocksize
;
//y = (rndval & 0x000007FF) - 1;
x
=
((
rndval
&
0x00FFFF00
)
>>
8
)
*
blocksize
;
if
(
rndval
&
1
)
{
rndval
>>=
1
;
rndval
^=
0x00012000
;
}
else
rndval
>>=
1
;
if
((
x
>
width
)
||
(
y
>
height
))
continue
;
//VL_DirectPlot(xx+x, yy+y, xx+x, yy+y);
VL_DirectUpdateRect
(
xx
+
x
,
yy
+
y
,
blocksize
,
blocksize
);
if
(
rndval
==
1
)
{
/* entire sequence has been completed */
retr
=
false
;
break
;
}
}
//VL_DirectPlotFlush();
frame
++
;
while
(
get_TimeCount
()
<
frame
);
}
while
(
retr
==
-
1
);
VL_DirectPlotFlush
();
return
retr
;
}
void
VL_FillPalette
(
int
red
,
int
green
,
int
blue
)
void
VL_FillPalette
(
int
red
,
int
green
,
int
blue
)
{
{
byte
pal
[
768
];
byte
pal
[
768
];
...
@@ -119,9 +45,7 @@ void VL_FadeOut(int start, int end, int red, int green, int blue, int steps)
...
@@ -119,9 +45,7 @@ void VL_FadeOut(int start, int end, int red, int green, int blue, int steps)
VL_GetPalette
(
&
palette1
[
0
][
0
]);
VL_GetPalette
(
&
palette1
[
0
][
0
]);
memcpy
(
palette2
,
palette1
,
768
);
memcpy
(
palette2
,
palette1
,
768
);
//
/* fade through intermediate frames */
// fade through intermediate frames
//
for
(
i
=
0
;
i
<
steps
;
i
++
)
for
(
i
=
0
;
i
<
steps
;
i
++
)
{
{
origptr
=
&
palette1
[
start
][
0
];
origptr
=
&
palette1
[
start
][
0
];
...
@@ -142,9 +66,7 @@ void VL_FadeOut(int start, int end, int red, int green, int blue, int steps)
...
@@ -142,9 +66,7 @@ void VL_FadeOut(int start, int end, int red, int green, int blue, int steps)
VL_SetPalette
(
&
palette2
[
0
][
0
]);
VL_SetPalette
(
&
palette2
[
0
][
0
]);
}
}
//
/* final color */
// final color
//
VL_FillPalette
(
red
,
green
,
blue
);
VL_FillPalette
(
red
,
green
,
blue
);
screenfaded
=
true
;
screenfaded
=
true
;
...
@@ -168,9 +90,7 @@ void VL_FadeIn(int start, int end, const byte *palette, int steps)
...
@@ -168,9 +90,7 @@ void VL_FadeIn(int start, int end, const byte *palette, int steps)
start
*=
3
;
start
*=
3
;
end
=
end
*
3
+
2
;
end
=
end
*
3
+
2
;
//
/* fade through intermediate frames */
// fade through intermediate frames
//
for
(
i
=
0
;
i
<
steps
;
i
++
)
for
(
i
=
0
;
i
<
steps
;
i
++
)
{
{
for
(
j
=
start
;
j
<=
end
;
j
++
)
for
(
j
=
start
;
j
<=
end
;
j
++
)
...
@@ -182,9 +102,7 @@ void VL_FadeIn(int start, int end, const byte *palette, int steps)
...
@@ -182,9 +102,7 @@ void VL_FadeIn(int start, int end, const byte *palette, int steps)
VL_SetPalette
(
&
palette2
[
0
][
0
]);
VL_SetPalette
(
&
palette2
[
0
][
0
]);
}
}
//
/* final color */
// final color
//
VL_SetPalette
(
palette
);
VL_SetPalette
(
palette
);
screenfaded
=
false
;
screenfaded
=
false
;
}
}
...
...
src/id_vh.h
View file @
ec83e834
...
@@ -31,8 +31,6 @@ void VW_MeasurePropString(char *string, word *width, word *height);
...
@@ -31,8 +31,6 @@ void VW_MeasurePropString(char *string, word *width, word *height);
void
VW_DrawPropString
(
char
*
string
);
void
VW_DrawPropString
(
char
*
string
);
boolean
FizzleFade
(
unsigned
xoffset
,
unsigned
yoffset
,
unsigned
width
,
unsigned
height
,
unsigned
frames
,
boolean
abortable
);
void
VL_FadeOut
(
int
start
,
int
end
,
int
red
,
int
green
,
int
blue
,
int
steps
);
void
VL_FadeOut
(
int
start
,
int
end
,
int
red
,
int
green
,
int
blue
,
int
steps
);
void
VL_FadeIn
(
int
start
,
int
end
,
const
byte
*
palette
,
int
steps
);
void
VL_FadeIn
(
int
start
,
int
end
,
const
byte
*
palette
,
int
steps
);
...
@@ -43,4 +41,14 @@ void VW_Bar(int x, int y, int width, int height, int color);
...
@@ -43,4 +41,14 @@ void VW_Bar(int x, int y, int width, int height, int color);
void
VW_Startup
();
void
VW_Startup
();
void
VW_Shutdown
();
void
VW_Shutdown
();
void
VL_FillPalette
(
int
red
,
int
green
,
int
blue
);
void
VW_Plot
(
int
x
,
int
y
,
int
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_Bar
(
int
x
,
int
y
,
int
width
,
int
height
,
int
color
);
void
VL_MemToScreen
(
const
byte
*
source
,
int
width
,
int
height
,
int
x
,
int
y
);
void
VL_DeModeXize
(
byte
*
buf
,
int
width
,
int
height
);
#endif
#endif
src/vi_comm.h
View file @
ec83e834
...
@@ -11,22 +11,12 @@ void VL_Shutdown();
...
@@ -11,22 +11,12 @@ void VL_Shutdown();
void
VL_WaitVBL
(
int
vbls
);
void
VL_WaitVBL
(
int
vbls
);
void
VW_UpdateScreen
();
void
VW_UpdateScreen
();
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
VW_Plot
(
int
x
,
int
y
,
int
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_Bar
(
int
x
,
int
y
,
int
width
,
int
height
,
int
color
);
void
VL_MemToScreen
(
const
byte
*
source
,
int
width
,
int
height
,
int
x
,
int
y
);
void
VL_MemToScreen
(
const
byte
*
source
,
int
width
,
int
height
,
int
x
,
int
y
);
void
VL_DeModeXize
(
byte
*
buf
,
int
width
,
int
height
);
/* ======================================================================== */
void
VL_DirectPlot
(
int
x1
,
int
y1
,
int
x2
,
int
y2
);
void
VL_DirectPlotFlush
();
void
VL_DirectUpdateRect
(
int
x
,
int
y
,
int
w
,
int
h
);
#define MaxPlayers 4
#define MaxPlayers 4
#define MaxJoys 2
#define MaxJoys 2
...
...
src/vi_null.c
View file @
ec83e834
...
@@ -105,14 +105,6 @@ void VL_GetPalette(byte *palette)
...
@@ -105,14 +105,6 @@ void VL_GetPalette(byte *palette)
{
{
}
}
void
VL_DirectPlotFlush
()
{
}
void
VL_DirectPlot
(
int
x1
,
int
y1
,
int
x2
,
int
y2
)
{
}
void
INL_Update
()
void
INL_Update
()
{
{
}
}
...
...
src/vi_sdl.c
View file @
ec83e834
...
@@ -172,22 +172,6 @@ void VL_GetPalette(byte *palette)
...
@@ -172,22 +172,6 @@ void VL_GetPalette(byte *palette)
}
}
}
}
void
VL_DirectPlot
(
int
x1
,
int
y1
,
int
x2
,
int
y2
)
{
*
(((
Uint8
*
)
surface
->
pixels
)
+
x1
+
y1
*
vwidth
)
=
*
(
gfxbuf
+
x2
+
y2
*
vwidth
);
}
void
VL_DirectPlotFlush
()
{
//SDL_UpdateRect(surface, 0, 0, 0, 0);
SDL_Flip
(
surface
);
}
void
VL_DirectUpdateRect
(
int
x
,
int
y
,
int
w
,
int
h
)
{
SDL_UpdateRect
(
surface
,
x
,
y
,
w
,
h
);
}
static
int
XKeysymToScancode
(
unsigned
int
keysym
)
static
int
XKeysymToScancode
(
unsigned
int
keysym
)
{
{
switch
(
keysym
)
{
switch
(
keysym
)
{
...
...
src/vi_svga.c
View file @
ec83e834
...
@@ -161,20 +161,6 @@ void VL_GetPalette(byte *palette)
...
@@ -161,20 +161,6 @@ void VL_GetPalette(byte *palette)
}
}
}
}
void
VL_DirectPlot
(
int
x1
,
int
y1
,
int
x2
,
int
y2
)
{
*
(
graphmem
+
x1
+
y1
*
vwidth
)
=
*
(
gfxbuf
+
x2
+
y2
*
vwidth
);
}
void
VL_DirectPlotFlush
()
{
}
void
VL_DirectUpdateRect
(
int
x
,
int
y
,
int
w
,
int
h
)
{
/* TODO: fixme for FizzleFade */
}
/*
/*
=============================================================================
=============================================================================
...
...
src/vi_xlib.c
View file @
ec83e834
...
@@ -506,36 +506,6 @@ void Quit(char *error)
...
@@ -506,36 +506,6 @@ void Quit(char *error)
exit
(
EXIT_SUCCESS
);
exit
(
EXIT_SUCCESS
);
}
}
void
VL_DirectPlot
(
int
x1
,
int
y1
,
int
x2
,
int
y2
)
{
if
(
indexmode
)
{
XSetForeground
(
dpy
,
gc
,
*
(
gfxbuf
+
x1
+
y1
*
320
));
XDrawPoint
(
dpy
,
win
,
gc
,
x2
,
y2
);
}
else
{
#if 0
unsigned char pix = *(gfxbuf + x1 + y1 * 320);
XColor c;
c.pixel = 0;
c.flags = DoRed|DoGreen|DoBlue;
c.red = cpal[pix*3+0] << 10;
c.green = cpal[pix*3+1] << 10;
c.blue = cpal[pix*3+2] << 10;
XAllocColor(dpy, cmap, &c);
XSetForeground(dpy, gc, c.pixel);
XDrawPoint(dpy, win, gc, x2, y2);
#endif
}
}
void
VL_DirectPlotFlush
()
{
}
void
VL_DirectUpdateRect
(
int
x
,
int
y
,
int
w
,
int
h
)
{
/* TODO: fixme for FizzleFade */
}
static
int
XKeysymToScancode
(
KeySym
keysym
)
static
int
XKeysymToScancode
(
KeySym
keysym
)
{
{
switch
(
keysym
)
{
switch
(
keysym
)
{
...
...
src/wl_act2.c
View file @
ec83e834
...
@@ -2443,11 +2443,13 @@ void A_StartDeathCam(objtype *ob)
...
@@ -2443,11 +2443,13 @@ void A_StartDeathCam(objtype *ob)
}
}
gamestate
.
victoryflag
=
true
;
gamestate
.
victoryflag
=
true
;
VW_Bar
(
0
,
0
,
320
,
200
-
STATUSLINES
,
127
);
VW_Bar
(
0
,
0
,
320
,
200
-
STATUSLINES
,
127
);
FizzleFade
(
0
,
0
,
320
,
200
-
STATUSLINES
,
70
,
false
);
CA_UpLevel
();
/* TODO: fizzlefaze was here */
CacheLump
(
LEVELEND_LUMP_START
,
LEVELEND_LUMP_END
);
/* FizzleFade(0, 0, 320, 200-STATUSLINES, 70, false); */
CA_UpLevel
();
CacheLump
(
LEVELEND_LUMP_START
,
LEVELEND_LUMP_END
);
Write
(
0
,
7
,
STR_SEEAGAIN
);
Write
(
0
,
7
,
STR_SEEAGAIN
);
...
@@ -2496,9 +2498,8 @@ void A_StartDeathCam(objtype *ob)
...
@@ -2496,9 +2498,8 @@ void A_StartDeathCam(objtype *ob)
//
//
// go back to the game
// go back to the game
//
//
DrawPlayBorder
();
DrawPlayBorder
();
fizzlein
=
true
;
switch
(
ob
->
obclass
)
switch
(
ob
->
obclass
)
{
{
case
schabbobj
:
case
schabbobj
:
...
...
src/wl_def.h
View file @
ec83e834
...
@@ -718,7 +718,7 @@ int WolfMain(int argc, char *argv[]);
...
@@ -718,7 +718,7 @@ int WolfMain(int argc, char *argv[]);
*/
*/
extern
boolean
ingame
,
fizzlein
;
extern
boolean
ingame
;
extern
gametype
gamestate
;
extern
gametype
gamestate
;
extern
int
doornum
;
extern
int
doornum
;
...
...
src/wl_draw.c
View file @
ec83e834
...
@@ -626,14 +626,17 @@ void ThreeDRefresh()
...
@@ -626,14 +626,17 @@ void ThreeDRefresh()
DrawPlayerWeapon
();
/* draw player's hands */
DrawPlayerWeapon
();
/* draw player's hands */
/* show screen and time last cycle */
/* show screen and time last cycle */
/* TODO: fizzlefaze was here */
/*
if (fizzlein)
if (fizzlein)
{
{
FizzleFade(xoffset, yoffset, viewwidth, viewheight, 20, false);
FizzleFade(xoffset, yoffset, viewwidth, viewheight, 20, false);
fizzlein = false;
fizzlein = false;
lasttimecount
=
0
;
/* don't make a big tic count */
lasttimecount = 0;
set_TimeCount(0);
set_TimeCount(0);
}
}
*/
VW_UpdateScreen
();
VW_UpdateScreen
();
frameon
++
;
frameon
++
;
...
...
src/wl_game.c
View file @
ec83e834
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
=============================================================================
=============================================================================
*/
*/
boolean
ingame
,
fizzlein
;
boolean
ingame
;
gametype
gamestate
;
gametype
gamestate
;
long
spearx
,
speary
;
long
spearx
,
speary
;
...
@@ -771,7 +771,6 @@ void RecordDemo()
...
@@ -771,7 +771,6 @@ void RecordDemo()
SetupGameLevel
();
SetupGameLevel
();
StartMusic
();
StartMusic
();
fizzlein
=
true
;
PlayLoop
();
PlayLoop
();
...
@@ -830,7 +829,6 @@ void PlayDemo(int demonumber)
...
@@ -830,7 +829,6 @@ void PlayDemo(int demonumber)
SetupGameLevel
();
SetupGameLevel
();
StartMusic
();
StartMusic
();
fizzlein
=
true
;
PlayLoop
();
PlayLoop
();
...
@@ -876,7 +874,6 @@ int PlayDemoFromFile(char *demoname)
...
@@ -876,7 +874,6 @@ int PlayDemoFromFile(char *demoname)
SetupGameLevel
();
SetupGameLevel
();
StartMusic
();
StartMusic
();
fizzlein
=
true
;
PlayLoop
();
PlayLoop
();
...
@@ -987,7 +984,9 @@ void Died()
...
@@ -987,7 +984,9 @@ void Died()
VL_Bar
(
xoffset
,
yoffset
,
viewwidth
,
viewheight
,
4
);
VL_Bar
(
xoffset
,
yoffset
,
viewwidth
,
viewheight
,
4
);
FizzleFade
(
xoffset
,
yoffset
,
viewwidth
,
viewheight
,
70
,
false
);
/* TODO: fizzlefade was here */
/* FizzleFade(xoffset, yoffset, viewwidth, viewheight, 70, false); */
IN_ClearKeysDown
();
IN_ClearKeysDown
();
IN_UserInput
(
140
);
IN_UserInput
(
140
);
...
@@ -1057,13 +1056,12 @@ restartgame:
...
@@ -1057,13 +1056,12 @@ restartgame:
ingame
=
true
;
ingame
=
true
;
StartMusic
();
StartMusic
();
if
(
!
died
)
if
(
!
died
)
PreloadGraphics
();
PreloadGraphics
();
else
{
else
fizzlein
=
true
;
died
=
false
;
died
=
false
;
}
//fizzlein = true;
DrawLevel
();
DrawLevel
();
#ifdef SPEAR
#ifdef SPEAR
...
...
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