Commit 40ed398f authored by Steven Fuller's avatar Steven Fuller

Modified FizzleFade parms

parent 53e27e49
......@@ -545,14 +545,14 @@ boolean IN_UserInput(longword delay)
{
longword lasttime;
lasttime = TimeCount;
lasttime = get_TimeCount();
IN_StartAck ();
do
{
if (IN_CheckAck())
return true;
} while (TimeCount - lasttime < delay);
return(false);
} while ( (get_TimeCount() - lasttime) < delay );
return false;
}
//===========================================================================
......
......@@ -364,7 +364,7 @@ boolean US_LineInput(int x,int y,char *buf,char *def,boolean escok,
cursormoved = redraw = true;
cursorvis = done = false;
lasttime = TimeCount;
lasttime = get_TimeCount();
LastASCII = key_None;
LastScan = sc_None;
......@@ -488,13 +488,13 @@ boolean US_LineInput(int x,int y,char *buf,char *def,boolean escok,
if (cursormoved)
{
cursorvis = false;
lasttime = TimeCount - TickBase;
lasttime = get_TimeCount() - TickBase;
cursormoved = false;
}
if (TimeCount - lasttime > TickBase / 2)
if ( (get_TimeCount() - lasttime) > (TickBase / 2) )
{
lasttime = TimeCount;
lasttime = get_TimeCount();
cursorvis ^= true;
}
......
......@@ -222,8 +222,7 @@ void LoadLatchMem(void)
===================
*/
boolean FizzleFade (unsigned source, unsigned dest,
unsigned width,unsigned height, unsigned frames, boolean abortable)
boolean FizzleFade(byte *source, unsigned width,unsigned height, unsigned frames, boolean abortable)
{
int pixperframe;
unsigned drawofs,pagedelta;
......@@ -231,14 +230,15 @@ boolean FizzleFade (unsigned source, unsigned dest,
unsigned x,y,p,frame;
long rndval;
pagedelta = dest-source;
rndval = 1;
y = 0;
pixperframe = 64000/frames;
IN_StartAck ();
TimeCount=frame=0;
frame=0;
set_TimeCount(0);
do {
if (abortable && IN_CheckAck ())
return true;
......@@ -292,7 +292,6 @@ noxor:
}
frame++;
while (TimeCount<frame)
;
while (get_TimeCount() < frame) ;
} while (1);
}
......@@ -69,8 +69,7 @@ void VW_MeasurePropString(char *string, word *width, word *height);
void LatchDrawPic (unsigned x, unsigned y, unsigned picnum);
void LoadLatchMem (void);
boolean FizzleFade (unsigned source, unsigned dest,
unsigned width,unsigned height, unsigned frames,boolean abortable);
boolean FizzleFade (byte *source, unsigned width,unsigned height, unsigned frames,boolean abortable);
#define NUMLATCHPICS 100
extern unsigned latchpics[NUMLATCHPICS];
......
......@@ -3776,7 +3776,7 @@ void A_StartDeathCam (objtype *ob)
gamestate.victoryflag = true;
VW_Bar (0,0,320,200-STATUSLINES,127);
FizzleFade(bufferofs,displayofs,320,200-STATUSLINES,70,false);
FizzleFade(gfxbuf, 320, 200-STATUSLINES,70,false);
CA_UpLevel ();
CacheLump(LEVELEND_LUMP_START,LEVELEND_LUMP_END);
......
......@@ -720,7 +720,7 @@ void ThreeDRefresh (void)
//
if (fizzlein)
{
FizzleFade(xoffset, yoffset, viewwidth,viewheight,20,false);
FizzleFade(gfxbuf, viewwidth,viewheight,20,false);
fizzlein = false;
lasttimecount = 0; /* don't make a big tic count */
......
......@@ -1149,7 +1149,7 @@ void Died (void)
VW_Bar (0,0,viewwidth,viewheight,4);
IN_ClearKeysDown ();
FizzleFade(bufferofs,displayofs+screenofs,viewwidth,viewheight,70,false);
FizzleFade(gfxbuf, viewwidth,viewheight,70,false);
IN_UserInput(100);
SD_WaitSoundDone ();
......
......@@ -63,8 +63,8 @@ void EndSpear(void)
US_CPrint (STR_ENDGAME2);
VW_UpdateScreen ();
IN_StartAck ();
TimeCount = 0;
while (!IN_CheckAck () && TimeCount < 700);
set_TimeCount(0);
while ( !IN_CheckAck () && (get_TimeCount() < 700) );
PrintX = 0;
PrintY = 180;
......@@ -73,8 +73,8 @@ void EndSpear(void)
US_CPrint (STR_ENDGAME4);
VW_UpdateScreen ();
IN_StartAck ();
TimeCount = 0;
while (!IN_CheckAck () && TimeCount < 700);
set_TimeCount(0);
while ( !IN_CheckAck () && (get_TimeCount() < 700) );
VW_FadeOut ();
......@@ -391,13 +391,12 @@ void BJ_Breathe(void)
static int which=0,max=10;
int pics[2]={L_GUYPIC,L_GUY2PIC};
if (TimeCount>max)
if (get_TimeCount() > max)
{
which^=1;
VWB_DrawPic(0,16,pics[which]);
VW_UpdateScreen();
TimeCount=0;
set_TimeCount(0);
max=35;
}
}
......@@ -892,7 +891,7 @@ void LevelCompleted (void)
DrawScore();
VW_UpdateScreen();
TimeCount=0;
set_TimeCount(0);
IN_StartAck();
while(!IN_CheckAck())
BJ_Breathe();
......
......@@ -700,7 +700,7 @@ int CP_CheckQuick(unsigned scancode)
if (loadedgame)
playstate = ex_abort;
lasttimecount = TimeCount;
lasttimecount = get_TimeCount();
......@@ -771,7 +771,7 @@ int CP_CheckQuick(unsigned scancode)
if (loadedgame)
playstate = ex_abort;
lasttimecount = TimeCount;
lasttimecount = get_TimeCount();
#ifndef SPEAR
UNCACHEGRCHUNK(C_CURSOR1PIC);
......@@ -2148,7 +2148,9 @@ void EnterCtrlData(int index,CustomCtrls *cust,void (*DrawRtn)(int),void (*Print
if ((ci.button0|ci.button1|ci.button2|ci.button3)||
((type==KEYBOARDBTNS||type==KEYBOARDMOVE) && LastScan==sc_Enter))
{
tick=TimeCount=picked=0;
tick = picked = 0;
set_TimeCount(0);
SETFONTCOLOR(0,TEXTCOLOR);
do
......@@ -2162,7 +2164,7 @@ void EnterCtrlData(int index,CustomCtrls *cust,void (*DrawRtn)(int),void (*Print
//
// FLASH CURSOR
//
if (TimeCount>10)
if (get_TimeCount() >10)
{
switch(tick)
{
......@@ -2175,7 +2177,7 @@ void EnterCtrlData(int index,CustomCtrls *cust,void (*DrawRtn)(int),void (*Print
SD_PlaySound(HITWALLSND);
}
tick^=1;
TimeCount=0;
set_TimeCount(0);
VW_UpdateScreen();
}
......@@ -3053,7 +3055,7 @@ int HandleMenu(CP_iteminfo *item_i,CP_itemtype *items,void (*routine)(int w))
shape=C_CURSOR1PIC;
timer=8;
exit=0;
TimeCount=0;
set_TimeCount(0);
IN_ClearKeysDown();
......@@ -3062,9 +3064,9 @@ int HandleMenu(CP_iteminfo *item_i,CP_itemtype *items,void (*routine)(int w))
//
// CHANGE GUN SHAPE
//
if (TimeCount>timer)
if (get_TimeCount() > timer)
{
TimeCount=0;
set_TimeCount(0);
if (shape==C_CURSOR1PIC)
{
shape=C_CURSOR2PIC;
......@@ -3288,8 +3290,8 @@ void DrawHalfStep(int x,int y)
VWB_DrawPic(x,y,C_CURSOR1PIC);
VW_UpdateScreen();
SD_PlaySound(MOVEGUN1SND);
TimeCount=0;
while(TimeCount<8);
set_TimeCount(0);
while(get_TimeCount() < 8);
}
......@@ -3325,12 +3327,10 @@ void TicDelay(int count)
{
ControlInfo ci;
TimeCount=0;
do
{
set_TimeCount(0);
do {
ReadAnyControl(&ci);
} while(TimeCount<count && ci.dir!=dir_None);
} while( (get_TimeCount() < count) && (ci.dir!=dir_None) );
}
......@@ -3439,11 +3439,11 @@ int Confirm(char *string)
//
x=PrintX;
y=PrintY;
TimeCount=0;
set_TimeCount(0);
do
{
if (TimeCount>=10)
if (get_TimeCount() >= 10)
{
switch(tick)
{
......@@ -3457,7 +3457,7 @@ int Confirm(char *string)
}
VW_UpdateScreen();
tick^=1;
TimeCount=0;
set_TimeCount(0);
}
#ifndef SPEAR
......
......@@ -428,9 +428,8 @@ void PollControls (void)
//
if (demoplayback)
{
while (TimeCount<lasttimecount+DEMOTICS)
;
TimeCount = lasttimecount + DEMOTICS;
while ( get_TimeCount() < (lasttimecount+DEMOTICS) ) ;
set_TimeCount(lasttimecount + DEMOTICS);
lasttimecount += DEMOTICS;
tics = DEMOTICS;
}
......@@ -439,9 +438,8 @@ void PollControls (void)
//
// take DEMOTICS or more tics, and modify Timecount to reflect time taken
//
while (TimeCount<lasttimecount+DEMOTICS)
;
TimeCount = lasttimecount + DEMOTICS;
while ( get_TimeCount() < (lasttimecount+DEMOTICS) ) ;
set_TimeCount(lasttimecount + DEMOTICS);
lasttimecount += DEMOTICS;
tics = DEMOTICS;
}
......@@ -562,7 +560,6 @@ void PollControls (void)
void CenterWindow(word w,word h)
{
FixOfs ();
US_DrawWindow(((MAXX / 8) - w) / 2,((MAXY / 8) - h) / 2,w,h);
}
......@@ -767,7 +764,7 @@ void CheckKeys (void)
}
if (loadedgame)
playstate = ex_abort;
lasttimecount = TimeCount;
lasttimecount = get_TimeCount();
return;
}
......@@ -780,7 +777,7 @@ void CheckKeys (void)
fontnumber=0;
SETFONTCOLOR(0,15);
DebugKeys();
lasttimecount = TimeCount;
lasttimecount = get_TimeCount();
return;
}
......@@ -1317,7 +1314,9 @@ void PlayLoop (void)
int give;
int helmetangle;
playstate = TimeCount = lasttimecount = 0;
playstate = lasttimecount = 0;
set_TimeCount(0);
frameon = 0;
anglefrac = 0;
facecount = 0;
......@@ -1369,7 +1368,7 @@ void PlayLoop (void)
}
#endif
gamestate.TimeCount+=tics;
gamestate.TimeCount += tics;
SD_Poll ();
UpdateSoundLoc(); // JAB
......@@ -1385,7 +1384,7 @@ void PlayLoop (void)
if (singlestep)
{
VW_WaitVBL(14);
lasttimecount = TimeCount;
lasttimecount = get_TimeCount();
}
if (extravbls)
VW_WaitVBL(extravbls);
......
......@@ -163,9 +163,8 @@ void TimedPicCommand (void)
//
// wait for time
//
TimeCount = 0;
while (TimeCount < picdelay)
;
set_TimeCount(0);
while (get_TimeCount() < picdelay) ;
//
// draw pic
......
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