Commit ec83e834 authored by Steven Fuller's avatar Steven Fuller

Removed FizzleFade

parent 761d01e5
......@@ -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
B I - add mouse 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:
P I - fix or remove fizzle fade
- Removed [nice, but very hacky effect]
------------------------------------------------------------------------------
Control Menu:
* TODO
......@@ -62,24 +65,15 @@ code, it really needs to be cleaned up
in the right place
* change the current parameter handling code to something like getopt
* 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)
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
* reduce code duplication in the vi_* files.
* deathcam went by too fast, same with the spear of destiny ending animation
- probably due to waiting for sounds to finish
* split wl_draw into two files (draw independent, draw dependent)
* when window loses focus, it should clear the keys
* rename visable to visible
* create 'sound channels' with priority.. ie a door can only make one sound
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:
8 bytes: WOLF3D, 0, 0
......
......@@ -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)
{
byte pal[768];
......@@ -119,9 +45,7 @@ void VL_FadeOut(int start, int end, int red, int green, int blue, int steps)
VL_GetPalette(&palette1[0][0]);
memcpy(palette2,palette1,768);
//
// fade through intermediate frames
//
/* fade through intermediate frames */
for (i = 0; i < steps; i++)
{
origptr = &palette1[start][0];
......@@ -142,9 +66,7 @@ void VL_FadeOut(int start, int end, int red, int green, int blue, int steps)
VL_SetPalette(&palette2[0][0]);
}
//
// final color
//
/* final color */
VL_FillPalette(red, green, blue);
screenfaded = true;
......@@ -168,9 +90,7 @@ void VL_FadeIn(int start, int end, const byte *palette, int steps)
start *= 3;
end = end*3+2;
//
// fade through intermediate frames
//
/* fade through intermediate frames */
for (i = 0; i < steps; i++)
{
for (j = start;j <= end; j++)
......@@ -182,9 +102,7 @@ void VL_FadeIn(int start, int end, const byte *palette, int steps)
VL_SetPalette(&palette2[0][0]);
}
//
// final color
//
/* final color */
VL_SetPalette(palette);
screenfaded = false;
}
......
......@@ -31,8 +31,6 @@ void VW_MeasurePropString(char *string, word *width, word *height);
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_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);
void VW_Startup();
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
......@@ -11,22 +11,12 @@ void VL_Shutdown();
void VL_WaitVBL(int vbls);
void VW_UpdateScreen();
void VL_FillPalette(int red, int green, int blue);
void VL_SetPalette(const 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_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 MaxJoys 2
......
......@@ -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()
{
}
......
......@@ -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)
{
switch (keysym) {
......
......@@ -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 */
}
/*
=============================================================================
......
......@@ -506,36 +506,6 @@ void Quit(char *error)
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)
{
switch (keysym) {
......
......@@ -2443,11 +2443,13 @@ void A_StartDeathCam(objtype *ob)
}
gamestate.victoryflag = true;
VW_Bar(0, 0, 320,200-STATUSLINES,127);
FizzleFade(0, 0, 320, 200-STATUSLINES, 70, false);
VW_Bar(0, 0, 320, 200-STATUSLINES, 127);
/* TODO: fizzlefaze was here */
/* FizzleFade(0, 0, 320, 200-STATUSLINES, 70, false); */
CA_UpLevel ();
CacheLump(LEVELEND_LUMP_START,LEVELEND_LUMP_END);
CA_UpLevel();
CacheLump(LEVELEND_LUMP_START, LEVELEND_LUMP_END);
Write(0,7,STR_SEEAGAIN);
......@@ -2496,9 +2498,8 @@ void A_StartDeathCam(objtype *ob)
//
// go back to the game
//
DrawPlayBorder ();
DrawPlayBorder();
fizzlein = true;
switch (ob->obclass)
{
case schabbobj:
......
......@@ -718,9 +718,9 @@ int WolfMain(int argc, char *argv[]);
*/
extern boolean ingame,fizzlein;
extern boolean ingame;
extern gametype gamestate;
extern int doornum;
extern int doornum;
extern char demoname[13];
......
......@@ -626,14 +626,17 @@ void ThreeDRefresh()
DrawPlayerWeapon(); /* draw player's hands */
/* show screen and time last cycle */
/* TODO: fizzlefaze was here */
/*
if (fizzlein)
{
FizzleFade(xoffset, yoffset, viewwidth, viewheight, 20, false);
fizzlein = false;
lasttimecount = 0; /* don't make a big tic count */
lasttimecount = 0;
set_TimeCount(0);
}
*/
VW_UpdateScreen();
frameon++;
......
......@@ -8,7 +8,7 @@
=============================================================================
*/
boolean ingame,fizzlein;
boolean ingame;
gametype gamestate;
long spearx,speary;
......@@ -771,7 +771,6 @@ void RecordDemo()
SetupGameLevel();
StartMusic();
fizzlein = true;
PlayLoop();
......@@ -830,7 +829,6 @@ void PlayDemo(int demonumber)
SetupGameLevel();
StartMusic();
fizzlein = true;
PlayLoop();
......@@ -876,7 +874,6 @@ int PlayDemoFromFile(char *demoname)
SetupGameLevel();
StartMusic();
fizzlein = true;
PlayLoop();
......@@ -987,7 +984,9 @@ void Died()
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_UserInput(140);
......@@ -1057,13 +1056,12 @@ restartgame:
ingame = true;
StartMusic();
if (!died)
PreloadGraphics();
else {
fizzlein = true;
else
died = false;
}
//fizzlein = true;
DrawLevel();
#ifdef SPEAR
......
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