Commit 328d9220 authored by Steven Fuller's avatar Steven Fuller

Temp checkin.

id_vh.c, vi_*: added VL_DirectPlotFlush (used by FizzleFade) to just update
the screen

wl_act2.c, wl_def.h, wl_agent.c, wl_act3.h, wl_act3.c: moved all statetype
declarations to wl_act3.c/wl_act3.h

wl_act2.c, wl_state.c: removed some UPLOAD ifndefs (from when the older wl1
sound header was used)

wl_menu.c: fixed the music functions again (no more trying to free null
chunk warnings)

rest: most likely whitespace changes
parent 60d51311
...@@ -7,7 +7,7 @@ CFLAGS = -g -Wall ...@@ -7,7 +7,7 @@ CFLAGS = -g -Wall
#CFLAGS = -Os -Wall -fomit-frame-pointer -ffast-math -mpentiumpro -mcpu=pentiumpro -march=pentiumpro #CFLAGS = -Os -Wall -fomit-frame-pointer -ffast-math -mpentiumpro -mcpu=pentiumpro -march=pentiumpro
OBJS = objs.o misc.o id_ca.o id_vh.o id_us.o \ OBJS = objs.o misc.o id_ca.o id_vh.o id_us.o \
wl_act1.o wl_act2.o wl_agent.o wl_game.o \ wl_act1.o wl_act2.o wl_act3.o wl_agent.o wl_game.o \
wl_inter.o wl_menu.o wl_play.o wl_state.o wl_text.o wl_main.o \ wl_inter.o wl_menu.o wl_play.o wl_state.o wl_text.o wl_main.o \
wl_debug.o gfxsave.o wl_debug.o gfxsave.o
ROBJS = wl_draw.o ROBJS = wl_draw.o
......
...@@ -20,7 +20,9 @@ SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + chunk]); ...@@ -20,7 +20,9 @@ SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + chunk]);
=> =>
SD_StartMusic(chunk); SD_StartMusic(chunk);
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
* serialize reads/writes
* fix fix fix different size stuff * fix fix fix different size stuff
works alright at some res, but breaks on most others currently
* add ylookup * add ylookup
* remove farmapylookup? * remove farmapylookup?
* would be nice if Quit() used vsnprintf, etc * would be nice if Quit() used vsnprintf, etc
......
...@@ -49,6 +49,7 @@ boolean FizzleFade(unsigned xx, unsigned yy, unsigned width, unsigned height, un ...@@ -49,6 +49,7 @@ boolean FizzleFade(unsigned xx, unsigned yy, unsigned width, unsigned height, un
int pixperframe; int pixperframe;
unsigned x, y, p, frame; unsigned x, y, p, frame;
long rndval; long rndval;
int retr;
rndval = 1; rndval = 1;
pixperframe = 64000/frames; pixperframe = 64000/frames;
...@@ -60,10 +61,13 @@ boolean FizzleFade(unsigned xx, unsigned yy, unsigned width, unsigned height, un ...@@ -60,10 +61,13 @@ boolean FizzleFade(unsigned xx, unsigned yy, unsigned width, unsigned height, un
if (vwidth != 320) if (vwidth != 320)
return false; return false;
retr = -1;
do { do {
if (abortable && IN_CheckAck()) if (abortable && IN_CheckAck())
return true; retr = true;
else
for (p = 0; p < pixperframe; p++) { for (p = 0; p < pixperframe; p++) {
y = (rndval & 0x00FF) - 1; y = (rndval & 0x00FF) - 1;
x = (rndval & 0x00FFFF00) >> 8; x = (rndval & 0x00FFFF00) >> 8;
...@@ -79,13 +83,22 @@ boolean FizzleFade(unsigned xx, unsigned yy, unsigned width, unsigned height, un ...@@ -79,13 +83,22 @@ boolean FizzleFade(unsigned xx, unsigned yy, unsigned width, unsigned height, un
VL_DirectPlot(xx+x, yy+y, xx+x, yy+y); VL_DirectPlot(xx+x, yy+y, xx+x, yy+y);
if (rndval == 1) /* entire sequence has been completed */ if (rndval == 1) {
return false; /* entire sequence has been completed */
retr = false;
break;
}
} }
VL_DirectPlotFlush();
frame++; frame++;
while (get_TimeCount() < frame); while (get_TimeCount() < frame);
} while (1); } 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)
......
...@@ -25,7 +25,7 @@ void VL_MemToScreen(const byte *source, int width, int height, int x, int y); ...@@ -25,7 +25,7 @@ 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_DeModeXize(byte *buf, int width, int height);
void VL_DirectPlot(int x1, int y1, int x2, int y2); void VL_DirectPlot(int x1, int y1, int x2, int y2);
void VL_DirectPlotFlush();
#define MaxPlayers 4 #define MaxPlayers 4
#define MaxJoys 2 #define MaxJoys 2
......
...@@ -143,9 +143,6 @@ void VL_SetPalette(const byte *palette) ...@@ -143,9 +143,6 @@ void VL_SetPalette(const byte *palette)
SDL_SetColors(surface, colors, 0, 256); SDL_SetColors(surface, colors, 0, 256);
} }
//===========================================================================
/* /*
================= =================
= =
...@@ -168,7 +165,11 @@ void VL_GetPalette(byte *palette) ...@@ -168,7 +165,11 @@ void VL_GetPalette(byte *palette)
void VL_DirectPlot(int x1, int y1, int x2, int y2) void VL_DirectPlot(int x1, int y1, int x2, int y2)
{ {
*(((Uint8 *)surface->pixels) + x1 + y1 * vwidth) = *(gfxbuf + x2 + y2 * vwidth); *(((Uint8 *)surface->pixels) + x1 + y1 * vwidth) = *(gfxbuf + x2 + y2 * vwidth);
//SDL_UpdateRect(surface, x1,y1,x1,y1); }
void VL_DirectPlotFlush()
{
SDL_UpdateRect(surface, 0, 0, 0, 0);
} }
/* /*
......
...@@ -143,6 +143,10 @@ void VL_DirectPlot(int x1, int y1, int x2, int y2) ...@@ -143,6 +143,10 @@ void VL_DirectPlot(int x1, int y1, int x2, int y2)
*(graph_mem + x1 + y1 * 320) = *(gfxbuf + x2 + y2 * 320); *(graph_mem + x1 + y1 * 320) = *(gfxbuf + x2 + y2 * 320);
} }
void VL_DirectPlotFlush()
{
}
/* /*
============================================================================= =============================================================================
......
...@@ -526,6 +526,10 @@ void VL_DirectPlot(int x1, int y1, int x2, int y2) ...@@ -526,6 +526,10 @@ void VL_DirectPlot(int x1, int y1, int x2, int y2)
} }
} }
void VL_DirectPlotFlush()
{
}
/* /*
============================================================================= =============================================================================
......
...@@ -137,70 +137,6 @@ int starthitpoints[4][NUMENEMIES] = ...@@ -137,70 +137,6 @@ int starthitpoints[4][NUMENEMIES] =
}} }}
; ;
void A_StartDeathCam (objtype *ob);
void T_Path (objtype *ob);
void T_Shoot (objtype *ob);
void T_Bite (objtype *ob);
void T_DogChase (objtype *ob);
void T_Chase (objtype *ob);
void T_Projectile (objtype *ob);
void T_Stand (objtype *ob);
extern statetype s_rocket;
extern statetype s_smoke1;
extern statetype s_smoke2;
extern statetype s_smoke3;
extern statetype s_smoke4;
extern statetype s_boom2;
extern statetype s_boom3;
void A_Smoke (objtype *ob);
statetype s_rocket = {true,SPR_ROCKET_1,3,T_Projectile,A_Smoke,&s_rocket};
statetype s_smoke1 = {false,SPR_SMOKE_1,3,NULL,NULL,&s_smoke2};
statetype s_smoke2 = {false,SPR_SMOKE_2,3,NULL,NULL,&s_smoke3};
statetype s_smoke3 = {false,SPR_SMOKE_3,3,NULL,NULL,&s_smoke4};
statetype s_smoke4 = {false,SPR_SMOKE_4,3,NULL,NULL,NULL};
statetype s_boom1 = {false,SPR_BOOM_1,6,NULL,NULL,&s_boom2};
statetype s_boom2 = {false,SPR_BOOM_2,6,NULL,NULL,&s_boom3};
statetype s_boom3 = {false,SPR_BOOM_3,6,NULL,NULL,NULL};
#ifdef SPEAR
extern statetype s_hrocket;
extern statetype s_hsmoke1;
extern statetype s_hsmoke2;
extern statetype s_hsmoke3;
extern statetype s_hsmoke4;
extern statetype s_hboom2;
extern statetype s_hboom3;
void A_Smoke (objtype *ob);
statetype s_hrocket = {true,SPR_HROCKET_1,3,T_Projectile,A_Smoke,&s_hrocket};
statetype s_hsmoke1 = {false,SPR_HSMOKE_1,3,NULL,NULL,&s_hsmoke2};
statetype s_hsmoke2 = {false,SPR_HSMOKE_2,3,NULL,NULL,&s_hsmoke3};
statetype s_hsmoke3 = {false,SPR_HSMOKE_3,3,NULL,NULL,&s_hsmoke4};
statetype s_hsmoke4 = {false,SPR_HSMOKE_4,3,NULL,NULL,NULL};
statetype s_hboom1 = {false,SPR_HBOOM_1,6,NULL,NULL,&s_hboom2};
statetype s_hboom2 = {false,SPR_HBOOM_2,6,NULL,NULL,&s_hboom3};
statetype s_hboom3 = {false,SPR_HBOOM_3,6,NULL,NULL,NULL};
#endif
void T_Schabb(objtype *ob);
void T_SchabbThrow(objtype *ob);
void T_Fake(objtype *ob);
void T_FakeFire(objtype *ob);
void T_Ghosts(objtype *ob);
void A_Slurpie(objtype *ob);
void A_HitlerMorph(objtype *ob);
void A_MechaSound(objtype *ob);
/* /*
================= =================
= =
...@@ -209,9 +145,9 @@ void A_MechaSound(objtype *ob); ...@@ -209,9 +145,9 @@ void A_MechaSound(objtype *ob);
================= =================
*/ */
void A_Smoke (objtype *ob) void A_Smoke(objtype *ob)
{ {
GetNewActor (); GetNewActor();
#ifdef SPEAR #ifdef SPEAR
if (ob->obclass == hrocketobj) if (ob->obclass == hrocketobj)
new->state = &s_hsmoke1; new->state = &s_hsmoke1;
...@@ -242,10 +178,10 @@ void A_Smoke (objtype *ob) ...@@ -242,10 +178,10 @@ void A_Smoke (objtype *ob)
#define PROJSIZE 0x2000 #define PROJSIZE 0x2000
boolean ProjectileTryMove (objtype *ob) boolean ProjectileTryMove(objtype *ob)
{ {
int xl,yl,xh,yh,x,y; int xl,yl,xh,yh,x,y;
objtype *check; objtype *check;
xl = (ob->x-PROJSIZE) >>TILESHIFT; xl = (ob->x-PROJSIZE) >>TILESHIFT;
yl = (ob->y-PROJSIZE) >>TILESHIFT; yl = (ob->y-PROJSIZE) >>TILESHIFT;
...@@ -254,13 +190,13 @@ boolean ProjectileTryMove (objtype *ob) ...@@ -254,13 +190,13 @@ boolean ProjectileTryMove (objtype *ob)
yh = (ob->y+PROJSIZE) >>TILESHIFT; yh = (ob->y+PROJSIZE) >>TILESHIFT;
/* check for solid walls */ /* check for solid walls */
for (y=yl;y<=yh;y++) for (y=yl;y<=yh;y++) {
for (x=xl;x<=xh;x++) for (x=xl;x<=xh;x++) {
{
check = actorat[x][y]; check = actorat[x][y];
if (check && check<objlist) if (check && check < objlist)
return false; return false;
} }
}
return true; return true;
} }
...@@ -275,7 +211,7 @@ boolean ProjectileTryMove (objtype *ob) ...@@ -275,7 +211,7 @@ boolean ProjectileTryMove (objtype *ob)
================= =================
*/ */
void T_Projectile (objtype *ob) void T_Projectile(objtype *ob)
{ {
long deltax,deltay; long deltax,deltay;
int damage; int damage;
...@@ -297,9 +233,8 @@ void T_Projectile (objtype *ob) ...@@ -297,9 +233,8 @@ void T_Projectile (objtype *ob)
deltax = labs(ob->x - player->x); deltax = labs(ob->x - player->x);
deltay = labs(ob->y - player->y); deltay = labs(ob->y - player->y);
if (!ProjectileTryMove (ob)) if (!ProjectileTryMove(ob))
{ {
#ifndef UPLOAD
if (ob->obclass == rocketobj) if (ob->obclass == rocketobj)
{ {
PlaySoundLocActor(MISSILEHITSND,ob); PlaySoundLocActor(MISSILEHITSND,ob);
...@@ -313,7 +248,6 @@ void T_Projectile (objtype *ob) ...@@ -313,7 +248,6 @@ void T_Projectile (objtype *ob)
} }
#endif #endif
else else
#endif
ob->state = NULL; // mark for removal ob->state = NULL; // mark for removal
return; return;
...@@ -338,7 +272,7 @@ void T_Projectile (objtype *ob) ...@@ -338,7 +272,7 @@ void T_Projectile (objtype *ob)
return; return;
} }
TakeDamage (damage,ob); TakeDamage(damage, ob);
ob->state = NULL; // mark for removal ob->state = NULL; // mark for removal
return; return;
} }
...@@ -356,462 +290,6 @@ void T_Projectile (objtype *ob) ...@@ -356,462 +290,6 @@ void T_Projectile (objtype *ob)
============================================================================= =============================================================================
*/ */
//
// guards
//
extern statetype s_grdstand;
extern statetype s_grdpath1;
extern statetype s_grdpath1s;
extern statetype s_grdpath2;
extern statetype s_grdpath3;
extern statetype s_grdpath3s;
extern statetype s_grdpath4;
extern statetype s_grdpain;
extern statetype s_grdpain1;
extern statetype s_grdgiveup;
extern statetype s_grdshoot1;
extern statetype s_grdshoot2;
extern statetype s_grdshoot3;
extern statetype s_grdshoot4;
extern statetype s_grdchase1;
extern statetype s_grdchase1s;
extern statetype s_grdchase2;
extern statetype s_grdchase3;
extern statetype s_grdchase3s;
extern statetype s_grdchase4;
extern statetype s_grddie1;
extern statetype s_grddie1d;
extern statetype s_grddie2;
extern statetype s_grddie3;
extern statetype s_grddie4;
statetype s_grdstand = {true,SPR_GRD_S_1,0,T_Stand,NULL,&s_grdstand};
statetype s_grdpath1 = {true,SPR_GRD_W1_1,20,T_Path,NULL,&s_grdpath1s};
statetype s_grdpath1s = {true,SPR_GRD_W1_1,5,NULL,NULL,&s_grdpath2};
statetype s_grdpath2 = {true,SPR_GRD_W2_1,15,T_Path,NULL,&s_grdpath3};
statetype s_grdpath3 = {true,SPR_GRD_W3_1,20,T_Path,NULL,&s_grdpath3s};
statetype s_grdpath3s = {true,SPR_GRD_W3_1,5,NULL,NULL,&s_grdpath4};
statetype s_grdpath4 = {true,SPR_GRD_W4_1,15,T_Path,NULL,&s_grdpath1};
statetype s_grdpain = {2,SPR_GRD_PAIN_1,10,NULL,NULL,&s_grdchase1};
statetype s_grdpain1 = {2,SPR_GRD_PAIN_2,10,NULL,NULL,&s_grdchase1};
statetype s_grdshoot1 = {false,SPR_GRD_SHOOT1,20,NULL,NULL,&s_grdshoot2};
statetype s_grdshoot2 = {false,SPR_GRD_SHOOT2,20,NULL,T_Shoot,&s_grdshoot3};
statetype s_grdshoot3 = {false,SPR_GRD_SHOOT3,20,NULL,NULL,&s_grdchase1};
statetype s_grdchase1 = {true,SPR_GRD_W1_1,10,T_Chase,NULL,&s_grdchase1s};
statetype s_grdchase1s = {true,SPR_GRD_W1_1,3,NULL,NULL,&s_grdchase2};
statetype s_grdchase2 = {true,SPR_GRD_W2_1,8,T_Chase,NULL,&s_grdchase3};
statetype s_grdchase3 = {true,SPR_GRD_W3_1,10,T_Chase,NULL,&s_grdchase3s};
statetype s_grdchase3s = {true,SPR_GRD_W3_1,3,NULL,NULL,&s_grdchase4};
statetype s_grdchase4 = {true,SPR_GRD_W4_1,8,T_Chase,NULL,&s_grdchase1};
statetype s_grddie1 = {false,SPR_GRD_DIE_1,15,NULL,A_DeathScream,&s_grddie2};
statetype s_grddie2 = {false,SPR_GRD_DIE_2,15,NULL,NULL,&s_grddie3};
statetype s_grddie3 = {false,SPR_GRD_DIE_3,15,NULL,NULL,&s_grddie4};
statetype s_grddie4 = {false,SPR_GRD_DEAD,0,NULL,NULL,&s_grddie4};
#ifndef SPEAR
//
// ghosts
//
extern statetype s_blinkychase1;
extern statetype s_blinkychase2;
extern statetype s_inkychase1;
extern statetype s_inkychase2;
extern statetype s_pinkychase1;
extern statetype s_pinkychase2;
extern statetype s_clydechase1;
extern statetype s_clydechase2;
statetype s_blinkychase1 = {false,SPR_BLINKY_W1,10,T_Ghosts,NULL,&s_blinkychase2};
statetype s_blinkychase2 = {false,SPR_BLINKY_W2,10,T_Ghosts,NULL,&s_blinkychase1};
statetype s_inkychase1 = {false,SPR_INKY_W1,10,T_Ghosts,NULL,&s_inkychase2};
statetype s_inkychase2 = {false,SPR_INKY_W2,10,T_Ghosts,NULL,&s_inkychase1};
statetype s_pinkychase1 = {false,SPR_PINKY_W1,10,T_Ghosts,NULL,&s_pinkychase2};
statetype s_pinkychase2 = {false,SPR_PINKY_W2,10,T_Ghosts,NULL,&s_pinkychase1};
statetype s_clydechase1 = {false,SPR_CLYDE_W1,10,T_Ghosts,NULL,&s_clydechase2};
statetype s_clydechase2 = {false,SPR_CLYDE_W2,10,T_Ghosts,NULL,&s_clydechase1};
#endif
//
// dogs
//
extern statetype s_dogpath1;
extern statetype s_dogpath1s;
extern statetype s_dogpath2;
extern statetype s_dogpath3;
extern statetype s_dogpath3s;
extern statetype s_dogpath4;
extern statetype s_dogjump1;
extern statetype s_dogjump2;
extern statetype s_dogjump3;
extern statetype s_dogjump4;
extern statetype s_dogjump5;
extern statetype s_dogchase1;
extern statetype s_dogchase1s;
extern statetype s_dogchase2;
extern statetype s_dogchase3;
extern statetype s_dogchase3s;
extern statetype s_dogchase4;
extern statetype s_dogdie1;
extern statetype s_dogdie1d;
extern statetype s_dogdie2;
extern statetype s_dogdie3;
extern statetype s_dogdead;
statetype s_dogpath1 = {true,SPR_DOG_W1_1,20,T_Path,NULL,&s_dogpath1s};
statetype s_dogpath1s = {true,SPR_DOG_W1_1,5,NULL,NULL,&s_dogpath2};
statetype s_dogpath2 = {true,SPR_DOG_W2_1,15,T_Path,NULL,&s_dogpath3};
statetype s_dogpath3 = {true,SPR_DOG_W3_1,20,T_Path,NULL,&s_dogpath3s};
statetype s_dogpath3s = {true,SPR_DOG_W3_1,5,NULL,NULL,&s_dogpath4};
statetype s_dogpath4 = {true,SPR_DOG_W4_1,15,T_Path,NULL,&s_dogpath1};
statetype s_dogjump1 = {false,SPR_DOG_JUMP1,10,NULL,NULL,&s_dogjump2};
statetype s_dogjump2 = {false,SPR_DOG_JUMP2,10,NULL,T_Bite,&s_dogjump3};
statetype s_dogjump3 = {false,SPR_DOG_JUMP3,10,NULL,NULL,&s_dogjump4};
statetype s_dogjump4 = {false,SPR_DOG_JUMP1,10,NULL,NULL,&s_dogjump5};
statetype s_dogjump5 = {false,SPR_DOG_W1_1,10,NULL,NULL,&s_dogchase1};
statetype s_dogchase1 = {true,SPR_DOG_W1_1,10,T_DogChase,NULL,&s_dogchase1s};
statetype s_dogchase1s = {true,SPR_DOG_W1_1,3,NULL,NULL,&s_dogchase2};
statetype s_dogchase2 = {true,SPR_DOG_W2_1,8,T_DogChase,NULL,&s_dogchase3};
statetype s_dogchase3 = {true,SPR_DOG_W3_1,10,T_DogChase,NULL,&s_dogchase3s};
statetype s_dogchase3s = {true,SPR_DOG_W3_1,3,NULL,NULL,&s_dogchase4};
statetype s_dogchase4 = {true,SPR_DOG_W4_1,8,T_DogChase,NULL,&s_dogchase1};
statetype s_dogdie1 = {false,SPR_DOG_DIE_1,15,NULL,A_DeathScream,&s_dogdie2};
statetype s_dogdie2 = {false,SPR_DOG_DIE_2,15,NULL,NULL,&s_dogdie3};
statetype s_dogdie3 = {false,SPR_DOG_DIE_3,15,NULL,NULL,&s_dogdead};
statetype s_dogdead = {false,SPR_DOG_DEAD,15,NULL,NULL,&s_dogdead};
//
// officers
//
extern statetype s_ofcstand;
extern statetype s_ofcpath1;
extern statetype s_ofcpath1s;
extern statetype s_ofcpath2;
extern statetype s_ofcpath3;
extern statetype s_ofcpath3s;
extern statetype s_ofcpath4;
extern statetype s_ofcpain;
extern statetype s_ofcpain1;
extern statetype s_ofcgiveup;
extern statetype s_ofcshoot1;
extern statetype s_ofcshoot2;
extern statetype s_ofcshoot3;
extern statetype s_ofcshoot4;
extern statetype s_ofcchase1;
extern statetype s_ofcchase1s;
extern statetype s_ofcchase2;
extern statetype s_ofcchase3;
extern statetype s_ofcchase3s;
extern statetype s_ofcchase4;
extern statetype s_ofcdie1;
extern statetype s_ofcdie2;
extern statetype s_ofcdie3;
extern statetype s_ofcdie4;
extern statetype s_ofcdie5;
statetype s_ofcstand = {true,SPR_OFC_S_1,0,T_Stand,NULL,&s_ofcstand};
statetype s_ofcpath1 = {true,SPR_OFC_W1_1,20,T_Path,NULL,&s_ofcpath1s};
statetype s_ofcpath1s = {true,SPR_OFC_W1_1,5,NULL,NULL,&s_ofcpath2};
statetype s_ofcpath2 = {true,SPR_OFC_W2_1,15,T_Path,NULL,&s_ofcpath3};
statetype s_ofcpath3 = {true,SPR_OFC_W3_1,20,T_Path,NULL,&s_ofcpath3s};
statetype s_ofcpath3s = {true,SPR_OFC_W3_1,5,NULL,NULL,&s_ofcpath4};
statetype s_ofcpath4 = {true,SPR_OFC_W4_1,15,T_Path,NULL,&s_ofcpath1};
statetype s_ofcpain = {2,SPR_OFC_PAIN_1,10,NULL,NULL,&s_ofcchase1};
statetype s_ofcpain1 = {2,SPR_OFC_PAIN_2,10,NULL,NULL,&s_ofcchase1};
statetype s_ofcshoot1 = {false,SPR_OFC_SHOOT1,6,NULL,NULL,&s_ofcshoot2};
statetype s_ofcshoot2 = {false,SPR_OFC_SHOOT2,20,NULL,T_Shoot,&s_ofcshoot3};
statetype s_ofcshoot3 = {false,SPR_OFC_SHOOT3,10,NULL,NULL,&s_ofcchase1};
statetype s_ofcchase1 = {true,SPR_OFC_W1_1,10,T_Chase,NULL,&s_ofcchase1s};
statetype s_ofcchase1s = {true,SPR_OFC_W1_1,3,NULL,NULL,&s_ofcchase2};
statetype s_ofcchase2 = {true,SPR_OFC_W2_1,8,T_Chase,NULL,&s_ofcchase3};
statetype s_ofcchase3 = {true,SPR_OFC_W3_1,10,T_Chase,NULL,&s_ofcchase3s};
statetype s_ofcchase3s = {true,SPR_OFC_W3_1,3,NULL,NULL,&s_ofcchase4};
statetype s_ofcchase4 = {true,SPR_OFC_W4_1,8,T_Chase,NULL,&s_ofcchase1};
statetype s_ofcdie1 = {false,SPR_OFC_DIE_1,11,NULL,A_DeathScream,&s_ofcdie2};
statetype s_ofcdie2 = {false,SPR_OFC_DIE_2,11,NULL,NULL,&s_ofcdie3};
statetype s_ofcdie3 = {false,SPR_OFC_DIE_3,11,NULL,NULL,&s_ofcdie4};
statetype s_ofcdie4 = {false,SPR_OFC_DIE_4,11,NULL,NULL,&s_ofcdie5};
statetype s_ofcdie5 = {false,SPR_OFC_DEAD,0,NULL,NULL,&s_ofcdie5};
//
// mutant
//
extern statetype s_mutstand;
extern statetype s_mutpath1;
extern statetype s_mutpath1s;
extern statetype s_mutpath2;
extern statetype s_mutpath3;
extern statetype s_mutpath3s;
extern statetype s_mutpath4;
extern statetype s_mutpain;
extern statetype s_mutpain1;
extern statetype s_mutgiveup;
extern statetype s_mutshoot1;
extern statetype s_mutshoot2;
extern statetype s_mutshoot3;
extern statetype s_mutshoot4;
extern statetype s_mutchase1;
extern statetype s_mutchase1s;
extern statetype s_mutchase2;
extern statetype s_mutchase3;
extern statetype s_mutchase3s;
extern statetype s_mutchase4;
extern statetype s_mutdie1;
extern statetype s_mutdie2;
extern statetype s_mutdie3;
extern statetype s_mutdie4;
extern statetype s_mutdie5;
statetype s_mutstand = {true,SPR_MUT_S_1,0,T_Stand,NULL,&s_mutstand};
statetype s_mutpath1 = {true,SPR_MUT_W1_1,20,T_Path,NULL,&s_mutpath1s};
statetype s_mutpath1s = {true,SPR_MUT_W1_1,5,NULL,NULL,&s_mutpath2};
statetype s_mutpath2 = {true,SPR_MUT_W2_1,15,T_Path,NULL,&s_mutpath3};
statetype s_mutpath3 = {true,SPR_MUT_W3_1,20,T_Path,NULL,&s_mutpath3s};
statetype s_mutpath3s = {true,SPR_MUT_W3_1,5,NULL,NULL,&s_mutpath4};
statetype s_mutpath4 = {true,SPR_MUT_W4_1,15,T_Path,NULL,&s_mutpath1};
statetype s_mutpain = {2,SPR_MUT_PAIN_1,10,NULL,NULL,&s_mutchase1};
statetype s_mutpain1 = {2,SPR_MUT_PAIN_2,10,NULL,NULL,&s_mutchase1};
statetype s_mutshoot1 = {false,SPR_MUT_SHOOT1,6,NULL,T_Shoot,&s_mutshoot2};
statetype s_mutshoot2 = {false,SPR_MUT_SHOOT2,20,NULL,NULL,&s_mutshoot3};
statetype s_mutshoot3 = {false,SPR_MUT_SHOOT3,10,NULL,T_Shoot,&s_mutshoot4};
statetype s_mutshoot4 = {false,SPR_MUT_SHOOT4,20,NULL,NULL,&s_mutchase1};
statetype s_mutchase1 = {true,SPR_MUT_W1_1,10,T_Chase,NULL,&s_mutchase1s};
statetype s_mutchase1s = {true,SPR_MUT_W1_1,3,NULL,NULL,&s_mutchase2};
statetype s_mutchase2 = {true,SPR_MUT_W2_1,8,T_Chase,NULL,&s_mutchase3};
statetype s_mutchase3 = {true,SPR_MUT_W3_1,10,T_Chase,NULL,&s_mutchase3s};
statetype s_mutchase3s = {true,SPR_MUT_W3_1,3,NULL,NULL,&s_mutchase4};
statetype s_mutchase4 = {true,SPR_MUT_W4_1,8,T_Chase,NULL,&s_mutchase1};
statetype s_mutdie1 = {false,SPR_MUT_DIE_1,7,NULL,A_DeathScream,&s_mutdie2};
statetype s_mutdie2 = {false,SPR_MUT_DIE_2,7,NULL,NULL,&s_mutdie3};
statetype s_mutdie3 = {false,SPR_MUT_DIE_3,7,NULL,NULL,&s_mutdie4};
statetype s_mutdie4 = {false,SPR_MUT_DIE_4,7,NULL,NULL,&s_mutdie5};
statetype s_mutdie5 = {false,SPR_MUT_DEAD,0,NULL,NULL,&s_mutdie5};
//
// SS
//
extern statetype s_ssstand;
extern statetype s_sspath1;
extern statetype s_sspath1s;
extern statetype s_sspath2;
extern statetype s_sspath3;
extern statetype s_sspath3s;
extern statetype s_sspath4;
extern statetype s_sspain;
extern statetype s_sspain1;
extern statetype s_ssshoot1;
extern statetype s_ssshoot2;
extern statetype s_ssshoot3;
extern statetype s_ssshoot4;
extern statetype s_ssshoot5;
extern statetype s_ssshoot6;
extern statetype s_ssshoot7;
extern statetype s_ssshoot8;
extern statetype s_ssshoot9;
extern statetype s_sschase1;
extern statetype s_sschase1s;
extern statetype s_sschase2;
extern statetype s_sschase3;
extern statetype s_sschase3s;
extern statetype s_sschase4;
extern statetype s_ssdie1;
extern statetype s_ssdie2;
extern statetype s_ssdie3;
extern statetype s_ssdie4;
statetype s_ssstand = {true,SPR_SS_S_1,0,T_Stand,NULL,&s_ssstand};
statetype s_sspath1 = {true,SPR_SS_W1_1,20,T_Path,NULL,&s_sspath1s};
statetype s_sspath1s = {true,SPR_SS_W1_1,5,NULL,NULL,&s_sspath2};
statetype s_sspath2 = {true,SPR_SS_W2_1,15,T_Path,NULL,&s_sspath3};
statetype s_sspath3 = {true,SPR_SS_W3_1,20,T_Path,NULL,&s_sspath3s};
statetype s_sspath3s = {true,SPR_SS_W3_1,5,NULL,NULL,&s_sspath4};
statetype s_sspath4 = {true,SPR_SS_W4_1,15,T_Path,NULL,&s_sspath1};
statetype s_sspain = {2,SPR_SS_PAIN_1,10,NULL,NULL,&s_sschase1};
statetype s_sspain1 = {2,SPR_SS_PAIN_2,10,NULL,NULL,&s_sschase1};
statetype s_ssshoot1 = {false,SPR_SS_SHOOT1,20,NULL,NULL,&s_ssshoot2};
statetype s_ssshoot2 = {false,SPR_SS_SHOOT2,20,NULL,T_Shoot,&s_ssshoot3};
statetype s_ssshoot3 = {false,SPR_SS_SHOOT3,10,NULL,NULL,&s_ssshoot4};
statetype s_ssshoot4 = {false,SPR_SS_SHOOT2,10,NULL,T_Shoot,&s_ssshoot5};
statetype s_ssshoot5 = {false,SPR_SS_SHOOT3,10,NULL,NULL,&s_ssshoot6};
statetype s_ssshoot6 = {false,SPR_SS_SHOOT2,10,NULL,T_Shoot,&s_ssshoot7};
statetype s_ssshoot7 = {false,SPR_SS_SHOOT3,10,NULL,NULL,&s_ssshoot8};
statetype s_ssshoot8 = {false,SPR_SS_SHOOT2,10,NULL,T_Shoot,&s_ssshoot9};
statetype s_ssshoot9 = {false,SPR_SS_SHOOT3,10,NULL,NULL,&s_sschase1};
statetype s_sschase1 = {true,SPR_SS_W1_1,10,T_Chase,NULL,&s_sschase1s};
statetype s_sschase1s = {true,SPR_SS_W1_1,3,NULL,NULL,&s_sschase2};
statetype s_sschase2 = {true,SPR_SS_W2_1,8,T_Chase,NULL,&s_sschase3};
statetype s_sschase3 = {true,SPR_SS_W3_1,10,T_Chase,NULL,&s_sschase3s};
statetype s_sschase3s = {true,SPR_SS_W3_1,3,NULL,NULL,&s_sschase4};
statetype s_sschase4 = {true,SPR_SS_W4_1,8,T_Chase,NULL,&s_sschase1};
statetype s_ssdie1 = {false,SPR_SS_DIE_1,15,NULL,A_DeathScream,&s_ssdie2};
statetype s_ssdie2 = {false,SPR_SS_DIE_2,15,NULL,NULL,&s_ssdie3};
statetype s_ssdie3 = {false,SPR_SS_DIE_3,15,NULL,NULL,&s_ssdie4};
statetype s_ssdie4 = {false,SPR_SS_DEAD,0,NULL,NULL,&s_ssdie4};
#ifndef SPEAR
//
// hans
//
extern statetype s_bossstand;
extern statetype s_bosschase1;
extern statetype s_bosschase1s;
extern statetype s_bosschase2;
extern statetype s_bosschase3;
extern statetype s_bosschase3s;
extern statetype s_bosschase4;
extern statetype s_bossdie1;
extern statetype s_bossdie2;
extern statetype s_bossdie3;
extern statetype s_bossdie4;
extern statetype s_bossshoot1;
extern statetype s_bossshoot2;
extern statetype s_bossshoot3;
extern statetype s_bossshoot4;
extern statetype s_bossshoot5;
extern statetype s_bossshoot6;
extern statetype s_bossshoot7;
extern statetype s_bossshoot8;
statetype s_bossstand = {false,SPR_BOSS_W1,0,T_Stand,NULL,&s_bossstand};
statetype s_bosschase1 = {false,SPR_BOSS_W1,10,T_Chase,NULL,&s_bosschase1s};
statetype s_bosschase1s = {false,SPR_BOSS_W1,3,NULL,NULL,&s_bosschase2};
statetype s_bosschase2 = {false,SPR_BOSS_W2,8,T_Chase,NULL,&s_bosschase3};
statetype s_bosschase3 = {false,SPR_BOSS_W3,10,T_Chase,NULL,&s_bosschase3s};
statetype s_bosschase3s = {false,SPR_BOSS_W3,3,NULL,NULL,&s_bosschase4};
statetype s_bosschase4 = {false,SPR_BOSS_W4,8,T_Chase,NULL,&s_bosschase1};
statetype s_bossdie1 = {false,SPR_BOSS_DIE1,15,NULL,A_DeathScream,&s_bossdie2};
statetype s_bossdie2 = {false,SPR_BOSS_DIE2,15,NULL,NULL,&s_bossdie3};
statetype s_bossdie3 = {false,SPR_BOSS_DIE3,15,NULL,NULL,&s_bossdie4};
statetype s_bossdie4 = {false,SPR_BOSS_DEAD,0,NULL,NULL,&s_bossdie4};
statetype s_bossshoot1 = {false,SPR_BOSS_SHOOT1,30,NULL,NULL,&s_bossshoot2};
statetype s_bossshoot2 = {false,SPR_BOSS_SHOOT2,10,NULL,T_Shoot,&s_bossshoot3};
statetype s_bossshoot3 = {false,SPR_BOSS_SHOOT3,10,NULL,T_Shoot,&s_bossshoot4};
statetype s_bossshoot4 = {false,SPR_BOSS_SHOOT2,10,NULL,T_Shoot,&s_bossshoot5};
statetype s_bossshoot5 = {false,SPR_BOSS_SHOOT3,10,NULL,T_Shoot,&s_bossshoot6};
statetype s_bossshoot6 = {false,SPR_BOSS_SHOOT2,10,NULL,T_Shoot,&s_bossshoot7};
statetype s_bossshoot7 = {false,SPR_BOSS_SHOOT3,10,NULL,T_Shoot,&s_bossshoot8};
statetype s_bossshoot8 = {false,SPR_BOSS_SHOOT1,10,NULL,NULL,&s_bosschase1};
//
// gretel
//
extern statetype s_gretelstand;
extern statetype s_gretelchase1;
extern statetype s_gretelchase1s;
extern statetype s_gretelchase2;
extern statetype s_gretelchase3;
extern statetype s_gretelchase3s;
extern statetype s_gretelchase4;
extern statetype s_greteldie1;
extern statetype s_greteldie2;
extern statetype s_greteldie3;
extern statetype s_greteldie4;
extern statetype s_gretelshoot1;
extern statetype s_gretelshoot2;
extern statetype s_gretelshoot3;
extern statetype s_gretelshoot4;
extern statetype s_gretelshoot5;
extern statetype s_gretelshoot6;
extern statetype s_gretelshoot7;
extern statetype s_gretelshoot8;
statetype s_gretelstand = {false,SPR_GRETEL_W1,0,T_Stand,NULL,&s_gretelstand};
statetype s_gretelchase1 = {false,SPR_GRETEL_W1,10,T_Chase,NULL,&s_gretelchase1s};
statetype s_gretelchase1s = {false,SPR_GRETEL_W1,3,NULL,NULL,&s_gretelchase2};
statetype s_gretelchase2 = {false,SPR_GRETEL_W2,8,T_Chase,NULL,&s_gretelchase3};
statetype s_gretelchase3 = {false,SPR_GRETEL_W3,10,T_Chase,NULL,&s_gretelchase3s};
statetype s_gretelchase3s = {false,SPR_GRETEL_W3,3,NULL,NULL,&s_gretelchase4};
statetype s_gretelchase4 = {false,SPR_GRETEL_W4,8,T_Chase,NULL,&s_gretelchase1};
statetype s_greteldie1 = {false,SPR_GRETEL_DIE1,15,NULL,A_DeathScream,&s_greteldie2};
statetype s_greteldie2 = {false,SPR_GRETEL_DIE2,15,NULL,NULL,&s_greteldie3};
statetype s_greteldie3 = {false,SPR_GRETEL_DIE3,15,NULL,NULL,&s_greteldie4};
statetype s_greteldie4 = {false,SPR_GRETEL_DEAD,0,NULL,NULL,&s_greteldie4};
statetype s_gretelshoot1 = {false,SPR_GRETEL_SHOOT1,30,NULL,NULL,&s_gretelshoot2};
statetype s_gretelshoot2 = {false,SPR_GRETEL_SHOOT2,10,NULL,T_Shoot,&s_gretelshoot3};
statetype s_gretelshoot3 = {false,SPR_GRETEL_SHOOT3,10,NULL,T_Shoot,&s_gretelshoot4};
statetype s_gretelshoot4 = {false,SPR_GRETEL_SHOOT2,10,NULL,T_Shoot,&s_gretelshoot5};
statetype s_gretelshoot5 = {false,SPR_GRETEL_SHOOT3,10,NULL,T_Shoot,&s_gretelshoot6};
statetype s_gretelshoot6 = {false,SPR_GRETEL_SHOOT2,10,NULL,T_Shoot,&s_gretelshoot7};
statetype s_gretelshoot7 = {false,SPR_GRETEL_SHOOT3,10,NULL,T_Shoot,&s_gretelshoot8};
statetype s_gretelshoot8 = {false,SPR_GRETEL_SHOOT1,10,NULL,NULL,&s_gretelchase1};
#endif
/* /*
=============== ===============
...@@ -903,50 +381,6 @@ void SpawnDeadGuard (int tilex, int tiley) ...@@ -903,50 +381,6 @@ void SpawnDeadGuard (int tilex, int tiley)
#ifndef SPEAR
/*
===============
=
= SpawnBoss
=
===============
*/
void SpawnBoss (int tilex, int tiley)
{
SpawnNewObj (tilex,tiley,&s_bossstand);
new->speed = SPDPATROL;
new->obclass = bossobj;
new->hitpoints = starthitpoints[gamestate.difficulty][en_boss];
new->dir = south;
new->flags |= FL_SHOOTABLE|FL_AMBUSH;
if (!loadedgame)
gamestate.killtotal++;
}
/*
===============
=
= SpawnGretel
=
===============
*/
void SpawnGretel (int tilex, int tiley)
{
SpawnNewObj (tilex,tiley,&s_gretelstand);
new->speed = SPDPATROL;
new->obclass = gretelobj;
new->hitpoints = starthitpoints[gamestate.difficulty][en_gretel];
new->dir = north;
new->flags |= FL_SHOOTABLE|FL_AMBUSH;
if (!loadedgame)
gamestate.killtotal++;
}
#endif
/* /*
=============== ===============
= =
...@@ -1037,8 +471,6 @@ void SpawnPatrol (enemy_t which, int tilex, int tiley, int dir) ...@@ -1037,8 +471,6 @@ void SpawnPatrol (enemy_t which, int tilex, int tiley, int dir)
void A_DeathScream (objtype *ob) void A_DeathScream (objtype *ob)
{ {
/* TODO: what are on these maps? */
#ifndef UPLOAD
#ifndef SPEAR #ifndef SPEAR
if (mapon==9 && !US_RndT()) if (mapon==9 && !US_RndT())
#else #else
...@@ -1058,7 +490,6 @@ void A_DeathScream (objtype *ob) ...@@ -1058,7 +490,6 @@ void A_DeathScream (objtype *ob)
break; break;
} }
} }
#endif
switch (ob->obclass) switch (ob->obclass)
{ {
...@@ -1080,7 +511,7 @@ void A_DeathScream (objtype *ob) ...@@ -1080,7 +511,7 @@ void A_DeathScream (objtype *ob)
DEATHSCREAM2SND, DEATHSCREAM2SND,
DEATHSCREAM3SND DEATHSCREAM3SND
}; };
PlaySoundLocActor(sounds[US_RndT()%3],ob); PlaySoundLocActor(sounds[US_RndT()%3], ob);
#endif #endif
} }
break; break;
...@@ -1088,16 +519,15 @@ void A_DeathScream (objtype *ob) ...@@ -1088,16 +519,15 @@ void A_DeathScream (objtype *ob)
PlaySoundLocActor(NEINSOVASSND,ob); PlaySoundLocActor(NEINSOVASSND,ob);
break; break;
case ssobj: case ssobj:
PlaySoundLocActor(LEBENSND,ob); // JAB PlaySoundLocActor(LEBENSND,ob);
break; break;
case dogobj: case dogobj:
PlaySoundLocActor(DOGDEATHSND,ob); // JAB PlaySoundLocActor(DOGDEATHSND,ob);
break; break;
#ifndef SPEAR #ifndef SPEAR
case bossobj: case bossobj:
SD_PlaySound(MUTTISND); // JAB SD_PlaySound(MUTTISND);
break; break;
#ifndef UPLOAD
case schabbobj: case schabbobj:
SD_PlaySound(MEINGOTTSND); SD_PlaySound(MEINGOTTSND);
break; break;
...@@ -1119,7 +549,6 @@ void A_DeathScream (objtype *ob) ...@@ -1119,7 +549,6 @@ void A_DeathScream (objtype *ob)
case fatobj: case fatobj:
SD_PlaySound(ROSESND); SD_PlaySound(ROSESND);
break; break;
#endif /* UPLOAD */
#else #else
case spectreobj: case spectreobj:
SD_PlaySound(GHOSTFADESND); SD_PlaySound(GHOSTFADESND);
...@@ -1145,77 +574,250 @@ void A_DeathScream (objtype *ob) ...@@ -1145,77 +574,250 @@ void A_DeathScream (objtype *ob)
} }
} }
/*
============================================================================
PATH
============================================================================
*/
/*
===============
=
= SelectPathDir
=
===============
*/
void SelectPathDir(objtype *ob)
{
unsigned spot;
spot = *(mapsegs[1]+farmapylookup[ob->tiley]+ob->tilex)-ICONARROWS;
if (spot<8)
{
// new direction
ob->dir = spot;
}
ob->distance = TILEGLOBAL;
if (!TryWalk (ob))
ob->dir = nodir;
}
/*
===============
=
= T_Path
=
===============
*/
void T_Path (objtype *ob)
{
long move;
if (SightPlayer (ob))
return;
if (ob->dir == nodir)
{
SelectPathDir (ob);
if (ob->dir == nodir)
return; // all movement is blocked
}
move = ob->speed*tics;
while (move)
{
if (ob->distance < 0)
{
//
// waiting for a door to open
//
OpenDoor (-ob->distance-1);
if (doorobjlist[-ob->distance-1].action != dr_open)
return;
ob->distance = TILEGLOBAL; // go ahead, the door is now opoen
}
if (move < ob->distance)
{
MoveObj (ob,move);
break;
}
if (ob->tilex>MAPSIZE || ob->tiley>MAPSIZE)
{
sprintf(str,"T_Path hit a wall at %u,%u, dir %u"
,ob->tilex,ob->tiley,ob->dir);
Quit(str);
}
ob->x = ((long)ob->tilex<<TILESHIFT)+TILEGLOBAL/2;
ob->y = ((long)ob->tiley<<TILESHIFT)+TILEGLOBAL/2;
move -= ob->distance;
SelectPathDir (ob);
if (ob->dir == nodir)
return; /* all movement is blocked */
}
}
/* /*
============================================================================= =============================================================================
SPEAR ACTORS FIGHT
============================================================================= =============================================================================
*/ */
#ifdef SPEAR
void T_Launch (objtype *ob); /*
void T_Will (objtype *ob); ===============
=
= T_Shoot
=
= Try to damage the player, based on skill level and player's speed
=
===============
*/
extern statetype s_angelshoot1; void T_Shoot (objtype *ob)
extern statetype s_deathshoot1; {
extern statetype s_spark1; int dx,dy,dist;
int hitchance,damage;
// hitchance = 128;
// trans
// if (!areabyplayer[ob->areanumber])
extern statetype s_transstand; return;
extern statetype s_transchase1; if (!CheckLine (ob)) // player is behind a wall
extern statetype s_transchase1s; return;
extern statetype s_transchase2;
extern statetype s_transchase3; dx = abs(ob->tilex - player->tilex);
extern statetype s_transchase3s; dy = abs(ob->tiley - player->tiley);
extern statetype s_transchase4; dist = dx>dy ? dx:dy;
extern statetype s_transdie0; if (ob->obclass == ssobj || ob->obclass == bossobj)
extern statetype s_transdie01; dist = dist*2/3; // ss are better shots
extern statetype s_transdie1;
extern statetype s_transdie2; if (thrustspeed >= RUNSPEED)
extern statetype s_transdie3; {
extern statetype s_transdie4; if (ob->flags&FL_VISABLE)
hitchance = 160-dist*16; // player can see to dodge
extern statetype s_transshoot1; else
extern statetype s_transshoot2; hitchance = 160-dist*8;
extern statetype s_transshoot3; }
extern statetype s_transshoot4; else
extern statetype s_transshoot5; {
extern statetype s_transshoot6; if (ob->flags&FL_VISABLE)
extern statetype s_transshoot7; hitchance = 256-dist*16; // player can see to dodge
extern statetype s_transshoot8; else
hitchance = 256-dist*8;
}
statetype s_transstand = {false,SPR_TRANS_W1,0,T_Stand,NULL,&s_transstand};
// see if the shot was a hit
statetype s_transchase1 = {false,SPR_TRANS_W1,10,T_Chase,NULL,&s_transchase1s};
statetype s_transchase1s = {false,SPR_TRANS_W1,3,NULL,NULL,&s_transchase2}; if (US_RndT()<hitchance)
statetype s_transchase2 = {false,SPR_TRANS_W2,8,T_Chase,NULL,&s_transchase3}; {
statetype s_transchase3 = {false,SPR_TRANS_W3,10,T_Chase,NULL,&s_transchase3s}; if (dist<2)
statetype s_transchase3s = {false,SPR_TRANS_W3,3,NULL,NULL,&s_transchase4}; damage = US_RndT()>>2;
statetype s_transchase4 = {false,SPR_TRANS_W4,8,T_Chase,NULL,&s_transchase1}; else if (dist<4)
damage = US_RndT()>>3;
statetype s_transdie0 = {false,SPR_TRANS_W1,1,NULL,A_DeathScream,&s_transdie01}; else
statetype s_transdie01 = {false,SPR_TRANS_W1,1,NULL,NULL,&s_transdie1}; damage = US_RndT()>>4;
statetype s_transdie1 = {false,SPR_TRANS_DIE1,15,NULL,NULL,&s_transdie2};
statetype s_transdie2 = {false,SPR_TRANS_DIE2,15,NULL,NULL,&s_transdie3}; TakeDamage (damage,ob);
statetype s_transdie3 = {false,SPR_TRANS_DIE3,15,NULL,NULL,&s_transdie4}; }
statetype s_transdie4 = {false,SPR_TRANS_DEAD,0,NULL,NULL,&s_transdie4};
switch(ob->obclass)
statetype s_transshoot1 = {false,SPR_TRANS_SHOOT1,30,NULL,NULL,&s_transshoot2}; {
statetype s_transshoot2 = {false,SPR_TRANS_SHOOT2,10,NULL,T_Shoot,&s_transshoot3}; case ssobj:
statetype s_transshoot3 = {false,SPR_TRANS_SHOOT3,10,NULL,T_Shoot,&s_transshoot4}; PlaySoundLocActor(SSFIRESND,ob);
statetype s_transshoot4 = {false,SPR_TRANS_SHOOT2,10,NULL,T_Shoot,&s_transshoot5}; break;
statetype s_transshoot5 = {false,SPR_TRANS_SHOOT3,10,NULL,T_Shoot,&s_transshoot6}; #ifndef SPEAR
statetype s_transshoot6 = {false,SPR_TRANS_SHOOT2,10,NULL,T_Shoot,&s_transshoot7}; case giftobj:
statetype s_transshoot7 = {false,SPR_TRANS_SHOOT3,10,NULL,T_Shoot,&s_transshoot8}; case fatobj:
statetype s_transshoot8 = {false,SPR_TRANS_SHOOT1,10,NULL,NULL,&s_transchase1}; PlaySoundLocActor(MISSILEFIRESND,ob);
break;
case mechahitlerobj:
case realhitlerobj:
case bossobj:
PlaySoundLocActor(BOSSFIRESND,ob);
break;
case schabbobj:
PlaySoundLocActor(SCHABBSTHROWSND,ob);
break;
case fakeobj:
PlaySoundLocActor(FLAMETHROWERSND,ob);
break;
#endif
default:
PlaySoundLocActor(NAZIFIRESND,ob);
}
}
/*
===============
=
= T_Bite
=
===============
*/
void T_Bite (objtype *ob)
{
long dx,dy;
PlaySoundLocActor(DOGATTACKSND,ob); // JAB
dx = player->x - ob->x;
if (dx<0)
dx = -dx;
dx -= TILEGLOBAL;
if (dx <= MINACTORDIST)
{
dy = player->y - ob->y;
if (dy<0)
dy = -dy;
dy -= TILEGLOBAL;
if (dy <= MINACTORDIST)
{
if (US_RndT()<180)
{
TakeDamage (US_RndT()>>4,ob);
return;
}
}
}
return;
}
/*
=============================================================================
SPEAR ACTORS
=============================================================================
*/
#ifdef SPEAR
/* /*
...@@ -1242,59 +844,6 @@ void SpawnTrans (int tilex, int tiley) ...@@ -1242,59 +844,6 @@ void SpawnTrans (int tilex, int tiley)
// //
// uber // uber
// //
void T_UShoot (objtype *ob);
extern statetype s_uberstand;
extern statetype s_uberchase1;
extern statetype s_uberchase1s;
extern statetype s_uberchase2;
extern statetype s_uberchase3;
extern statetype s_uberchase3s;
extern statetype s_uberchase4;
extern statetype s_uberdie0;
extern statetype s_uberdie01;
extern statetype s_uberdie1;
extern statetype s_uberdie2;
extern statetype s_uberdie3;
extern statetype s_uberdie4;
extern statetype s_uberdie5;
extern statetype s_ubershoot1;
extern statetype s_ubershoot2;
extern statetype s_ubershoot3;
extern statetype s_ubershoot4;
extern statetype s_ubershoot5;
extern statetype s_ubershoot6;
extern statetype s_ubershoot7;
statetype s_uberstand = {false,SPR_UBER_W1,0,T_Stand,NULL,&s_uberstand};
statetype s_uberchase1 = {false,SPR_UBER_W1,10,T_Chase,NULL,&s_uberchase1s};
statetype s_uberchase1s = {false,SPR_UBER_W1,3,NULL,NULL,&s_uberchase2};
statetype s_uberchase2 = {false,SPR_UBER_W2,8,T_Chase,NULL,&s_uberchase3};
statetype s_uberchase3 = {false,SPR_UBER_W3,10,T_Chase,NULL,&s_uberchase3s};
statetype s_uberchase3s = {false,SPR_UBER_W3,3,NULL,NULL,&s_uberchase4};
statetype s_uberchase4 = {false,SPR_UBER_W4,8,T_Chase,NULL,&s_uberchase1};
statetype s_uberdie0 = {false,SPR_UBER_W1,1,NULL,A_DeathScream,&s_uberdie01};
statetype s_uberdie01 = {false,SPR_UBER_W1,1,NULL,NULL,&s_uberdie1};
statetype s_uberdie1 = {false,SPR_UBER_DIE1,15,NULL,NULL,&s_uberdie2};
statetype s_uberdie2 = {false,SPR_UBER_DIE2,15,NULL,NULL,&s_uberdie3};
statetype s_uberdie3 = {false,SPR_UBER_DIE3,15,NULL,NULL,&s_uberdie4};
statetype s_uberdie4 = {false,SPR_UBER_DIE4,15,NULL,NULL,&s_uberdie5};
statetype s_uberdie5 = {false,SPR_UBER_DEAD,0,NULL,NULL,&s_uberdie5};
statetype s_ubershoot1 = {false,SPR_UBER_SHOOT1,30,NULL,NULL,&s_ubershoot2};
statetype s_ubershoot2 = {false,SPR_UBER_SHOOT2,12,NULL,T_UShoot,&s_ubershoot3};
statetype s_ubershoot3 = {false,SPR_UBER_SHOOT3,12,NULL,T_UShoot,&s_ubershoot4};
statetype s_ubershoot4 = {false,SPR_UBER_SHOOT4,12,NULL,T_UShoot,&s_ubershoot5};
statetype s_ubershoot5 = {false,SPR_UBER_SHOOT3,12,NULL,T_UShoot,&s_ubershoot6};
statetype s_ubershoot6 = {false,SPR_UBER_SHOOT2,12,NULL,T_UShoot,&s_ubershoot7};
statetype s_ubershoot7 = {false,SPR_UBER_SHOOT1,12,NULL,NULL,&s_uberchase1};
/* /*
=============== ===============
...@@ -1325,11 +874,11 @@ void SpawnUber (int tilex, int tiley) ...@@ -1325,11 +874,11 @@ void SpawnUber (int tilex, int tiley)
=============== ===============
*/ */
void T_UShoot (objtype *ob) void T_UShoot(objtype *ob)
{ {
int dx,dy,dist; int dx, dy, dist;
T_Shoot (ob); T_Shoot(ob);
dx = abs(ob->tilex - player->tilex); dx = abs(ob->tilex - player->tilex);
dy = abs(ob->tiley - player->tiley); dy = abs(ob->tiley - player->tiley);
...@@ -1338,60 +887,6 @@ void T_UShoot (objtype *ob) ...@@ -1338,60 +887,6 @@ void T_UShoot (objtype *ob)
TakeDamage (10,ob); TakeDamage (10,ob);
} }
//
// will
//
extern statetype s_willstand;
extern statetype s_willchase1;
extern statetype s_willchase1s;
extern statetype s_willchase2;
extern statetype s_willchase3;
extern statetype s_willchase3s;
extern statetype s_willchase4;
extern statetype s_willdie1;
extern statetype s_willdie2;
extern statetype s_willdie3;
extern statetype s_willdie4;
extern statetype s_willdie5;
extern statetype s_willdie6;
extern statetype s_willshoot1;
extern statetype s_willshoot2;
extern statetype s_willshoot3;
extern statetype s_willshoot4;
extern statetype s_willshoot5;
extern statetype s_willshoot6;
statetype s_willstand = {false,SPR_WILL_W1,0,T_Stand,NULL,&s_willstand};
statetype s_willchase1 = {false,SPR_WILL_W1,10,T_Will,NULL,&s_willchase1s};
statetype s_willchase1s = {false,SPR_WILL_W1,3,NULL,NULL,&s_willchase2};
statetype s_willchase2 = {false,SPR_WILL_W2,8,T_Will,NULL,&s_willchase3};
statetype s_willchase3 = {false,SPR_WILL_W3,10,T_Will,NULL,&s_willchase3s};
statetype s_willchase3s = {false,SPR_WILL_W3,3,NULL,NULL,&s_willchase4};
statetype s_willchase4 = {false,SPR_WILL_W4,8,T_Will,NULL,&s_willchase1};
statetype s_willdeathcam = {false,SPR_WILL_W1,1,NULL,NULL,&s_willdie1};
statetype s_willdie1 = {false,SPR_WILL_W1,1,NULL,A_DeathScream,&s_willdie2};
statetype s_willdie2 = {false,SPR_WILL_W1,10,NULL,NULL,&s_willdie3};
statetype s_willdie3 = {false,SPR_WILL_DIE1,10,NULL,NULL,&s_willdie4};
statetype s_willdie4 = {false,SPR_WILL_DIE2,10,NULL,NULL,&s_willdie5};
statetype s_willdie5 = {false,SPR_WILL_DIE3,10,NULL,NULL,&s_willdie6};
statetype s_willdie6 = {false,SPR_WILL_DEAD,20,NULL,NULL,&s_willdie6};
statetype s_willshoot1 = {false,SPR_WILL_SHOOT1,30,NULL,NULL,&s_willshoot2};
statetype s_willshoot2 = {false,SPR_WILL_SHOOT2,10,NULL,T_Launch,&s_willshoot3};
statetype s_willshoot3 = {false,SPR_WILL_SHOOT3,10,NULL,T_Shoot,&s_willshoot4};
statetype s_willshoot4 = {false,SPR_WILL_SHOOT4,10,NULL,T_Shoot,&s_willshoot5};
statetype s_willshoot5 = {false,SPR_WILL_SHOOT3,10,NULL,T_Shoot,&s_willshoot6};
statetype s_willshoot6 = {false,SPR_WILL_SHOOT4,10,NULL,T_Shoot,&s_willchase1};
/* /*
=============== ===============
= =
...@@ -1507,62 +1002,6 @@ void T_Will (objtype *ob) ...@@ -1507,62 +1002,6 @@ void T_Will (objtype *ob)
} }
//
// death
//
extern statetype s_deathstand;
extern statetype s_deathchase1;
extern statetype s_deathchase1s;
extern statetype s_deathchase2;
extern statetype s_deathchase3;
extern statetype s_deathchase3s;
extern statetype s_deathchase4;
extern statetype s_deathdie1;
extern statetype s_deathdie2;
extern statetype s_deathdie3;
extern statetype s_deathdie4;
extern statetype s_deathdie5;
extern statetype s_deathdie6;
extern statetype s_deathdie7;
extern statetype s_deathdie8;
extern statetype s_deathdie9;
extern statetype s_deathshoot1;
extern statetype s_deathshoot2;
extern statetype s_deathshoot3;
extern statetype s_deathshoot4;
extern statetype s_deathshoot5;
statetype s_deathstand = {false,SPR_DEATH_W1,0,T_Stand,NULL,&s_deathstand};
statetype s_deathchase1 = {false,SPR_DEATH_W1,10,T_Will,NULL,&s_deathchase1s};
statetype s_deathchase1s = {false,SPR_DEATH_W1,3,NULL,NULL,&s_deathchase2};
statetype s_deathchase2 = {false,SPR_DEATH_W2,8,T_Will,NULL,&s_deathchase3};
statetype s_deathchase3 = {false,SPR_DEATH_W3,10,T_Will,NULL,&s_deathchase3s};
statetype s_deathchase3s = {false,SPR_DEATH_W3,3,NULL,NULL,&s_deathchase4};
statetype s_deathchase4 = {false,SPR_DEATH_W4,8,T_Will,NULL,&s_deathchase1};
statetype s_deathdeathcam = {false,SPR_DEATH_W1,1,NULL,NULL,&s_deathdie1};
statetype s_deathdie1 = {false,SPR_DEATH_W1,1,NULL,A_DeathScream,&s_deathdie2};
statetype s_deathdie2 = {false,SPR_DEATH_W1,10,NULL,NULL,&s_deathdie3};
statetype s_deathdie3 = {false,SPR_DEATH_DIE1,10,NULL,NULL,&s_deathdie4};
statetype s_deathdie4 = {false,SPR_DEATH_DIE2,10,NULL,NULL,&s_deathdie5};
statetype s_deathdie5 = {false,SPR_DEATH_DIE3,10,NULL,NULL,&s_deathdie6};
statetype s_deathdie6 = {false,SPR_DEATH_DIE4,10,NULL,NULL,&s_deathdie7};
statetype s_deathdie7 = {false,SPR_DEATH_DIE5,10,NULL,NULL,&s_deathdie8};
statetype s_deathdie8 = {false,SPR_DEATH_DIE6,10,NULL,NULL,&s_deathdie9};
statetype s_deathdie9 = {false,SPR_DEATH_DEAD,0,NULL,NULL,&s_deathdie9};
statetype s_deathshoot1 = {false,SPR_DEATH_SHOOT1,30,NULL,NULL,&s_deathshoot2};
statetype s_deathshoot2 = {false,SPR_DEATH_SHOOT2,10,NULL,T_Launch,&s_deathshoot3};
statetype s_deathshoot3 = {false,SPR_DEATH_SHOOT4,10,NULL,T_Shoot,&s_deathshoot4};
statetype s_deathshoot4 = {false,SPR_DEATH_SHOOT3,10,NULL,T_Launch,&s_deathshoot5};
statetype s_deathshoot5 = {false,SPR_DEATH_SHOOT4,10,NULL,T_Shoot,&s_deathchase1};
/* /*
=============== ===============
...@@ -1654,95 +1093,6 @@ void T_Launch (objtype *ob) ...@@ -1654,95 +1093,6 @@ void T_Launch (objtype *ob)
new->active = true; new->active = true;
} }
//
// angel
//
void A_Relaunch (objtype *ob);
void A_Victory (objtype *ob);
void A_StartAttack (objtype *ob);
void A_Breathing (objtype *ob);
extern statetype s_angelstand;
extern statetype s_angelchase1;
extern statetype s_angelchase1s;
extern statetype s_angelchase2;
extern statetype s_angelchase3;
extern statetype s_angelchase3s;
extern statetype s_angelchase4;
extern statetype s_angeldie1;
extern statetype s_angeldie11;
extern statetype s_angeldie2;
extern statetype s_angeldie3;
extern statetype s_angeldie4;
extern statetype s_angeldie5;
extern statetype s_angeldie6;
extern statetype s_angeldie7;
extern statetype s_angeldie8;
extern statetype s_angeldie9;
extern statetype s_angelshoot1;
extern statetype s_angelshoot2;
extern statetype s_angelshoot3;
extern statetype s_angelshoot4;
extern statetype s_angelshoot5;
extern statetype s_angelshoot6;
extern statetype s_angeltired;
extern statetype s_angeltired2;
extern statetype s_angeltired3;
extern statetype s_angeltired4;
extern statetype s_angeltired5;
extern statetype s_angeltired6;
extern statetype s_angeltired7;
extern statetype s_spark1;
extern statetype s_spark2;
extern statetype s_spark3;
extern statetype s_spark4;
statetype s_angelstand = {false,SPR_ANGEL_W1,0,T_Stand,NULL,&s_angelstand};
statetype s_angelchase1 = {false,SPR_ANGEL_W1,10,T_Will,NULL,&s_angelchase1s};
statetype s_angelchase1s = {false,SPR_ANGEL_W1,3,NULL,NULL,&s_angelchase2};
statetype s_angelchase2 = {false,SPR_ANGEL_W2,8,T_Will,NULL,&s_angelchase3};
statetype s_angelchase3 = {false,SPR_ANGEL_W3,10,T_Will,NULL,&s_angelchase3s};
statetype s_angelchase3s = {false,SPR_ANGEL_W3,3,NULL,NULL,&s_angelchase4};
statetype s_angelchase4 = {false,SPR_ANGEL_W4,8,T_Will,NULL,&s_angelchase1};
statetype s_angeldie1 = {false,SPR_ANGEL_W1,1,NULL,A_DeathScream,&s_angeldie11};
statetype s_angeldie11 = {false,SPR_ANGEL_W1,1,NULL,NULL,&s_angeldie2};
statetype s_angeldie2 = {false,SPR_ANGEL_DIE1,10,NULL,A_Slurpie,&s_angeldie3};
statetype s_angeldie3 = {false,SPR_ANGEL_DIE2,10,NULL,NULL,&s_angeldie4};
statetype s_angeldie4 = {false,SPR_ANGEL_DIE3,10,NULL,NULL,&s_angeldie5};
statetype s_angeldie5 = {false,SPR_ANGEL_DIE4,10,NULL,NULL,&s_angeldie6};
statetype s_angeldie6 = {false,SPR_ANGEL_DIE5,10,NULL,NULL,&s_angeldie7};
statetype s_angeldie7 = {false,SPR_ANGEL_DIE6,10,NULL,NULL,&s_angeldie8};
statetype s_angeldie8 = {false,SPR_ANGEL_DIE7,10,NULL,NULL,&s_angeldie9};
statetype s_angeldie9 = {false,SPR_ANGEL_DEAD,130,NULL,A_Victory,&s_angeldie9};
statetype s_angelshoot1 = {false,SPR_ANGEL_SHOOT1,10,NULL,A_StartAttack,&s_angelshoot2};
statetype s_angelshoot2 = {false,SPR_ANGEL_SHOOT2,20,NULL,T_Launch,&s_angelshoot3};
statetype s_angelshoot3 = {false,SPR_ANGEL_SHOOT1,10,NULL,A_Relaunch,&s_angelshoot2};
statetype s_angeltired = {false,SPR_ANGEL_TIRED1,40,NULL,A_Breathing,&s_angeltired2};
statetype s_angeltired2 = {false,SPR_ANGEL_TIRED2,40,NULL,NULL,&s_angeltired3};
statetype s_angeltired3 = {false,SPR_ANGEL_TIRED1,40,NULL,A_Breathing,&s_angeltired4};
statetype s_angeltired4 = {false,SPR_ANGEL_TIRED2,40,NULL,NULL,&s_angeltired5};
statetype s_angeltired5 = {false,SPR_ANGEL_TIRED1,40,NULL,A_Breathing,&s_angeltired6};
statetype s_angeltired6 = {false,SPR_ANGEL_TIRED2,40,NULL,NULL,&s_angeltired7};
statetype s_angeltired7 = {false,SPR_ANGEL_TIRED1,40,NULL,A_Breathing,&s_angelchase1};
statetype s_spark1 = {false,SPR_SPARK1,6,T_Projectile,NULL,&s_spark2};
statetype s_spark2 = {false,SPR_SPARK2,6,T_Projectile,NULL,&s_spark3};
statetype s_spark3 = {false,SPR_SPARK3,6,T_Projectile,NULL,&s_spark4};
statetype s_spark4 = {false,SPR_SPARK4,6,T_Projectile,NULL,&s_spark1};
void A_Slurpie(objtype *ob) void A_Slurpie(objtype *ob)
{ {
SD_PlaySound(SLURPIESND); SD_PlaySound(SLURPIESND);
...@@ -1826,48 +1176,6 @@ void A_Relaunch (objtype *ob) ...@@ -1826,48 +1176,6 @@ void A_Relaunch (objtype *ob)
} }
} }
//
// spectre
//
void T_SpectreWait (objtype *ob);
void A_Dormant (objtype *ob);
extern statetype s_spectrewait1;
extern statetype s_spectrewait2;
extern statetype s_spectrewait3;
extern statetype s_spectrewait4;
extern statetype s_spectrechase1;
extern statetype s_spectrechase2;
extern statetype s_spectrechase3;
extern statetype s_spectrechase4;
extern statetype s_spectredie1;
extern statetype s_spectredie2;
extern statetype s_spectredie3;
extern statetype s_spectredie4;
extern statetype s_spectrewake;
statetype s_spectrewait1 = {false,SPR_SPECTRE_W1,10,T_Stand,NULL,&s_spectrewait2};
statetype s_spectrewait2 = {false,SPR_SPECTRE_W2,10,T_Stand,NULL,&s_spectrewait3};
statetype s_spectrewait3 = {false,SPR_SPECTRE_W3,10,T_Stand,NULL,&s_spectrewait4};
statetype s_spectrewait4 = {false,SPR_SPECTRE_W4,10,T_Stand,NULL,&s_spectrewait1};
statetype s_spectrechase1 = {false,SPR_SPECTRE_W1,10,T_Ghosts,NULL,&s_spectrechase2};
statetype s_spectrechase2 = {false,SPR_SPECTRE_W2,10,T_Ghosts,NULL,&s_spectrechase3};
statetype s_spectrechase3 = {false,SPR_SPECTRE_W3,10,T_Ghosts,NULL,&s_spectrechase4};
statetype s_spectrechase4 = {false,SPR_SPECTRE_W4,10,T_Ghosts,NULL,&s_spectrechase1};
statetype s_spectredie1 = {false,SPR_SPECTRE_F1,10,NULL,NULL,&s_spectredie2};
statetype s_spectredie2 = {false,SPR_SPECTRE_F2,10,NULL,NULL,&s_spectredie3};
statetype s_spectredie3 = {false,SPR_SPECTRE_F3,10,NULL,NULL,&s_spectredie4};
statetype s_spectredie4 = {false,SPR_SPECTRE_F4,300,NULL,NULL,&s_spectrewake};
statetype s_spectrewake = {false,SPR_SPECTRE_F4,10,NULL,A_Dormant,&s_spectrewake};
/* /*
=============== ===============
= =
...@@ -1886,7 +1194,6 @@ void SpawnSpectre (int tilex, int tiley) ...@@ -1886,7 +1194,6 @@ void SpawnSpectre (int tilex, int tiley)
gamestate.killtotal++; gamestate.killtotal++;
} }
/* /*
=============== ===============
= =
...@@ -1947,6 +1254,49 @@ moveok: ...@@ -1947,6 +1254,49 @@ moveok:
*/ */
#ifndef SPEAR #ifndef SPEAR
/*
===============
=
= SpawnBoss
=
===============
*/
void SpawnBoss (int tilex, int tiley)
{
SpawnNewObj (tilex,tiley,&s_bossstand);
new->speed = SPDPATROL;
new->obclass = bossobj;
new->hitpoints = starthitpoints[gamestate.difficulty][en_boss];
new->dir = south;
new->flags |= FL_SHOOTABLE|FL_AMBUSH;
if (!loadedgame)
gamestate.killtotal++;
}
/*
===============
=
= SpawnGretel
=
===============
*/
void SpawnGretel (int tilex, int tiley)
{
SpawnNewObj (tilex,tiley,&s_gretelstand);
new->speed = SPDPATROL;
new->obclass = gretelobj;
new->hitpoints = starthitpoints[gamestate.difficulty][en_gretel];
new->dir = north;
new->flags |= FL_SHOOTABLE|FL_AMBUSH;
if (!loadedgame)
gamestate.killtotal++;
}
/* /*
=============== ===============
= =
...@@ -1982,185 +1332,6 @@ void SpawnGhosts (int which, int tilex, int tiley) ...@@ -1982,185 +1332,6 @@ void SpawnGhosts (int which, int tilex, int tiley)
gamestate.killtotal++; gamestate.killtotal++;
} }
void T_Gift (objtype *ob);
void T_GiftThrow (objtype *ob);
void T_Fat (objtype *ob);
void T_FatThrow (objtype *ob);
//
// schabb
//
extern statetype s_schabbstand;
extern statetype s_schabbchase1;
extern statetype s_schabbchase1s;
extern statetype s_schabbchase2;
extern statetype s_schabbchase3;
extern statetype s_schabbchase3s;
extern statetype s_schabbchase4;
extern statetype s_schabbdie1;
extern statetype s_schabbdie2;
extern statetype s_schabbdie3;
extern statetype s_schabbdie4;
extern statetype s_schabbdie5;
extern statetype s_schabbdie6;
extern statetype s_schabbshoot1;
extern statetype s_schabbshoot2;
extern statetype s_needle1;
extern statetype s_needle2;
extern statetype s_needle3;
extern statetype s_needle4;
extern statetype s_schabbdeathcam;
statetype s_schabbstand = {false,SPR_SCHABB_W1,0,T_Stand,NULL,&s_schabbstand};
statetype s_schabbchase1 = {false,SPR_SCHABB_W1,10,T_Schabb,NULL,&s_schabbchase1s};
statetype s_schabbchase1s = {false,SPR_SCHABB_W1,3,NULL,NULL,&s_schabbchase2};
statetype s_schabbchase2 = {false,SPR_SCHABB_W2,8,T_Schabb,NULL,&s_schabbchase3};
statetype s_schabbchase3 = {false,SPR_SCHABB_W3,10,T_Schabb,NULL,&s_schabbchase3s};
statetype s_schabbchase3s = {false,SPR_SCHABB_W3,3,NULL,NULL,&s_schabbchase4};
statetype s_schabbchase4 = {false,SPR_SCHABB_W4,8,T_Schabb,NULL,&s_schabbchase1};
statetype s_schabbdeathcam = {false,SPR_SCHABB_W1,1,NULL,NULL,&s_schabbdie1};
statetype s_schabbdie1 = {false,SPR_SCHABB_W1,10,NULL,A_DeathScream,&s_schabbdie2};
statetype s_schabbdie2 = {false,SPR_SCHABB_W1,10,NULL,NULL,&s_schabbdie3};
statetype s_schabbdie3 = {false,SPR_SCHABB_DIE1,10,NULL,NULL,&s_schabbdie4};
statetype s_schabbdie4 = {false,SPR_SCHABB_DIE2,10,NULL,NULL,&s_schabbdie5};
statetype s_schabbdie5 = {false,SPR_SCHABB_DIE3,10,NULL,NULL,&s_schabbdie6};
statetype s_schabbdie6 = {false,SPR_SCHABB_DEAD,20,NULL,A_StartDeathCam,&s_schabbdie6};
statetype s_schabbshoot1 = {false,SPR_SCHABB_SHOOT1,30,NULL,NULL,&s_schabbshoot2};
statetype s_schabbshoot2 = {false,SPR_SCHABB_SHOOT2,10,NULL,T_SchabbThrow,&s_schabbchase1};
statetype s_needle1 = {false,SPR_HYPO1,6,T_Projectile,NULL,&s_needle2};
statetype s_needle2 = {false,SPR_HYPO2,6,T_Projectile,NULL,&s_needle3};
statetype s_needle3 = {false,SPR_HYPO3,6,T_Projectile,NULL,&s_needle4};
statetype s_needle4 = {false,SPR_HYPO4,6,T_Projectile,NULL,&s_needle1};
//
// gift
//
extern statetype s_giftstand;
extern statetype s_giftchase1;
extern statetype s_giftchase1s;
extern statetype s_giftchase2;
extern statetype s_giftchase3;
extern statetype s_giftchase3s;
extern statetype s_giftchase4;
extern statetype s_giftdie1;
extern statetype s_giftdie2;
extern statetype s_giftdie3;
extern statetype s_giftdie4;
extern statetype s_giftdie5;
extern statetype s_giftdie6;
extern statetype s_giftshoot1;
extern statetype s_giftshoot2;
extern statetype s_needle1;
extern statetype s_needle2;
extern statetype s_needle3;
extern statetype s_needle4;
extern statetype s_giftdeathcam;
extern statetype s_boom1;
extern statetype s_boom2;
extern statetype s_boom3;
statetype s_giftstand = {false,SPR_GIFT_W1,0,T_Stand,NULL,&s_giftstand};
statetype s_giftchase1 = {false,SPR_GIFT_W1,10,T_Gift,NULL,&s_giftchase1s};
statetype s_giftchase1s = {false,SPR_GIFT_W1,3,NULL,NULL,&s_giftchase2};
statetype s_giftchase2 = {false,SPR_GIFT_W2,8,T_Gift,NULL,&s_giftchase3};
statetype s_giftchase3 = {false,SPR_GIFT_W3,10,T_Gift,NULL,&s_giftchase3s};
statetype s_giftchase3s = {false,SPR_GIFT_W3,3,NULL,NULL,&s_giftchase4};
statetype s_giftchase4 = {false,SPR_GIFT_W4,8,T_Gift,NULL,&s_giftchase1};
statetype s_giftdeathcam = {false,SPR_GIFT_W1,1,NULL,NULL,&s_giftdie1};
statetype s_giftdie1 = {false,SPR_GIFT_W1,1,NULL,A_DeathScream,&s_giftdie2};
statetype s_giftdie2 = {false,SPR_GIFT_W1,10,NULL,NULL,&s_giftdie3};
statetype s_giftdie3 = {false,SPR_GIFT_DIE1,10,NULL,NULL,&s_giftdie4};
statetype s_giftdie4 = {false,SPR_GIFT_DIE2,10,NULL,NULL,&s_giftdie5};
statetype s_giftdie5 = {false,SPR_GIFT_DIE3,10,NULL,NULL,&s_giftdie6};
statetype s_giftdie6 = {false,SPR_GIFT_DEAD,20,NULL,A_StartDeathCam,&s_giftdie6};
statetype s_giftshoot1 = {false,SPR_GIFT_SHOOT1,30,NULL,NULL,&s_giftshoot2};
statetype s_giftshoot2 = {false,SPR_GIFT_SHOOT2,10,NULL,T_GiftThrow,&s_giftchase1};
//
// fat
//
extern statetype s_fatstand;
extern statetype s_fatchase1;
extern statetype s_fatchase1s;
extern statetype s_fatchase2;
extern statetype s_fatchase3;
extern statetype s_fatchase3s;
extern statetype s_fatchase4;
extern statetype s_fatdie1;
extern statetype s_fatdie2;
extern statetype s_fatdie3;
extern statetype s_fatdie4;
extern statetype s_fatdie5;
extern statetype s_fatdie6;
extern statetype s_fatshoot1;
extern statetype s_fatshoot2;
extern statetype s_fatshoot3;
extern statetype s_fatshoot4;
extern statetype s_fatshoot5;
extern statetype s_fatshoot6;
extern statetype s_needle1;
extern statetype s_needle2;
extern statetype s_needle3;
extern statetype s_needle4;
extern statetype s_fatdeathcam;
statetype s_fatstand = {false,SPR_FAT_W1,0,T_Stand,NULL,&s_fatstand};
statetype s_fatchase1 = {false,SPR_FAT_W1,10,T_Fat,NULL,&s_fatchase1s};
statetype s_fatchase1s = {false,SPR_FAT_W1,3,NULL,NULL,&s_fatchase2};
statetype s_fatchase2 = {false,SPR_FAT_W2,8,T_Fat,NULL,&s_fatchase3};
statetype s_fatchase3 = {false,SPR_FAT_W3,10,T_Fat,NULL,&s_fatchase3s};
statetype s_fatchase3s = {false,SPR_FAT_W3,3,NULL,NULL,&s_fatchase4};
statetype s_fatchase4 = {false,SPR_FAT_W4,8,T_Fat,NULL,&s_fatchase1};
statetype s_fatdeathcam = {false,SPR_FAT_W1,1,NULL,NULL,&s_fatdie1};
statetype s_fatdie1 = {false,SPR_FAT_W1,1,NULL,A_DeathScream,&s_fatdie2};
statetype s_fatdie2 = {false,SPR_FAT_W1,10,NULL,NULL,&s_fatdie3};
statetype s_fatdie3 = {false,SPR_FAT_DIE1,10,NULL,NULL,&s_fatdie4};
statetype s_fatdie4 = {false,SPR_FAT_DIE2,10,NULL,NULL,&s_fatdie5};
statetype s_fatdie5 = {false,SPR_FAT_DIE3,10,NULL,NULL,&s_fatdie6};
statetype s_fatdie6 = {false,SPR_FAT_DEAD,20,NULL,A_StartDeathCam,&s_fatdie6};
statetype s_fatshoot1 = {false,SPR_FAT_SHOOT1,30,NULL,NULL,&s_fatshoot2};
statetype s_fatshoot2 = {false,SPR_FAT_SHOOT2,10,NULL,T_GiftThrow,&s_fatshoot3};
statetype s_fatshoot3 = {false,SPR_FAT_SHOOT3,10,NULL,T_Shoot,&s_fatshoot4};
statetype s_fatshoot4 = {false,SPR_FAT_SHOOT4,10,NULL,T_Shoot,&s_fatshoot5};
statetype s_fatshoot5 = {false,SPR_FAT_SHOOT3,10,NULL,T_Shoot,&s_fatshoot6};
statetype s_fatshoot6 = {false,SPR_FAT_SHOOT4,10,NULL,T_Shoot,&s_fatchase1};
/* /*
=============== ===============
= =
...@@ -2279,9 +1450,7 @@ void T_SchabbThrow (objtype *ob) ...@@ -2279,9 +1450,7 @@ void T_SchabbThrow (objtype *ob)
new->flags = FL_NONMARK; new->flags = FL_NONMARK;
new->active = true; new->active = true;
#ifndef UPLOAD
PlaySoundLocActor(SCHABBSTHROWSND, new); PlaySoundLocActor(SCHABBSTHROWSND, new);
#endif
} }
/* /*
...@@ -2292,11 +1461,11 @@ void T_SchabbThrow (objtype *ob) ...@@ -2292,11 +1461,11 @@ void T_SchabbThrow (objtype *ob)
================= =================
*/ */
void T_GiftThrow (objtype *ob) void T_GiftThrow(objtype *ob)
{ {
long deltax,deltay; long deltax,deltay;
float angle; float angle;
int iangle; int iangle;
deltax = player->x - ob->x; deltax = player->x - ob->x;
deltay = ob->y - player->y; deltay = ob->y - player->y;
...@@ -2320,9 +1489,7 @@ void T_GiftThrow (objtype *ob) ...@@ -2320,9 +1489,7 @@ void T_GiftThrow (objtype *ob)
new->flags = FL_NONMARK; new->flags = FL_NONMARK;
new->active = true; new->active = true;
#ifndef UPLOAD
PlaySoundLocActor(MISSILEFIRESND, new); PlaySoundLocActor(MISSILEFIRESND, new);
#endif
} }
...@@ -2611,168 +1778,6 @@ void T_Fat (objtype *ob) ...@@ -2611,168 +1778,6 @@ void T_Fat (objtype *ob)
*/ */
//
// fake
//
extern statetype s_fakestand;
extern statetype s_fakechase1;
extern statetype s_fakechase1s;
extern statetype s_fakechase2;
extern statetype s_fakechase3;
extern statetype s_fakechase3s;
extern statetype s_fakechase4;
extern statetype s_fakedie1;
extern statetype s_fakedie2;
extern statetype s_fakedie3;
extern statetype s_fakedie4;
extern statetype s_fakedie5;
extern statetype s_fakedie6;
extern statetype s_fakeshoot1;
extern statetype s_fakeshoot2;
extern statetype s_fakeshoot3;
extern statetype s_fakeshoot4;
extern statetype s_fakeshoot5;
extern statetype s_fakeshoot6;
extern statetype s_fakeshoot7;
extern statetype s_fakeshoot8;
extern statetype s_fakeshoot9;
extern statetype s_fire1;
extern statetype s_fire2;
statetype s_fakestand = {false,SPR_FAKE_W1,0,T_Stand,NULL,&s_fakestand};
statetype s_fakechase1 = {false,SPR_FAKE_W1,10,T_Fake,NULL,&s_fakechase1s};
statetype s_fakechase1s = {false,SPR_FAKE_W1,3,NULL,NULL,&s_fakechase2};
statetype s_fakechase2 = {false,SPR_FAKE_W2,8,T_Fake,NULL,&s_fakechase3};
statetype s_fakechase3 = {false,SPR_FAKE_W3,10,T_Fake,NULL,&s_fakechase3s};
statetype s_fakechase3s = {false,SPR_FAKE_W3,3,NULL,NULL,&s_fakechase4};
statetype s_fakechase4 = {false,SPR_FAKE_W4,8,T_Fake,NULL,&s_fakechase1};
statetype s_fakedie1 = {false,SPR_FAKE_DIE1,10,NULL,A_DeathScream,&s_fakedie2};
statetype s_fakedie2 = {false,SPR_FAKE_DIE2,10,NULL,NULL,&s_fakedie3};
statetype s_fakedie3 = {false,SPR_FAKE_DIE3,10,NULL,NULL,&s_fakedie4};
statetype s_fakedie4 = {false,SPR_FAKE_DIE4,10,NULL,NULL,&s_fakedie5};
statetype s_fakedie5 = {false,SPR_FAKE_DIE5,10,NULL,NULL,&s_fakedie6};
statetype s_fakedie6 = {false,SPR_FAKE_DEAD,0,NULL,NULL,&s_fakedie6};
statetype s_fakeshoot1 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot2};
statetype s_fakeshoot2 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot3};
statetype s_fakeshoot3 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot4};
statetype s_fakeshoot4 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot5};
statetype s_fakeshoot5 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot6};
statetype s_fakeshoot6 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot7};
statetype s_fakeshoot7 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot8};
statetype s_fakeshoot8 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot9};
statetype s_fakeshoot9 = {false,SPR_FAKE_SHOOT,8,NULL,NULL,&s_fakechase1};
statetype s_fire1 = {false,SPR_FIRE1,6,NULL,T_Projectile,&s_fire2};
statetype s_fire2 = {false,SPR_FIRE2,6,NULL,T_Projectile,&s_fire1};
//
// hitler
//
extern statetype s_mechachase1;
extern statetype s_mechachase1s;
extern statetype s_mechachase2;
extern statetype s_mechachase3;
extern statetype s_mechachase3s;
extern statetype s_mechachase4;
extern statetype s_mechadie1;
extern statetype s_mechadie2;
extern statetype s_mechadie3;
extern statetype s_mechadie4;
extern statetype s_mechashoot1;
extern statetype s_mechashoot2;
extern statetype s_mechashoot3;
extern statetype s_mechashoot4;
extern statetype s_mechashoot5;
extern statetype s_mechashoot6;
extern statetype s_hitlerchase1;
extern statetype s_hitlerchase1s;
extern statetype s_hitlerchase2;
extern statetype s_hitlerchase3;
extern statetype s_hitlerchase3s;
extern statetype s_hitlerchase4;
extern statetype s_hitlerdie1;
extern statetype s_hitlerdie2;
extern statetype s_hitlerdie3;
extern statetype s_hitlerdie4;
extern statetype s_hitlerdie5;
extern statetype s_hitlerdie6;
extern statetype s_hitlerdie7;
extern statetype s_hitlerdie8;
extern statetype s_hitlerdie9;
extern statetype s_hitlerdie10;
extern statetype s_hitlershoot1;
extern statetype s_hitlershoot2;
extern statetype s_hitlershoot3;
extern statetype s_hitlershoot4;
extern statetype s_hitlershoot5;
extern statetype s_hitlershoot6;
extern statetype s_hitlerdeathcam;
statetype s_mechastand = {false,SPR_MECHA_W1,0,T_Stand,NULL,&s_mechastand};
statetype s_mechachase1 = {false,SPR_MECHA_W1,10,T_Chase,A_MechaSound,&s_mechachase1s};
statetype s_mechachase1s = {false,SPR_MECHA_W1,6,NULL,NULL,&s_mechachase2};
statetype s_mechachase2 = {false,SPR_MECHA_W2,8,T_Chase,NULL,&s_mechachase3};
statetype s_mechachase3 = {false,SPR_MECHA_W3,10,T_Chase,A_MechaSound,&s_mechachase3s};
statetype s_mechachase3s = {false,SPR_MECHA_W3,6,NULL,NULL,&s_mechachase4};
statetype s_mechachase4 = {false,SPR_MECHA_W4,8,T_Chase,NULL,&s_mechachase1};
statetype s_mechadie1 = {false,SPR_MECHA_DIE1,10,NULL,A_DeathScream,&s_mechadie2};
statetype s_mechadie2 = {false,SPR_MECHA_DIE2,10,NULL,NULL,&s_mechadie3};
statetype s_mechadie3 = {false,SPR_MECHA_DIE3,10,NULL,A_HitlerMorph,&s_mechadie4};
statetype s_mechadie4 = {false,SPR_MECHA_DEAD,0,NULL,NULL,&s_mechadie4};
statetype s_mechashoot1 = {false,SPR_MECHA_SHOOT1,30,NULL,NULL,&s_mechashoot2};
statetype s_mechashoot2 = {false,SPR_MECHA_SHOOT2,10,NULL,T_Shoot,&s_mechashoot3};
statetype s_mechashoot3 = {false,SPR_MECHA_SHOOT3,10,NULL,T_Shoot,&s_mechashoot4};
statetype s_mechashoot4 = {false,SPR_MECHA_SHOOT2,10,NULL,T_Shoot,&s_mechashoot5};
statetype s_mechashoot5 = {false,SPR_MECHA_SHOOT3,10,NULL,T_Shoot,&s_mechashoot6};
statetype s_mechashoot6 = {false,SPR_MECHA_SHOOT2,10,NULL,T_Shoot,&s_mechachase1};
statetype s_hitlerchase1 = {false,SPR_HITLER_W1,6,T_Chase,NULL,&s_hitlerchase1s};
statetype s_hitlerchase1s = {false,SPR_HITLER_W1,4,NULL,NULL,&s_hitlerchase2};
statetype s_hitlerchase2 = {false,SPR_HITLER_W2,2,T_Chase,NULL,&s_hitlerchase3};
statetype s_hitlerchase3 = {false,SPR_HITLER_W3,6,T_Chase,NULL,&s_hitlerchase3s};
statetype s_hitlerchase3s = {false,SPR_HITLER_W3,4,NULL,NULL,&s_hitlerchase4};
statetype s_hitlerchase4 = {false,SPR_HITLER_W4,2,T_Chase,NULL,&s_hitlerchase1};
statetype s_hitlerdeathcam = {false,SPR_HITLER_W1,10,NULL,NULL,&s_hitlerdie1};
statetype s_hitlerdie1 = {false,SPR_HITLER_W1,1,NULL,A_DeathScream,&s_hitlerdie2};
statetype s_hitlerdie2 = {false,SPR_HITLER_W1,10,NULL,NULL,&s_hitlerdie3};
statetype s_hitlerdie3 = {false,SPR_HITLER_DIE1,10,NULL,A_Slurpie,&s_hitlerdie4};
statetype s_hitlerdie4 = {false,SPR_HITLER_DIE2,10,NULL,NULL,&s_hitlerdie5};
statetype s_hitlerdie5 = {false,SPR_HITLER_DIE3,10,NULL,NULL,&s_hitlerdie6};
statetype s_hitlerdie6 = {false,SPR_HITLER_DIE4,10,NULL,NULL,&s_hitlerdie7};
statetype s_hitlerdie7 = {false,SPR_HITLER_DIE5,10,NULL,NULL,&s_hitlerdie8};
statetype s_hitlerdie8 = {false,SPR_HITLER_DIE6,10,NULL,NULL,&s_hitlerdie9};
statetype s_hitlerdie9 = {false,SPR_HITLER_DIE7,10,NULL,NULL,&s_hitlerdie10};
statetype s_hitlerdie10 = {false,SPR_HITLER_DEAD,20,NULL,A_StartDeathCam,&s_hitlerdie10};
statetype s_hitlershoot1 = {false,SPR_HITLER_SHOOT1,30,NULL,NULL,&s_hitlershoot2};
statetype s_hitlershoot2 = {false,SPR_HITLER_SHOOT2,10,NULL,T_Shoot,&s_hitlershoot3};
statetype s_hitlershoot3 = {false,SPR_HITLER_SHOOT3,10,NULL,T_Shoot,&s_hitlershoot4};
statetype s_hitlershoot4 = {false,SPR_HITLER_SHOOT2,10,NULL,T_Shoot,&s_hitlershoot5};
statetype s_hitlershoot5 = {false,SPR_HITLER_SHOOT3,10,NULL,T_Shoot,&s_hitlershoot6};
statetype s_hitlershoot6 = {false,SPR_HITLER_SHOOT2,10,NULL,T_Shoot,&s_hitlerchase1};
/* /*
=============== ===============
= =
...@@ -2863,10 +1868,8 @@ void A_HitlerMorph (objtype *ob) ...@@ -2863,10 +1868,8 @@ void A_HitlerMorph (objtype *ob)
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
void A_MechaSound(objtype *ob) void A_MechaSound(objtype *ob)
{ {
#ifndef UPLOAD
if (areabyplayer[ob->areanumber]) if (areabyplayer[ob->areanumber])
PlaySoundLocActor(MECHSTEPSND, ob); PlaySoundLocActor(MECHSTEPSND, ob);
#endif
} }
...@@ -2911,9 +1914,7 @@ void T_FakeFire (objtype *ob) ...@@ -2911,9 +1914,7 @@ void T_FakeFire (objtype *ob)
new->flags = FL_NEVERMARK; new->flags = FL_NEVERMARK;
new->active = true; new->active = true;
#ifndef UPLOAD
PlaySoundLocActor(FLAMETHROWERSND, new); PlaySoundLocActor(FLAMETHROWERSND, new);
#endif
} }
/* /*
...@@ -3272,245 +2273,6 @@ void T_DogChase (objtype *ob) ...@@ -3272,245 +2273,6 @@ void T_DogChase (objtype *ob)
/*
============================================================================
PATH
============================================================================
*/
/*
===============
=
= SelectPathDir
=
===============
*/
void SelectPathDir(objtype *ob)
{
unsigned spot;
spot = *(mapsegs[1]+farmapylookup[ob->tiley]+ob->tilex)-ICONARROWS;
if (spot<8)
{
// new direction
ob->dir = spot;
}
ob->distance = TILEGLOBAL;
if (!TryWalk (ob))
ob->dir = nodir;
}
/*
===============
=
= T_Path
=
===============
*/
void T_Path (objtype *ob)
{
long move;
if (SightPlayer (ob))
return;
if (ob->dir == nodir)
{
SelectPathDir (ob);
if (ob->dir == nodir)
return; // all movement is blocked
}
move = ob->speed*tics;
while (move)
{
if (ob->distance < 0)
{
//
// waiting for a door to open
//
OpenDoor (-ob->distance-1);
if (doorobjlist[-ob->distance-1].action != dr_open)
return;
ob->distance = TILEGLOBAL; // go ahead, the door is now opoen
}
if (move < ob->distance)
{
MoveObj (ob,move);
break;
}
if (ob->tilex>MAPSIZE || ob->tiley>MAPSIZE)
{
sprintf(str,"T_Path hit a wall at %u,%u, dir %u"
,ob->tilex,ob->tiley,ob->dir);
Quit(str);
}
ob->x = ((long)ob->tilex<<TILESHIFT)+TILEGLOBAL/2;
ob->y = ((long)ob->tiley<<TILESHIFT)+TILEGLOBAL/2;
move -= ob->distance;
SelectPathDir (ob);
if (ob->dir == nodir)
return; /* all movement is blocked */
}
}
/*
=============================================================================
FIGHT
=============================================================================
*/
/*
===============
=
= T_Shoot
=
= Try to damage the player, based on skill level and player's speed
=
===============
*/
void T_Shoot (objtype *ob)
{
int dx,dy,dist;
int hitchance,damage;
hitchance = 128;
if (!areabyplayer[ob->areanumber])
return;
if (!CheckLine (ob)) // player is behind a wall
return;
dx = abs(ob->tilex - player->tilex);
dy = abs(ob->tiley - player->tiley);
dist = dx>dy ? dx:dy;
if (ob->obclass == ssobj || ob->obclass == bossobj)
dist = dist*2/3; // ss are better shots
if (thrustspeed >= RUNSPEED)
{
if (ob->flags&FL_VISABLE)
hitchance = 160-dist*16; // player can see to dodge
else
hitchance = 160-dist*8;
}
else
{
if (ob->flags&FL_VISABLE)
hitchance = 256-dist*16; // player can see to dodge
else
hitchance = 256-dist*8;
}
// see if the shot was a hit
if (US_RndT()<hitchance)
{
if (dist<2)
damage = US_RndT()>>2;
else if (dist<4)
damage = US_RndT()>>3;
else
damage = US_RndT()>>4;
TakeDamage (damage,ob);
}
switch(ob->obclass)
{
case ssobj:
PlaySoundLocActor(SSFIRESND,ob);
break;
#ifndef SPEAR
case giftobj:
case fatobj:
#ifndef UPLOAD
PlaySoundLocActor(MISSILEFIRESND,ob);
#endif
break;
case mechahitlerobj:
case realhitlerobj:
case bossobj:
PlaySoundLocActor(BOSSFIRESND,ob);
break;
#ifndef UPLOAD
case schabbobj:
PlaySoundLocActor(SCHABBSTHROWSND,ob);
break;
case fakeobj:
PlaySoundLocActor(FLAMETHROWERSND,ob);
break;
#endif
#endif
default:
PlaySoundLocActor(NAZIFIRESND,ob);
}
}
/*
===============
=
= T_Bite
=
===============
*/
void T_Bite (objtype *ob)
{
long dx,dy;
PlaySoundLocActor(DOGATTACKSND,ob); // JAB
dx = player->x - ob->x;
if (dx<0)
dx = -dx;
dx -= TILEGLOBAL;
if (dx <= MINACTORDIST)
{
dy = player->y - ob->y;
if (dy<0)
dy = -dy;
dy -= TILEGLOBAL;
if (dy <= MINACTORDIST)
{
if (US_RndT()<180)
{
TakeDamage (US_RndT()>>4,ob);
return;
}
}
}
return;
}
#ifndef SPEAR #ifndef SPEAR
/* /*
...@@ -3522,46 +2284,6 @@ void T_Bite (objtype *ob) ...@@ -3522,46 +2284,6 @@ void T_Bite (objtype *ob)
*/ */
//
// BJ victory
//
void T_BJRun (objtype *ob);
void T_BJJump (objtype *ob);
void T_BJDone (objtype *ob);
void T_BJYell (objtype *ob);
void T_DeathCam (objtype *ob);
extern statetype s_bjrun1;
extern statetype s_bjrun1s;
extern statetype s_bjrun2;
extern statetype s_bjrun3;
extern statetype s_bjrun3s;
extern statetype s_bjrun4;
extern statetype s_bjjump1;
extern statetype s_bjjump2;
extern statetype s_bjjump3;
extern statetype s_bjjump4;
statetype s_bjrun1 = {false,SPR_BJ_W1,12,T_BJRun,NULL,&s_bjrun1s};
statetype s_bjrun1s = {false,SPR_BJ_W1,3, NULL,NULL,&s_bjrun2};
statetype s_bjrun2 = {false,SPR_BJ_W2,8,T_BJRun,NULL,&s_bjrun3};
statetype s_bjrun3 = {false,SPR_BJ_W3,12,T_BJRun,NULL,&s_bjrun3s};
statetype s_bjrun3s = {false,SPR_BJ_W3,3, NULL,NULL,&s_bjrun4};
statetype s_bjrun4 = {false,SPR_BJ_W4,8,T_BJRun,NULL,&s_bjrun1};
statetype s_bjjump1 = {false,SPR_BJ_JUMP1,14,T_BJJump,NULL,&s_bjjump2};
statetype s_bjjump2 = {false,SPR_BJ_JUMP2,14,T_BJJump,T_BJYell,&s_bjjump3};
statetype s_bjjump3 = {false,SPR_BJ_JUMP3,14,T_BJJump,NULL,&s_bjjump4};
statetype s_bjjump4 = {false,SPR_BJ_JUMP4,300,NULL,T_BJDone,&s_bjjump4};
statetype s_deathcam = {false,0,0,NULL,NULL,NULL};
/* /*
=============== ===============
...@@ -3571,9 +2293,9 @@ statetype s_deathcam = {false,0,0,NULL,NULL,NULL}; ...@@ -3571,9 +2293,9 @@ statetype s_deathcam = {false,0,0,NULL,NULL,NULL};
=============== ===============
*/ */
void SpawnBJVictory (void) void SpawnBJVictory()
{ {
SpawnNewObj (player->tilex,player->tiley+1,&s_bjrun1); SpawnNewObj(player->tilex,player->tiley+1, &s_bjrun1);
new->x = player->x; new->x = player->x;
new->y = player->y; new->y = player->y;
new->obclass = bjobj; new->obclass = bjobj;
...@@ -3591,9 +2313,9 @@ void SpawnBJVictory (void) ...@@ -3591,9 +2313,9 @@ void SpawnBJVictory (void)
=============== ===============
*/ */
void T_BJRun (objtype *ob) void T_BJRun(objtype *ob)
{ {
long move; long move;
move = BJRUNSPEED*tics; move = BJRUNSPEED*tics;
...@@ -3605,16 +2327,15 @@ void T_BJRun (objtype *ob) ...@@ -3605,16 +2327,15 @@ void T_BJRun (objtype *ob)
break; break;
} }
ob->x = ((long)ob->tilex<<TILESHIFT)+TILEGLOBAL/2; ob->x = ((long)ob->tilex<<TILESHIFT)+TILEGLOBAL/2;
ob->y = ((long)ob->tiley<<TILESHIFT)+TILEGLOBAL/2; ob->y = ((long)ob->tiley<<TILESHIFT)+TILEGLOBAL/2;
move -= ob->distance; move -= ob->distance;
SelectPathDir (ob); SelectPathDir (ob);
if ( !(--ob->temp1) ) if (!(--ob->temp1))
{ {
NewState (ob,&s_bjjump1); NewState(ob,&s_bjjump1);
return; return;
} }
} }
...@@ -3634,7 +2355,7 @@ void T_BJJump(objtype *ob) ...@@ -3634,7 +2355,7 @@ void T_BJJump(objtype *ob)
long move; long move;
move = BJJUMPSPEED*tics; move = BJJUMPSPEED*tics;
MoveObj (ob,move); MoveObj(ob,move);
} }
...@@ -3660,7 +2381,7 @@ void T_BJYell(objtype *ob) ...@@ -3660,7 +2381,7 @@ void T_BJYell(objtype *ob)
=============== ===============
*/ */
void T_BJDone (objtype *ob) void T_BJDone(objtype *ob)
{ {
playstate = ex_victorious; // exit castle tile playstate = ex_victorious; // exit castle tile
} }
...@@ -3712,16 +2433,16 @@ boolean CheckPosition (objtype *ob) ...@@ -3712,16 +2433,16 @@ boolean CheckPosition (objtype *ob)
=============== ===============
*/ */
void A_StartDeathCam (objtype *ob) void A_StartDeathCam(objtype *ob)
{ {
long dx,dy; long dx,dy;
float fangle; float fangle;
long xmove,ymove; long xmove,ymove;
long dist; long dist;
FinishPaletteShifts (); FinishPaletteShifts();
VW_WaitVBL (100); VW_WaitVBL(100);
if (gamestate.victoryflag) if (gamestate.victoryflag)
{ {
...@@ -3788,20 +2509,18 @@ void A_StartDeathCam (objtype *ob) ...@@ -3788,20 +2509,18 @@ void A_StartDeathCam (objtype *ob)
fizzlein = true; fizzlein = true;
switch (ob->obclass) switch (ob->obclass)
{ {
#ifndef SPEAR
case schabbobj: case schabbobj:
NewState (ob,&s_schabbdeathcam); NewState(ob, &s_schabbdeathcam);
break; break;
case realhitlerobj: case realhitlerobj:
NewState (ob,&s_hitlerdeathcam); NewState(ob, &s_hitlerdeathcam);
break; break;
case giftobj: case giftobj:
NewState (ob,&s_giftdeathcam); NewState(ob, &s_giftdeathcam);
break; break;
case fatobj: case fatobj:
NewState (ob,&s_fatdeathcam); NewState(ob, &s_fatdeathcam);
break; break;
#endif
default: default:
break; break;
} }
......
#include "wl_def.h"
void A_StartDeathCam (objtype *ob);
void T_Path (objtype *ob);
void T_Shoot (objtype *ob);
void T_Bite (objtype *ob);
void T_DogChase (objtype *ob);
void T_Chase (objtype *ob);
void T_Projectile (objtype *ob);
void T_Stand (objtype *ob);
void A_Smoke (objtype *ob);
void T_Schabb(objtype *ob);
void T_SchabbThrow(objtype *ob);
void T_Fake(objtype *ob);
void T_FakeFire(objtype *ob);
void T_Ghosts(objtype *ob);
void A_Slurpie(objtype *ob);
void A_HitlerMorph(objtype *ob);
void A_MechaSound(objtype *ob);
void T_UShoot (objtype *ob);
void T_Launch (objtype *ob);
void T_Will (objtype *ob);
void A_Relaunch (objtype *ob);
void A_Victory (objtype *ob);
void A_StartAttack (objtype *ob);
void A_Breathing (objtype *ob);
void T_SpectreWait (objtype *ob);
void A_Dormant (objtype *ob);
void T_Gift (objtype *ob);
void T_GiftThrow (objtype *ob);
void T_Fat (objtype *ob);
void T_FatThrow (objtype *ob);
void T_BJRun (objtype *ob);
void T_BJJump (objtype *ob);
void T_BJDone (objtype *ob);
void T_BJYell (objtype *ob);
void T_DeathCam (objtype *ob);
void T_Player(objtype *ob);
void T_Attack(objtype *ob);
statetype s_boom1 = {false,SPR_BOOM_1,6,NULL,NULL,&s_boom2};
statetype s_boom2 = {false,SPR_BOOM_2,6,NULL,NULL,&s_boom3};
statetype s_boom3 = {false,SPR_BOOM_3,6,NULL,NULL,NULL};
statetype s_rocket = {true,SPR_ROCKET_1,3,T_Projectile,A_Smoke,&s_rocket};
statetype s_smoke1 = {false,SPR_SMOKE_1,3,NULL,NULL,&s_smoke2};
statetype s_smoke2 = {false,SPR_SMOKE_2,3,NULL,NULL,&s_smoke3};
statetype s_smoke3 = {false,SPR_SMOKE_3,3,NULL,NULL,&s_smoke4};
statetype s_smoke4 = {false,SPR_SMOKE_4,3,NULL,NULL,NULL};
/* guards */
statetype s_grdstand = {true,SPR_GRD_S_1,0,T_Stand,NULL,&s_grdstand};
statetype s_grdpath1 = {true,SPR_GRD_W1_1,20,T_Path,NULL,&s_grdpath1s};
statetype s_grdpath1s = {true,SPR_GRD_W1_1,5,NULL,NULL,&s_grdpath2};
statetype s_grdpath2 = {true,SPR_GRD_W2_1,15,T_Path,NULL,&s_grdpath3};
statetype s_grdpath3 = {true,SPR_GRD_W3_1,20,T_Path,NULL,&s_grdpath3s};
statetype s_grdpath3s = {true,SPR_GRD_W3_1,5,NULL,NULL,&s_grdpath4};
statetype s_grdpath4 = {true,SPR_GRD_W4_1,15,T_Path,NULL,&s_grdpath1};
statetype s_grdpain = {2,SPR_GRD_PAIN_1,10,NULL,NULL,&s_grdchase1};
statetype s_grdpain1 = {2,SPR_GRD_PAIN_2,10,NULL,NULL,&s_grdchase1};
statetype s_grdshoot1 = {false,SPR_GRD_SHOOT1,20,NULL,NULL,&s_grdshoot2};
statetype s_grdshoot2 = {false,SPR_GRD_SHOOT2,20,NULL,T_Shoot,&s_grdshoot3};
statetype s_grdshoot3 = {false,SPR_GRD_SHOOT3,20,NULL,NULL,&s_grdchase1};
statetype s_grdchase1 = {true,SPR_GRD_W1_1,10,T_Chase,NULL,&s_grdchase1s};
statetype s_grdchase1s = {true,SPR_GRD_W1_1,3,NULL,NULL,&s_grdchase2};
statetype s_grdchase2 = {true,SPR_GRD_W2_1,8,T_Chase,NULL,&s_grdchase3};
statetype s_grdchase3 = {true,SPR_GRD_W3_1,10,T_Chase,NULL,&s_grdchase3s};
statetype s_grdchase3s = {true,SPR_GRD_W3_1,3,NULL,NULL,&s_grdchase4};
statetype s_grdchase4 = {true,SPR_GRD_W4_1,8,T_Chase,NULL,&s_grdchase1};
statetype s_grddie1 = {false,SPR_GRD_DIE_1,15,NULL,A_DeathScream,&s_grddie2};
statetype s_grddie2 = {false,SPR_GRD_DIE_2,15,NULL,NULL,&s_grddie3};
statetype s_grddie3 = {false,SPR_GRD_DIE_3,15,NULL,NULL,&s_grddie4};
statetype s_grddie4 = {false,SPR_GRD_DEAD,0,NULL,NULL,&s_grddie4};
statetype s_dogpath1 = {true,SPR_DOG_W1_1,20,T_Path,NULL,&s_dogpath1s};
statetype s_dogpath1s = {true,SPR_DOG_W1_1,5,NULL,NULL,&s_dogpath2};
statetype s_dogpath2 = {true,SPR_DOG_W2_1,15,T_Path,NULL,&s_dogpath3};
statetype s_dogpath3 = {true,SPR_DOG_W3_1,20,T_Path,NULL,&s_dogpath3s};
statetype s_dogpath3s = {true,SPR_DOG_W3_1,5,NULL,NULL,&s_dogpath4};
statetype s_dogpath4 = {true,SPR_DOG_W4_1,15,T_Path,NULL,&s_dogpath1};
statetype s_dogjump1 = {false,SPR_DOG_JUMP1,10,NULL,NULL,&s_dogjump2};
statetype s_dogjump2 = {false,SPR_DOG_JUMP2,10,NULL,T_Bite,&s_dogjump3};
statetype s_dogjump3 = {false,SPR_DOG_JUMP3,10,NULL,NULL,&s_dogjump4};
statetype s_dogjump4 = {false,SPR_DOG_JUMP1,10,NULL,NULL,&s_dogjump5};
statetype s_dogjump5 = {false,SPR_DOG_W1_1,10,NULL,NULL,&s_dogchase1};
statetype s_dogchase1 = {true,SPR_DOG_W1_1,10,T_DogChase,NULL,&s_dogchase1s};
statetype s_dogchase1s = {true,SPR_DOG_W1_1,3,NULL,NULL,&s_dogchase2};
statetype s_dogchase2 = {true,SPR_DOG_W2_1,8,T_DogChase,NULL,&s_dogchase3};
statetype s_dogchase3 = {true,SPR_DOG_W3_1,10,T_DogChase,NULL,&s_dogchase3s};
statetype s_dogchase3s = {true,SPR_DOG_W3_1,3,NULL,NULL,&s_dogchase4};
statetype s_dogchase4 = {true,SPR_DOG_W4_1,8,T_DogChase,NULL,&s_dogchase1};
statetype s_dogdie1 = {false,SPR_DOG_DIE_1,15,NULL,A_DeathScream,&s_dogdie2};
statetype s_dogdie2 = {false,SPR_DOG_DIE_2,15,NULL,NULL,&s_dogdie3};
statetype s_dogdie3 = {false,SPR_DOG_DIE_3,15,NULL,NULL,&s_dogdead};
statetype s_dogdead = {false,SPR_DOG_DEAD,15,NULL,NULL,&s_dogdead};
statetype s_ofcstand = {true,SPR_OFC_S_1,0,T_Stand,NULL,&s_ofcstand};
statetype s_ofcpath1 = {true,SPR_OFC_W1_1,20,T_Path,NULL,&s_ofcpath1s};
statetype s_ofcpath1s = {true,SPR_OFC_W1_1,5,NULL,NULL,&s_ofcpath2};
statetype s_ofcpath2 = {true,SPR_OFC_W2_1,15,T_Path,NULL,&s_ofcpath3};
statetype s_ofcpath3 = {true,SPR_OFC_W3_1,20,T_Path,NULL,&s_ofcpath3s};
statetype s_ofcpath3s = {true,SPR_OFC_W3_1,5,NULL,NULL,&s_ofcpath4};
statetype s_ofcpath4 = {true,SPR_OFC_W4_1,15,T_Path,NULL,&s_ofcpath1};
statetype s_ofcpain = {2,SPR_OFC_PAIN_1,10,NULL,NULL,&s_ofcchase1};
statetype s_ofcpain1 = {2,SPR_OFC_PAIN_2,10,NULL,NULL,&s_ofcchase1};
statetype s_ofcshoot1 = {false,SPR_OFC_SHOOT1,6,NULL,NULL,&s_ofcshoot2};
statetype s_ofcshoot2 = {false,SPR_OFC_SHOOT2,20,NULL,T_Shoot,&s_ofcshoot3};
statetype s_ofcshoot3 = {false,SPR_OFC_SHOOT3,10,NULL,NULL,&s_ofcchase1};
statetype s_ofcchase1 = {true,SPR_OFC_W1_1,10,T_Chase,NULL,&s_ofcchase1s};
statetype s_ofcchase1s = {true,SPR_OFC_W1_1,3,NULL,NULL,&s_ofcchase2};
statetype s_ofcchase2 = {true,SPR_OFC_W2_1,8,T_Chase,NULL,&s_ofcchase3};
statetype s_ofcchase3 = {true,SPR_OFC_W3_1,10,T_Chase,NULL,&s_ofcchase3s};
statetype s_ofcchase3s = {true,SPR_OFC_W3_1,3,NULL,NULL,&s_ofcchase4};
statetype s_ofcchase4 = {true,SPR_OFC_W4_1,8,T_Chase,NULL,&s_ofcchase1};
statetype s_ofcdie1 = {false,SPR_OFC_DIE_1,11,NULL,A_DeathScream,&s_ofcdie2};
statetype s_ofcdie2 = {false,SPR_OFC_DIE_2,11,NULL,NULL,&s_ofcdie3};
statetype s_ofcdie3 = {false,SPR_OFC_DIE_3,11,NULL,NULL,&s_ofcdie4};
statetype s_ofcdie4 = {false,SPR_OFC_DIE_4,11,NULL,NULL,&s_ofcdie5};
statetype s_ofcdie5 = {false,SPR_OFC_DEAD,0,NULL,NULL,&s_ofcdie5};
statetype s_mutstand = {true,SPR_MUT_S_1,0,T_Stand,NULL,&s_mutstand};
statetype s_mutpath1 = {true,SPR_MUT_W1_1,20,T_Path,NULL,&s_mutpath1s};
statetype s_mutpath1s = {true,SPR_MUT_W1_1,5,NULL,NULL,&s_mutpath2};
statetype s_mutpath2 = {true,SPR_MUT_W2_1,15,T_Path,NULL,&s_mutpath3};
statetype s_mutpath3 = {true,SPR_MUT_W3_1,20,T_Path,NULL,&s_mutpath3s};
statetype s_mutpath3s = {true,SPR_MUT_W3_1,5,NULL,NULL,&s_mutpath4};
statetype s_mutpath4 = {true,SPR_MUT_W4_1,15,T_Path,NULL,&s_mutpath1};
statetype s_mutpain = {2,SPR_MUT_PAIN_1,10,NULL,NULL,&s_mutchase1};
statetype s_mutpain1 = {2,SPR_MUT_PAIN_2,10,NULL,NULL,&s_mutchase1};
statetype s_mutshoot1 = {false,SPR_MUT_SHOOT1,6,NULL,T_Shoot,&s_mutshoot2};
statetype s_mutshoot2 = {false,SPR_MUT_SHOOT2,20,NULL,NULL,&s_mutshoot3};
statetype s_mutshoot3 = {false,SPR_MUT_SHOOT3,10,NULL,T_Shoot,&s_mutshoot4};
statetype s_mutshoot4 = {false,SPR_MUT_SHOOT4,20,NULL,NULL,&s_mutchase1};
statetype s_mutchase1 = {true,SPR_MUT_W1_1,10,T_Chase,NULL,&s_mutchase1s};
statetype s_mutchase1s = {true,SPR_MUT_W1_1,3,NULL,NULL,&s_mutchase2};
statetype s_mutchase2 = {true,SPR_MUT_W2_1,8,T_Chase,NULL,&s_mutchase3};
statetype s_mutchase3 = {true,SPR_MUT_W3_1,10,T_Chase,NULL,&s_mutchase3s};
statetype s_mutchase3s = {true,SPR_MUT_W3_1,3,NULL,NULL,&s_mutchase4};
statetype s_mutchase4 = {true,SPR_MUT_W4_1,8,T_Chase,NULL,&s_mutchase1};
statetype s_mutdie1 = {false,SPR_MUT_DIE_1,7,NULL,A_DeathScream,&s_mutdie2};
statetype s_mutdie2 = {false,SPR_MUT_DIE_2,7,NULL,NULL,&s_mutdie3};
statetype s_mutdie3 = {false,SPR_MUT_DIE_3,7,NULL,NULL,&s_mutdie4};
statetype s_mutdie4 = {false,SPR_MUT_DIE_4,7,NULL,NULL,&s_mutdie5};
statetype s_mutdie5 = {false,SPR_MUT_DEAD,0,NULL,NULL,&s_mutdie5};
statetype s_ssstand = {true,SPR_SS_S_1,0,T_Stand,NULL,&s_ssstand};
statetype s_sspath1 = {true,SPR_SS_W1_1,20,T_Path,NULL,&s_sspath1s};
statetype s_sspath1s = {true,SPR_SS_W1_1,5,NULL,NULL,&s_sspath2};
statetype s_sspath2 = {true,SPR_SS_W2_1,15,T_Path,NULL,&s_sspath3};
statetype s_sspath3 = {true,SPR_SS_W3_1,20,T_Path,NULL,&s_sspath3s};
statetype s_sspath3s = {true,SPR_SS_W3_1,5,NULL,NULL,&s_sspath4};
statetype s_sspath4 = {true,SPR_SS_W4_1,15,T_Path,NULL,&s_sspath1};
statetype s_sspain = {2,SPR_SS_PAIN_1,10,NULL,NULL,&s_sschase1};
statetype s_sspain1 = {2,SPR_SS_PAIN_2,10,NULL,NULL,&s_sschase1};
statetype s_ssshoot1 = {false,SPR_SS_SHOOT1,20,NULL,NULL,&s_ssshoot2};
statetype s_ssshoot2 = {false,SPR_SS_SHOOT2,20,NULL,T_Shoot,&s_ssshoot3};
statetype s_ssshoot3 = {false,SPR_SS_SHOOT3,10,NULL,NULL,&s_ssshoot4};
statetype s_ssshoot4 = {false,SPR_SS_SHOOT2,10,NULL,T_Shoot,&s_ssshoot5};
statetype s_ssshoot5 = {false,SPR_SS_SHOOT3,10,NULL,NULL,&s_ssshoot6};
statetype s_ssshoot6 = {false,SPR_SS_SHOOT2,10,NULL,T_Shoot,&s_ssshoot7};
statetype s_ssshoot7 = {false,SPR_SS_SHOOT3,10,NULL,NULL,&s_ssshoot8};
statetype s_ssshoot8 = {false,SPR_SS_SHOOT2,10,NULL,T_Shoot,&s_ssshoot9};
statetype s_ssshoot9 = {false,SPR_SS_SHOOT3,10,NULL,NULL,&s_sschase1};
statetype s_sschase1 = {true,SPR_SS_W1_1,10,T_Chase,NULL,&s_sschase1s};
statetype s_sschase1s = {true,SPR_SS_W1_1,3,NULL,NULL,&s_sschase2};
statetype s_sschase2 = {true,SPR_SS_W2_1,8,T_Chase,NULL,&s_sschase3};
statetype s_sschase3 = {true,SPR_SS_W3_1,10,T_Chase,NULL,&s_sschase3s};
statetype s_sschase3s = {true,SPR_SS_W3_1,3,NULL,NULL,&s_sschase4};
statetype s_sschase4 = {true,SPR_SS_W4_1,8,T_Chase,NULL,&s_sschase1};
statetype s_ssdie1 = {false,SPR_SS_DIE_1,15,NULL,A_DeathScream,&s_ssdie2};
statetype s_ssdie2 = {false,SPR_SS_DIE_2,15,NULL,NULL,&s_ssdie3};
statetype s_ssdie3 = {false,SPR_SS_DIE_3,15,NULL,NULL,&s_ssdie4};
statetype s_ssdie4 = {false,SPR_SS_DEAD,0,NULL,NULL,&s_ssdie4};
#ifdef SPEAR
statetype s_hrocket = {true,SPR_HROCKET_1,3,T_Projectile,A_Smoke,&s_hrocket};
statetype s_hsmoke1 = {false,SPR_HSMOKE_1,3,NULL,NULL,&s_hsmoke2};
statetype s_hsmoke2 = {false,SPR_HSMOKE_2,3,NULL,NULL,&s_hsmoke3};
statetype s_hsmoke3 = {false,SPR_HSMOKE_3,3,NULL,NULL,&s_hsmoke4};
statetype s_hsmoke4 = {false,SPR_HSMOKE_4,3,NULL,NULL,NULL};
statetype s_hboom1 = {false,SPR_HBOOM_1,6,NULL,NULL,&s_hboom2};
statetype s_hboom2 = {false,SPR_HBOOM_2,6,NULL,NULL,&s_hboom3};
statetype s_hboom3 = {false,SPR_HBOOM_3,6,NULL,NULL,NULL};
statetype s_transstand = {false,SPR_TRANS_W1,0,T_Stand,NULL,&s_transstand};
statetype s_transchase1 = {false,SPR_TRANS_W1,10,T_Chase,NULL,&s_transchase1s};
statetype s_transchase1s = {false,SPR_TRANS_W1,3,NULL,NULL,&s_transchase2};
statetype s_transchase2 = {false,SPR_TRANS_W2,8,T_Chase,NULL,&s_transchase3};
statetype s_transchase3 = {false,SPR_TRANS_W3,10,T_Chase,NULL,&s_transchase3s};
statetype s_transchase3s = {false,SPR_TRANS_W3,3,NULL,NULL,&s_transchase4};
statetype s_transchase4 = {false,SPR_TRANS_W4,8,T_Chase,NULL,&s_transchase1};
statetype s_transdie0 = {false,SPR_TRANS_W1,1,NULL,A_DeathScream,&s_transdie01};
statetype s_transdie01 = {false,SPR_TRANS_W1,1,NULL,NULL,&s_transdie1};
statetype s_transdie1 = {false,SPR_TRANS_DIE1,15,NULL,NULL,&s_transdie2};
statetype s_transdie2 = {false,SPR_TRANS_DIE2,15,NULL,NULL,&s_transdie3};
statetype s_transdie3 = {false,SPR_TRANS_DIE3,15,NULL,NULL,&s_transdie4};
statetype s_transdie4 = {false,SPR_TRANS_DEAD,0,NULL,NULL,&s_transdie4};
statetype s_transshoot1 = {false,SPR_TRANS_SHOOT1,30,NULL,NULL,&s_transshoot2};
statetype s_transshoot2 = {false,SPR_TRANS_SHOOT2,10,NULL,T_Shoot,&s_transshoot3};
statetype s_transshoot3 = {false,SPR_TRANS_SHOOT3,10,NULL,T_Shoot,&s_transshoot4};
statetype s_transshoot4 = {false,SPR_TRANS_SHOOT2,10,NULL,T_Shoot,&s_transshoot5};
statetype s_transshoot5 = {false,SPR_TRANS_SHOOT3,10,NULL,T_Shoot,&s_transshoot6};
statetype s_transshoot6 = {false,SPR_TRANS_SHOOT2,10,NULL,T_Shoot,&s_transshoot7};
statetype s_transshoot7 = {false,SPR_TRANS_SHOOT3,10,NULL,T_Shoot,&s_transshoot8};
statetype s_transshoot8 = {false,SPR_TRANS_SHOOT1,10,NULL,NULL,&s_transchase1};
statetype s_uberstand = {false,SPR_UBER_W1,0,T_Stand,NULL,&s_uberstand};
statetype s_uberchase1 = {false,SPR_UBER_W1,10,T_Chase,NULL,&s_uberchase1s};
statetype s_uberchase1s = {false,SPR_UBER_W1,3,NULL,NULL,&s_uberchase2};
statetype s_uberchase2 = {false,SPR_UBER_W2,8,T_Chase,NULL,&s_uberchase3};
statetype s_uberchase3 = {false,SPR_UBER_W3,10,T_Chase,NULL,&s_uberchase3s};
statetype s_uberchase3s = {false,SPR_UBER_W3,3,NULL,NULL,&s_uberchase4};
statetype s_uberchase4 = {false,SPR_UBER_W4,8,T_Chase,NULL,&s_uberchase1};
statetype s_uberdie0 = {false,SPR_UBER_W1,1,NULL,A_DeathScream,&s_uberdie01};
statetype s_uberdie01 = {false,SPR_UBER_W1,1,NULL,NULL,&s_uberdie1};
statetype s_uberdie1 = {false,SPR_UBER_DIE1,15,NULL,NULL,&s_uberdie2};
statetype s_uberdie2 = {false,SPR_UBER_DIE2,15,NULL,NULL,&s_uberdie3};
statetype s_uberdie3 = {false,SPR_UBER_DIE3,15,NULL,NULL,&s_uberdie4};
statetype s_uberdie4 = {false,SPR_UBER_DIE4,15,NULL,NULL,&s_uberdie5};
statetype s_uberdie5 = {false,SPR_UBER_DEAD,0,NULL,NULL,&s_uberdie5};
statetype s_ubershoot1 = {false,SPR_UBER_SHOOT1,30,NULL,NULL,&s_ubershoot2};
statetype s_ubershoot2 = {false,SPR_UBER_SHOOT2,12,NULL,T_UShoot,&s_ubershoot3};
statetype s_ubershoot3 = {false,SPR_UBER_SHOOT3,12,NULL,T_UShoot,&s_ubershoot4};
statetype s_ubershoot4 = {false,SPR_UBER_SHOOT4,12,NULL,T_UShoot,&s_ubershoot5};
statetype s_ubershoot5 = {false,SPR_UBER_SHOOT3,12,NULL,T_UShoot,&s_ubershoot6};
statetype s_ubershoot6 = {false,SPR_UBER_SHOOT2,12,NULL,T_UShoot,&s_ubershoot7};
statetype s_ubershoot7 = {false,SPR_UBER_SHOOT1,12,NULL,NULL,&s_uberchase1};
statetype s_willstand = {false,SPR_WILL_W1,0,T_Stand,NULL,&s_willstand};
statetype s_willchase1 = {false,SPR_WILL_W1,10,T_Will,NULL,&s_willchase1s};
statetype s_willchase1s = {false,SPR_WILL_W1,3,NULL,NULL,&s_willchase2};
statetype s_willchase2 = {false,SPR_WILL_W2,8,T_Will,NULL,&s_willchase3};
statetype s_willchase3 = {false,SPR_WILL_W3,10,T_Will,NULL,&s_willchase3s};
statetype s_willchase3s = {false,SPR_WILL_W3,3,NULL,NULL,&s_willchase4};
statetype s_willchase4 = {false,SPR_WILL_W4,8,T_Will,NULL,&s_willchase1};
statetype s_willdie1 = {false,SPR_WILL_W1,1,NULL,A_DeathScream,&s_willdie2};
statetype s_willdie2 = {false,SPR_WILL_W1,10,NULL,NULL,&s_willdie3};
statetype s_willdie3 = {false,SPR_WILL_DIE1,10,NULL,NULL,&s_willdie4};
statetype s_willdie4 = {false,SPR_WILL_DIE2,10,NULL,NULL,&s_willdie5};
statetype s_willdie5 = {false,SPR_WILL_DIE3,10,NULL,NULL,&s_willdie6};
statetype s_willdie6 = {false,SPR_WILL_DEAD,20,NULL,NULL,&s_willdie6};
statetype s_willshoot1 = {false,SPR_WILL_SHOOT1,30,NULL,NULL,&s_willshoot2};
statetype s_willshoot2 = {false,SPR_WILL_SHOOT2,10,NULL,T_Launch,&s_willshoot3};
statetype s_willshoot3 = {false,SPR_WILL_SHOOT3,10,NULL,T_Shoot,&s_willshoot4};
statetype s_willshoot4 = {false,SPR_WILL_SHOOT4,10,NULL,T_Shoot,&s_willshoot5};
statetype s_willshoot5 = {false,SPR_WILL_SHOOT3,10,NULL,T_Shoot,&s_willshoot6};
statetype s_willshoot6 = {false,SPR_WILL_SHOOT4,10,NULL,T_Shoot,&s_willchase1};
statetype s_deathstand = {false,SPR_DEATH_W1,0,T_Stand,NULL,&s_deathstand};
statetype s_deathchase1 = {false,SPR_DEATH_W1,10,T_Will,NULL,&s_deathchase1s};
statetype s_deathchase1s = {false,SPR_DEATH_W1,3,NULL,NULL,&s_deathchase2};
statetype s_deathchase2 = {false,SPR_DEATH_W2,8,T_Will,NULL,&s_deathchase3};
statetype s_deathchase3 = {false,SPR_DEATH_W3,10,T_Will,NULL,&s_deathchase3s};
statetype s_deathchase3s = {false,SPR_DEATH_W3,3,NULL,NULL,&s_deathchase4};
statetype s_deathchase4 = {false,SPR_DEATH_W4,8,T_Will,NULL,&s_deathchase1};
statetype s_deathdie1 = {false,SPR_DEATH_W1,1,NULL,A_DeathScream,&s_deathdie2};
statetype s_deathdie2 = {false,SPR_DEATH_W1,10,NULL,NULL,&s_deathdie3};
statetype s_deathdie3 = {false,SPR_DEATH_DIE1,10,NULL,NULL,&s_deathdie4};
statetype s_deathdie4 = {false,SPR_DEATH_DIE2,10,NULL,NULL,&s_deathdie5};
statetype s_deathdie5 = {false,SPR_DEATH_DIE3,10,NULL,NULL,&s_deathdie6};
statetype s_deathdie6 = {false,SPR_DEATH_DIE4,10,NULL,NULL,&s_deathdie7};
statetype s_deathdie7 = {false,SPR_DEATH_DIE5,10,NULL,NULL,&s_deathdie8};
statetype s_deathdie8 = {false,SPR_DEATH_DIE6,10,NULL,NULL,&s_deathdie9};
statetype s_deathdie9 = {false,SPR_DEATH_DEAD,0,NULL,NULL,&s_deathdie9};
statetype s_deathshoot1 = {false,SPR_DEATH_SHOOT1,30,NULL,NULL,&s_deathshoot2};
statetype s_deathshoot2 = {false,SPR_DEATH_SHOOT2,10,NULL,T_Launch,&s_deathshoot3};
statetype s_deathshoot3 = {false,SPR_DEATH_SHOOT4,10,NULL,T_Shoot,&s_deathshoot4};
statetype s_deathshoot4 = {false,SPR_DEATH_SHOOT3,10,NULL,T_Launch,&s_deathshoot5};
statetype s_deathshoot5 = {false,SPR_DEATH_SHOOT4,10,NULL,T_Shoot,&s_deathchase1};
statetype s_angelstand = {false,SPR_ANGEL_W1,0,T_Stand,NULL,&s_angelstand};
statetype s_angelchase1 = {false,SPR_ANGEL_W1,10,T_Will,NULL,&s_angelchase1s};
statetype s_angelchase1s = {false,SPR_ANGEL_W1,3,NULL,NULL,&s_angelchase2};
statetype s_angelchase2 = {false,SPR_ANGEL_W2,8,T_Will,NULL,&s_angelchase3};
statetype s_angelchase3 = {false,SPR_ANGEL_W3,10,T_Will,NULL,&s_angelchase3s};
statetype s_angelchase3s = {false,SPR_ANGEL_W3,3,NULL,NULL,&s_angelchase4};
statetype s_angelchase4 = {false,SPR_ANGEL_W4,8,T_Will,NULL,&s_angelchase1};
statetype s_angeldie1 = {false,SPR_ANGEL_W1,1,NULL,A_DeathScream,&s_angeldie11};
statetype s_angeldie11 = {false,SPR_ANGEL_W1,1,NULL,NULL,&s_angeldie2};
statetype s_angeldie2 = {false,SPR_ANGEL_DIE1,10,NULL,A_Slurpie,&s_angeldie3};
statetype s_angeldie3 = {false,SPR_ANGEL_DIE2,10,NULL,NULL,&s_angeldie4};
statetype s_angeldie4 = {false,SPR_ANGEL_DIE3,10,NULL,NULL,&s_angeldie5};
statetype s_angeldie5 = {false,SPR_ANGEL_DIE4,10,NULL,NULL,&s_angeldie6};
statetype s_angeldie6 = {false,SPR_ANGEL_DIE5,10,NULL,NULL,&s_angeldie7};
statetype s_angeldie7 = {false,SPR_ANGEL_DIE6,10,NULL,NULL,&s_angeldie8};
statetype s_angeldie8 = {false,SPR_ANGEL_DIE7,10,NULL,NULL,&s_angeldie9};
statetype s_angeldie9 = {false,SPR_ANGEL_DEAD,130,NULL,A_Victory,&s_angeldie9};
statetype s_angelshoot1 = {false,SPR_ANGEL_SHOOT1,10,NULL,A_StartAttack,&s_angelshoot2};
statetype s_angelshoot2 = {false,SPR_ANGEL_SHOOT2,20,NULL,T_Launch,&s_angelshoot3};
statetype s_angelshoot3 = {false,SPR_ANGEL_SHOOT1,10,NULL,A_Relaunch,&s_angelshoot2};
statetype s_angeltired = {false,SPR_ANGEL_TIRED1,40,NULL,A_Breathing,&s_angeltired2};
statetype s_angeltired2 = {false,SPR_ANGEL_TIRED2,40,NULL,NULL,&s_angeltired3};
statetype s_angeltired3 = {false,SPR_ANGEL_TIRED1,40,NULL,A_Breathing,&s_angeltired4};
statetype s_angeltired4 = {false,SPR_ANGEL_TIRED2,40,NULL,NULL,&s_angeltired5};
statetype s_angeltired5 = {false,SPR_ANGEL_TIRED1,40,NULL,A_Breathing,&s_angeltired6};
statetype s_angeltired6 = {false,SPR_ANGEL_TIRED2,40,NULL,NULL,&s_angeltired7};
statetype s_angeltired7 = {false,SPR_ANGEL_TIRED1,40,NULL,A_Breathing,&s_angelchase1};
statetype s_spark1 = {false,SPR_SPARK1,6,T_Projectile,NULL,&s_spark2};
statetype s_spark2 = {false,SPR_SPARK2,6,T_Projectile,NULL,&s_spark3};
statetype s_spark3 = {false,SPR_SPARK3,6,T_Projectile,NULL,&s_spark4};
statetype s_spark4 = {false,SPR_SPARK4,6,T_Projectile,NULL,&s_spark1};
//
// spectre
//
statetype s_spectrewait1 = {false,SPR_SPECTRE_W1,10,T_Stand,NULL,&s_spectrewait2};
statetype s_spectrewait2 = {false,SPR_SPECTRE_W2,10,T_Stand,NULL,&s_spectrewait3};
statetype s_spectrewait3 = {false,SPR_SPECTRE_W3,10,T_Stand,NULL,&s_spectrewait4};
statetype s_spectrewait4 = {false,SPR_SPECTRE_W4,10,T_Stand,NULL,&s_spectrewait1};
statetype s_spectrechase1 = {false,SPR_SPECTRE_W1,10,T_Ghosts,NULL,&s_spectrechase2};
statetype s_spectrechase2 = {false,SPR_SPECTRE_W2,10,T_Ghosts,NULL,&s_spectrechase3};
statetype s_spectrechase3 = {false,SPR_SPECTRE_W3,10,T_Ghosts,NULL,&s_spectrechase4};
statetype s_spectrechase4 = {false,SPR_SPECTRE_W4,10,T_Ghosts,NULL,&s_spectrechase1};
statetype s_spectredie1 = {false,SPR_SPECTRE_F1,10,NULL,NULL,&s_spectredie2};
statetype s_spectredie2 = {false,SPR_SPECTRE_F2,10,NULL,NULL,&s_spectredie3};
statetype s_spectredie3 = {false,SPR_SPECTRE_F3,10,NULL,NULL,&s_spectredie4};
statetype s_spectredie4 = {false,SPR_SPECTRE_F4,300,NULL,NULL,&s_spectrewake};
statetype s_spectrewake = {false,SPR_SPECTRE_F4,10,NULL,A_Dormant,&s_spectrewake};
#endif
#ifndef SPEAR
statetype s_blinkychase1 = {false,SPR_BLINKY_W1,10,T_Ghosts,NULL,&s_blinkychase2};
statetype s_blinkychase2 = {false,SPR_BLINKY_W2,10,T_Ghosts,NULL,&s_blinkychase1};
statetype s_inkychase1 = {false,SPR_INKY_W1,10,T_Ghosts,NULL,&s_inkychase2};
statetype s_inkychase2 = {false,SPR_INKY_W2,10,T_Ghosts,NULL,&s_inkychase1};
statetype s_pinkychase1 = {false,SPR_PINKY_W1,10,T_Ghosts,NULL,&s_pinkychase2};
statetype s_pinkychase2 = {false,SPR_PINKY_W2,10,T_Ghosts,NULL,&s_pinkychase1};
statetype s_clydechase1 = {false,SPR_CLYDE_W1,10,T_Ghosts,NULL,&s_clydechase2};
statetype s_clydechase2 = {false,SPR_CLYDE_W2,10,T_Ghosts,NULL,&s_clydechase1};
statetype s_bossstand = {false,SPR_BOSS_W1,0,T_Stand,NULL,&s_bossstand};
statetype s_bosschase1 = {false,SPR_BOSS_W1,10,T_Chase,NULL,&s_bosschase1s};
statetype s_bosschase1s = {false,SPR_BOSS_W1,3,NULL,NULL,&s_bosschase2};
statetype s_bosschase2 = {false,SPR_BOSS_W2,8,T_Chase,NULL,&s_bosschase3};
statetype s_bosschase3 = {false,SPR_BOSS_W3,10,T_Chase,NULL,&s_bosschase3s};
statetype s_bosschase3s = {false,SPR_BOSS_W3,3,NULL,NULL,&s_bosschase4};
statetype s_bosschase4 = {false,SPR_BOSS_W4,8,T_Chase,NULL,&s_bosschase1};
statetype s_bossdie1 = {false,SPR_BOSS_DIE1,15,NULL,A_DeathScream,&s_bossdie2};
statetype s_bossdie2 = {false,SPR_BOSS_DIE2,15,NULL,NULL,&s_bossdie3};
statetype s_bossdie3 = {false,SPR_BOSS_DIE3,15,NULL,NULL,&s_bossdie4};
statetype s_bossdie4 = {false,SPR_BOSS_DEAD,0,NULL,NULL,&s_bossdie4};
statetype s_bossshoot1 = {false,SPR_BOSS_SHOOT1,30,NULL,NULL,&s_bossshoot2};
statetype s_bossshoot2 = {false,SPR_BOSS_SHOOT2,10,NULL,T_Shoot,&s_bossshoot3};
statetype s_bossshoot3 = {false,SPR_BOSS_SHOOT3,10,NULL,T_Shoot,&s_bossshoot4};
statetype s_bossshoot4 = {false,SPR_BOSS_SHOOT2,10,NULL,T_Shoot,&s_bossshoot5};
statetype s_bossshoot5 = {false,SPR_BOSS_SHOOT3,10,NULL,T_Shoot,&s_bossshoot6};
statetype s_bossshoot6 = {false,SPR_BOSS_SHOOT2,10,NULL,T_Shoot,&s_bossshoot7};
statetype s_bossshoot7 = {false,SPR_BOSS_SHOOT3,10,NULL,T_Shoot,&s_bossshoot8};
statetype s_bossshoot8 = {false,SPR_BOSS_SHOOT1,10,NULL,NULL,&s_bosschase1};
statetype s_gretelstand = {false,SPR_GRETEL_W1,0,T_Stand,NULL,&s_gretelstand};
statetype s_gretelchase1 = {false,SPR_GRETEL_W1,10,T_Chase,NULL,&s_gretelchase1s};
statetype s_gretelchase1s = {false,SPR_GRETEL_W1,3,NULL,NULL,&s_gretelchase2};
statetype s_gretelchase2 = {false,SPR_GRETEL_W2,8,T_Chase,NULL,&s_gretelchase3};
statetype s_gretelchase3 = {false,SPR_GRETEL_W3,10,T_Chase,NULL,&s_gretelchase3s};
statetype s_gretelchase3s = {false,SPR_GRETEL_W3,3,NULL,NULL,&s_gretelchase4};
statetype s_gretelchase4 = {false,SPR_GRETEL_W4,8,T_Chase,NULL,&s_gretelchase1};
statetype s_greteldie1 = {false,SPR_GRETEL_DIE1,15,NULL,A_DeathScream,&s_greteldie2};
statetype s_greteldie2 = {false,SPR_GRETEL_DIE2,15,NULL,NULL,&s_greteldie3};
statetype s_greteldie3 = {false,SPR_GRETEL_DIE3,15,NULL,NULL,&s_greteldie4};
statetype s_greteldie4 = {false,SPR_GRETEL_DEAD,0,NULL,NULL,&s_greteldie4};
statetype s_gretelshoot1 = {false,SPR_GRETEL_SHOOT1,30,NULL,NULL,&s_gretelshoot2};
statetype s_gretelshoot2 = {false,SPR_GRETEL_SHOOT2,10,NULL,T_Shoot,&s_gretelshoot3};
statetype s_gretelshoot3 = {false,SPR_GRETEL_SHOOT3,10,NULL,T_Shoot,&s_gretelshoot4};
statetype s_gretelshoot4 = {false,SPR_GRETEL_SHOOT2,10,NULL,T_Shoot,&s_gretelshoot5};
statetype s_gretelshoot5 = {false,SPR_GRETEL_SHOOT3,10,NULL,T_Shoot,&s_gretelshoot6};
statetype s_gretelshoot6 = {false,SPR_GRETEL_SHOOT2,10,NULL,T_Shoot,&s_gretelshoot7};
statetype s_gretelshoot7 = {false,SPR_GRETEL_SHOOT3,10,NULL,T_Shoot,&s_gretelshoot8};
statetype s_gretelshoot8 = {false,SPR_GRETEL_SHOOT1,10,NULL,NULL,&s_gretelchase1};
statetype s_schabbstand = {false,SPR_SCHABB_W1,0,T_Stand,NULL,&s_schabbstand};
statetype s_schabbchase1 = {false,SPR_SCHABB_W1,10,T_Schabb,NULL,&s_schabbchase1s};
statetype s_schabbchase1s = {false,SPR_SCHABB_W1,3,NULL,NULL,&s_schabbchase2};
statetype s_schabbchase2 = {false,SPR_SCHABB_W2,8,T_Schabb,NULL,&s_schabbchase3};
statetype s_schabbchase3 = {false,SPR_SCHABB_W3,10,T_Schabb,NULL,&s_schabbchase3s};
statetype s_schabbchase3s = {false,SPR_SCHABB_W3,3,NULL,NULL,&s_schabbchase4};
statetype s_schabbchase4 = {false,SPR_SCHABB_W4,8,T_Schabb,NULL,&s_schabbchase1};
statetype s_schabbdeathcam = {false,SPR_SCHABB_W1,1,NULL,NULL,&s_schabbdie1};
statetype s_schabbdie1 = {false,SPR_SCHABB_W1,10,NULL,A_DeathScream,&s_schabbdie2};
statetype s_schabbdie2 = {false,SPR_SCHABB_W1,10,NULL,NULL,&s_schabbdie3};
statetype s_schabbdie3 = {false,SPR_SCHABB_DIE1,10,NULL,NULL,&s_schabbdie4};
statetype s_schabbdie4 = {false,SPR_SCHABB_DIE2,10,NULL,NULL,&s_schabbdie5};
statetype s_schabbdie5 = {false,SPR_SCHABB_DIE3,10,NULL,NULL,&s_schabbdie6};
statetype s_schabbdie6 = {false,SPR_SCHABB_DEAD,20,NULL,A_StartDeathCam,&s_schabbdie6};
statetype s_schabbshoot1 = {false,SPR_SCHABB_SHOOT1,30,NULL,NULL,&s_schabbshoot2};
statetype s_schabbshoot2 = {false,SPR_SCHABB_SHOOT2,10,NULL,T_SchabbThrow,&s_schabbchase1};
statetype s_needle1 = {false,SPR_HYPO1,6,T_Projectile,NULL,&s_needle2};
statetype s_needle2 = {false,SPR_HYPO2,6,T_Projectile,NULL,&s_needle3};
statetype s_needle3 = {false,SPR_HYPO3,6,T_Projectile,NULL,&s_needle4};
statetype s_needle4 = {false,SPR_HYPO4,6,T_Projectile,NULL,&s_needle1};
statetype s_giftstand = {false,SPR_GIFT_W1,0,T_Stand,NULL,&s_giftstand};
statetype s_giftchase1 = {false,SPR_GIFT_W1,10,T_Gift,NULL,&s_giftchase1s};
statetype s_giftchase1s = {false,SPR_GIFT_W1,3,NULL,NULL,&s_giftchase2};
statetype s_giftchase2 = {false,SPR_GIFT_W2,8,T_Gift,NULL,&s_giftchase3};
statetype s_giftchase3 = {false,SPR_GIFT_W3,10,T_Gift,NULL,&s_giftchase3s};
statetype s_giftchase3s = {false,SPR_GIFT_W3,3,NULL,NULL,&s_giftchase4};
statetype s_giftchase4 = {false,SPR_GIFT_W4,8,T_Gift,NULL,&s_giftchase1};
statetype s_giftdeathcam = {false,SPR_GIFT_W1,1,NULL,NULL,&s_giftdie1};
statetype s_giftdie1 = {false,SPR_GIFT_W1,1,NULL,A_DeathScream,&s_giftdie2};
statetype s_giftdie2 = {false,SPR_GIFT_W1,10,NULL,NULL,&s_giftdie3};
statetype s_giftdie3 = {false,SPR_GIFT_DIE1,10,NULL,NULL,&s_giftdie4};
statetype s_giftdie4 = {false,SPR_GIFT_DIE2,10,NULL,NULL,&s_giftdie5};
statetype s_giftdie5 = {false,SPR_GIFT_DIE3,10,NULL,NULL,&s_giftdie6};
statetype s_giftdie6 = {false,SPR_GIFT_DEAD,20,NULL,A_StartDeathCam,&s_giftdie6};
statetype s_giftshoot1 = {false,SPR_GIFT_SHOOT1,30,NULL,NULL,&s_giftshoot2};
statetype s_giftshoot2 = {false,SPR_GIFT_SHOOT2,10,NULL,T_GiftThrow,&s_giftchase1};
statetype s_fatstand = {false,SPR_FAT_W1,0,T_Stand,NULL,&s_fatstand};
statetype s_fatchase1 = {false,SPR_FAT_W1,10,T_Fat,NULL,&s_fatchase1s};
statetype s_fatchase1s = {false,SPR_FAT_W1,3,NULL,NULL,&s_fatchase2};
statetype s_fatchase2 = {false,SPR_FAT_W2,8,T_Fat,NULL,&s_fatchase3};
statetype s_fatchase3 = {false,SPR_FAT_W3,10,T_Fat,NULL,&s_fatchase3s};
statetype s_fatchase3s = {false,SPR_FAT_W3,3,NULL,NULL,&s_fatchase4};
statetype s_fatchase4 = {false,SPR_FAT_W4,8,T_Fat,NULL,&s_fatchase1};
statetype s_fatdeathcam = {false,SPR_FAT_W1,1,NULL,NULL,&s_fatdie1};
statetype s_fatdie1 = {false,SPR_FAT_W1,1,NULL,A_DeathScream,&s_fatdie2};
statetype s_fatdie2 = {false,SPR_FAT_W1,10,NULL,NULL,&s_fatdie3};
statetype s_fatdie3 = {false,SPR_FAT_DIE1,10,NULL,NULL,&s_fatdie4};
statetype s_fatdie4 = {false,SPR_FAT_DIE2,10,NULL,NULL,&s_fatdie5};
statetype s_fatdie5 = {false,SPR_FAT_DIE3,10,NULL,NULL,&s_fatdie6};
statetype s_fatdie6 = {false,SPR_FAT_DEAD,20,NULL,A_StartDeathCam,&s_fatdie6};
statetype s_fatshoot1 = {false,SPR_FAT_SHOOT1,30,NULL,NULL,&s_fatshoot2};
statetype s_fatshoot2 = {false,SPR_FAT_SHOOT2,10,NULL,T_GiftThrow,&s_fatshoot3};
statetype s_fatshoot3 = {false,SPR_FAT_SHOOT3,10,NULL,T_Shoot,&s_fatshoot4};
statetype s_fatshoot4 = {false,SPR_FAT_SHOOT4,10,NULL,T_Shoot,&s_fatshoot5};
statetype s_fatshoot5 = {false,SPR_FAT_SHOOT3,10,NULL,T_Shoot,&s_fatshoot6};
statetype s_fatshoot6 = {false,SPR_FAT_SHOOT4,10,NULL,T_Shoot,&s_fatchase1};
statetype s_fakestand = {false,SPR_FAKE_W1,0,T_Stand,NULL,&s_fakestand};
statetype s_fakechase1 = {false,SPR_FAKE_W1,10,T_Fake,NULL,&s_fakechase1s};
statetype s_fakechase1s = {false,SPR_FAKE_W1,3,NULL,NULL,&s_fakechase2};
statetype s_fakechase2 = {false,SPR_FAKE_W2,8,T_Fake,NULL,&s_fakechase3};
statetype s_fakechase3 = {false,SPR_FAKE_W3,10,T_Fake,NULL,&s_fakechase3s};
statetype s_fakechase3s = {false,SPR_FAKE_W3,3,NULL,NULL,&s_fakechase4};
statetype s_fakechase4 = {false,SPR_FAKE_W4,8,T_Fake,NULL,&s_fakechase1};
statetype s_fakedie1 = {false,SPR_FAKE_DIE1,10,NULL,A_DeathScream,&s_fakedie2};
statetype s_fakedie2 = {false,SPR_FAKE_DIE2,10,NULL,NULL,&s_fakedie3};
statetype s_fakedie3 = {false,SPR_FAKE_DIE3,10,NULL,NULL,&s_fakedie4};
statetype s_fakedie4 = {false,SPR_FAKE_DIE4,10,NULL,NULL,&s_fakedie5};
statetype s_fakedie5 = {false,SPR_FAKE_DIE5,10,NULL,NULL,&s_fakedie6};
statetype s_fakedie6 = {false,SPR_FAKE_DEAD,0,NULL,NULL,&s_fakedie6};
statetype s_fakeshoot1 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot2};
statetype s_fakeshoot2 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot3};
statetype s_fakeshoot3 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot4};
statetype s_fakeshoot4 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot5};
statetype s_fakeshoot5 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot6};
statetype s_fakeshoot6 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot7};
statetype s_fakeshoot7 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot8};
statetype s_fakeshoot8 = {false,SPR_FAKE_SHOOT,8,NULL,T_FakeFire,&s_fakeshoot9};
statetype s_fakeshoot9 = {false,SPR_FAKE_SHOOT,8,NULL,NULL,&s_fakechase1};
statetype s_fire1 = {false,SPR_FIRE1,6,NULL,T_Projectile,&s_fire2};
statetype s_fire2 = {false,SPR_FIRE2,6,NULL,T_Projectile,&s_fire1};
statetype s_mechastand = {false,SPR_MECHA_W1,0,T_Stand,NULL,&s_mechastand};
statetype s_mechachase1 = {false,SPR_MECHA_W1,10,T_Chase,A_MechaSound,&s_mechachase1s};
statetype s_mechachase1s = {false,SPR_MECHA_W1,6,NULL,NULL,&s_mechachase2};
statetype s_mechachase2 = {false,SPR_MECHA_W2,8,T_Chase,NULL,&s_mechachase3};
statetype s_mechachase3 = {false,SPR_MECHA_W3,10,T_Chase,A_MechaSound,&s_mechachase3s};
statetype s_mechachase3s = {false,SPR_MECHA_W3,6,NULL,NULL,&s_mechachase4};
statetype s_mechachase4 = {false,SPR_MECHA_W4,8,T_Chase,NULL,&s_mechachase1};
statetype s_mechadie1 = {false,SPR_MECHA_DIE1,10,NULL,A_DeathScream,&s_mechadie2};
statetype s_mechadie2 = {false,SPR_MECHA_DIE2,10,NULL,NULL,&s_mechadie3};
statetype s_mechadie3 = {false,SPR_MECHA_DIE3,10,NULL,A_HitlerMorph,&s_mechadie4};
statetype s_mechadie4 = {false,SPR_MECHA_DEAD,0,NULL,NULL,&s_mechadie4};
statetype s_mechashoot1 = {false,SPR_MECHA_SHOOT1,30,NULL,NULL,&s_mechashoot2};
statetype s_mechashoot2 = {false,SPR_MECHA_SHOOT2,10,NULL,T_Shoot,&s_mechashoot3};
statetype s_mechashoot3 = {false,SPR_MECHA_SHOOT3,10,NULL,T_Shoot,&s_mechashoot4};
statetype s_mechashoot4 = {false,SPR_MECHA_SHOOT2,10,NULL,T_Shoot,&s_mechashoot5};
statetype s_mechashoot5 = {false,SPR_MECHA_SHOOT3,10,NULL,T_Shoot,&s_mechashoot6};
statetype s_mechashoot6 = {false,SPR_MECHA_SHOOT2,10,NULL,T_Shoot,&s_mechachase1};
statetype s_hitlerchase1 = {false,SPR_HITLER_W1,6,T_Chase,NULL,&s_hitlerchase1s};
statetype s_hitlerchase1s = {false,SPR_HITLER_W1,4,NULL,NULL,&s_hitlerchase2};
statetype s_hitlerchase2 = {false,SPR_HITLER_W2,2,T_Chase,NULL,&s_hitlerchase3};
statetype s_hitlerchase3 = {false,SPR_HITLER_W3,6,T_Chase,NULL,&s_hitlerchase3s};
statetype s_hitlerchase3s = {false,SPR_HITLER_W3,4,NULL,NULL,&s_hitlerchase4};
statetype s_hitlerchase4 = {false,SPR_HITLER_W4,2,T_Chase,NULL,&s_hitlerchase1};
statetype s_hitlerdeathcam = {false,SPR_HITLER_W1,10,NULL,NULL,&s_hitlerdie1};
statetype s_hitlerdie1 = {false,SPR_HITLER_W1,1,NULL,A_DeathScream,&s_hitlerdie2};
statetype s_hitlerdie2 = {false,SPR_HITLER_W1,10,NULL,NULL,&s_hitlerdie3};
statetype s_hitlerdie3 = {false,SPR_HITLER_DIE1,10,NULL,A_Slurpie,&s_hitlerdie4};
statetype s_hitlerdie4 = {false,SPR_HITLER_DIE2,10,NULL,NULL,&s_hitlerdie5};
statetype s_hitlerdie5 = {false,SPR_HITLER_DIE3,10,NULL,NULL,&s_hitlerdie6};
statetype s_hitlerdie6 = {false,SPR_HITLER_DIE4,10,NULL,NULL,&s_hitlerdie7};
statetype s_hitlerdie7 = {false,SPR_HITLER_DIE5,10,NULL,NULL,&s_hitlerdie8};
statetype s_hitlerdie8 = {false,SPR_HITLER_DIE6,10,NULL,NULL,&s_hitlerdie9};
statetype s_hitlerdie9 = {false,SPR_HITLER_DIE7,10,NULL,NULL,&s_hitlerdie10};
statetype s_hitlerdie10 = {false,SPR_HITLER_DEAD,20,NULL,A_StartDeathCam,&s_hitlerdie10};
statetype s_hitlershoot1 = {false,SPR_HITLER_SHOOT1,30,NULL,NULL,&s_hitlershoot2};
statetype s_hitlershoot2 = {false,SPR_HITLER_SHOOT2,10,NULL,T_Shoot,&s_hitlershoot3};
statetype s_hitlershoot3 = {false,SPR_HITLER_SHOOT3,10,NULL,T_Shoot,&s_hitlershoot4};
statetype s_hitlershoot4 = {false,SPR_HITLER_SHOOT2,10,NULL,T_Shoot,&s_hitlershoot5};
statetype s_hitlershoot5 = {false,SPR_HITLER_SHOOT3,10,NULL,T_Shoot,&s_hitlershoot6};
statetype s_hitlershoot6 = {false,SPR_HITLER_SHOOT2,10,NULL,T_Shoot,&s_hitlerchase1};
statetype s_bjrun1 = {false,SPR_BJ_W1,12,T_BJRun,NULL,&s_bjrun1s};
statetype s_bjrun1s = {false,SPR_BJ_W1,3, NULL,NULL,&s_bjrun2};
statetype s_bjrun2 = {false,SPR_BJ_W2,8,T_BJRun,NULL,&s_bjrun3};
statetype s_bjrun3 = {false,SPR_BJ_W3,12,T_BJRun,NULL,&s_bjrun3s};
statetype s_bjrun3s = {false,SPR_BJ_W3,3, NULL,NULL,&s_bjrun4};
statetype s_bjrun4 = {false,SPR_BJ_W4,8,T_BJRun,NULL,&s_bjrun1};
statetype s_bjjump1 = {false,SPR_BJ_JUMP1,14,T_BJJump,NULL,&s_bjjump2};
statetype s_bjjump2 = {false,SPR_BJ_JUMP2,14,T_BJJump,T_BJYell,&s_bjjump3};
statetype s_bjjump3 = {false,SPR_BJ_JUMP3,14,T_BJJump,NULL,&s_bjjump4};
statetype s_bjjump4 = {false,SPR_BJ_JUMP4,300,NULL,T_BJDone,&s_bjjump4};
statetype s_deathcam = {false,0,0,NULL,NULL,NULL};
#endif
statetype s_player = {false,0,0,T_Player,NULL,NULL};
statetype s_attack = {false,0,0,T_Attack,NULL,NULL};
#ifndef __WL_ACT3_H__
#define __WL_ACT3_H__
extern statetype s_boom1;
extern statetype s_boom2;
extern statetype s_boom3;
extern statetype s_rocket;
extern statetype s_smoke1;
extern statetype s_smoke2;
extern statetype s_smoke3;
extern statetype s_smoke4;
extern statetype s_grdstand;
extern statetype s_grdpath1;
extern statetype s_grdpath1s;
extern statetype s_grdpath2;
extern statetype s_grdpath3;
extern statetype s_grdpath3s;
extern statetype s_grdpath4;
extern statetype s_grdpain;
extern statetype s_grdpain1;
extern statetype s_grdshoot1;
extern statetype s_grdshoot2;
extern statetype s_grdshoot3;
extern statetype s_grdchase1;
extern statetype s_grdchase1s;
extern statetype s_grdchase2;
extern statetype s_grdchase3;
extern statetype s_grdchase3s;
extern statetype s_grdchase4;
extern statetype s_grddie1;
extern statetype s_grddie2;
extern statetype s_grddie3;
extern statetype s_grddie4;
extern statetype s_dogpath1;
extern statetype s_dogpath1s;
extern statetype s_dogpath2;
extern statetype s_dogpath3;
extern statetype s_dogpath3s;
extern statetype s_dogpath4;
extern statetype s_dogjump1;
extern statetype s_dogjump2;
extern statetype s_dogjump3;
extern statetype s_dogjump4;
extern statetype s_dogjump5;
extern statetype s_dogchase1;
extern statetype s_dogchase1s;
extern statetype s_dogchase2;
extern statetype s_dogchase3;
extern statetype s_dogchase3s;
extern statetype s_dogchase4;
extern statetype s_dogdie1;
extern statetype s_dogdie2;
extern statetype s_dogdie3;
extern statetype s_dogdead;
//
// officers
//
extern statetype s_ofcstand;
extern statetype s_ofcpath1;
extern statetype s_ofcpath1s;
extern statetype s_ofcpath2;
extern statetype s_ofcpath3;
extern statetype s_ofcpath3s;
extern statetype s_ofcpath4;
extern statetype s_ofcpain;
extern statetype s_ofcpain1;
extern statetype s_ofcshoot1;
extern statetype s_ofcshoot2;
extern statetype s_ofcshoot3;
extern statetype s_ofcchase1;
extern statetype s_ofcchase1s;
extern statetype s_ofcchase2;
extern statetype s_ofcchase3;
extern statetype s_ofcchase3s;
extern statetype s_ofcchase4;
extern statetype s_ofcdie1;
extern statetype s_ofcdie2;
extern statetype s_ofcdie3;
extern statetype s_ofcdie4;
extern statetype s_ofcdie5;
//
// mutant
//
extern statetype s_mutstand;
extern statetype s_mutpath1;
extern statetype s_mutpath1s;
extern statetype s_mutpath2;
extern statetype s_mutpath3;
extern statetype s_mutpath3s;
extern statetype s_mutpath4;
extern statetype s_mutpain;
extern statetype s_mutpain1;
extern statetype s_mutshoot1;
extern statetype s_mutshoot2;
extern statetype s_mutshoot3;
extern statetype s_mutshoot4;
extern statetype s_mutchase1;
extern statetype s_mutchase1s;
extern statetype s_mutchase2;
extern statetype s_mutchase3;
extern statetype s_mutchase3s;
extern statetype s_mutchase4;
extern statetype s_mutdie1;
extern statetype s_mutdie2;
extern statetype s_mutdie3;
extern statetype s_mutdie4;
extern statetype s_mutdie5;
//
// SS
//
extern statetype s_ssstand;
extern statetype s_sspath1;
extern statetype s_sspath1s;
extern statetype s_sspath2;
extern statetype s_sspath3;
extern statetype s_sspath3s;
extern statetype s_sspath4;
extern statetype s_sspain;
extern statetype s_sspain1;
extern statetype s_ssshoot1;
extern statetype s_ssshoot2;
extern statetype s_ssshoot3;
extern statetype s_ssshoot4;
extern statetype s_ssshoot5;
extern statetype s_ssshoot6;
extern statetype s_ssshoot7;
extern statetype s_ssshoot8;
extern statetype s_ssshoot9;
extern statetype s_sschase1;
extern statetype s_sschase1s;
extern statetype s_sschase2;
extern statetype s_sschase3;
extern statetype s_sschase3s;
extern statetype s_sschase4;
extern statetype s_ssdie1;
extern statetype s_ssdie2;
extern statetype s_ssdie3;
extern statetype s_ssdie4;
#ifdef SPEAR
extern statetype s_hrocket;
extern statetype s_hsmoke1;
extern statetype s_hsmoke2;
extern statetype s_hsmoke3;
extern statetype s_hsmoke4;
extern statetype s_hboom1;
extern statetype s_hboom2;
extern statetype s_hboom3;
//
// trans
//
extern statetype s_transstand;
extern statetype s_transchase1;
extern statetype s_transchase1s;
extern statetype s_transchase2;
extern statetype s_transchase3;
extern statetype s_transchase3s;
extern statetype s_transchase4;
extern statetype s_transdie0;
extern statetype s_transdie01;
extern statetype s_transdie1;
extern statetype s_transdie2;
extern statetype s_transdie3;
extern statetype s_transdie4;
extern statetype s_transshoot1;
extern statetype s_transshoot2;
extern statetype s_transshoot3;
extern statetype s_transshoot4;
extern statetype s_transshoot5;
extern statetype s_transshoot6;
extern statetype s_transshoot7;
extern statetype s_transshoot8;
extern statetype s_uberstand;
extern statetype s_uberchase1;
extern statetype s_uberchase1s;
extern statetype s_uberchase2;
extern statetype s_uberchase3;
extern statetype s_uberchase3s;
extern statetype s_uberchase4;
extern statetype s_uberdie0;
extern statetype s_uberdie01;
extern statetype s_uberdie1;
extern statetype s_uberdie2;
extern statetype s_uberdie3;
extern statetype s_uberdie4;
extern statetype s_uberdie5;
extern statetype s_ubershoot1;
extern statetype s_ubershoot2;
extern statetype s_ubershoot3;
extern statetype s_ubershoot4;
extern statetype s_ubershoot5;
extern statetype s_ubershoot6;
extern statetype s_ubershoot7;
//
// will
//
extern statetype s_willstand;
extern statetype s_willchase1;
extern statetype s_willchase1s;
extern statetype s_willchase2;
extern statetype s_willchase3;
extern statetype s_willchase3s;
extern statetype s_willchase4;
extern statetype s_willdie1;
extern statetype s_willdie2;
extern statetype s_willdie3;
extern statetype s_willdie4;
extern statetype s_willdie5;
extern statetype s_willdie6;
extern statetype s_willshoot1;
extern statetype s_willshoot2;
extern statetype s_willshoot3;
extern statetype s_willshoot4;
extern statetype s_willshoot5;
extern statetype s_willshoot6;
//
// death
//
extern statetype s_deathstand;
extern statetype s_deathchase1;
extern statetype s_deathchase1s;
extern statetype s_deathchase2;
extern statetype s_deathchase3;
extern statetype s_deathchase3s;
extern statetype s_deathchase4;
extern statetype s_deathdie1;
extern statetype s_deathdie2;
extern statetype s_deathdie3;
extern statetype s_deathdie4;
extern statetype s_deathdie5;
extern statetype s_deathdie6;
extern statetype s_deathdie7;
extern statetype s_deathdie8;
extern statetype s_deathdie9;
extern statetype s_deathshoot1;
extern statetype s_deathshoot2;
extern statetype s_deathshoot3;
extern statetype s_deathshoot4;
extern statetype s_deathshoot5;
//
// angel
//
extern statetype s_angelstand;
extern statetype s_angelchase1;
extern statetype s_angelchase1s;
extern statetype s_angelchase2;
extern statetype s_angelchase3;
extern statetype s_angelchase3s;
extern statetype s_angelchase4;
extern statetype s_angeldie1;
extern statetype s_angeldie11;
extern statetype s_angeldie2;
extern statetype s_angeldie3;
extern statetype s_angeldie4;
extern statetype s_angeldie5;
extern statetype s_angeldie6;
extern statetype s_angeldie7;
extern statetype s_angeldie8;
extern statetype s_angeldie9;
extern statetype s_angelshoot1;
extern statetype s_angelshoot2;
extern statetype s_angelshoot3;
extern statetype s_angeltired;
extern statetype s_angeltired2;
extern statetype s_angeltired3;
extern statetype s_angeltired4;
extern statetype s_angeltired5;
extern statetype s_angeltired6;
extern statetype s_angeltired7;
extern statetype s_spark1;
extern statetype s_spark2;
extern statetype s_spark3;
extern statetype s_spark4;
extern statetype s_spectrewait1;
extern statetype s_spectrewait2;
extern statetype s_spectrewait3;
extern statetype s_spectrewait4;
extern statetype s_spectrechase1;
extern statetype s_spectrechase2;
extern statetype s_spectrechase3;
extern statetype s_spectrechase4;
extern statetype s_spectredie1;
extern statetype s_spectredie2;
extern statetype s_spectredie3;
extern statetype s_spectredie4;
extern statetype s_spectrewake;
#endif
#ifndef SPEAR
extern statetype s_blinkychase1;
extern statetype s_blinkychase2;
extern statetype s_inkychase1;
extern statetype s_inkychase2;
extern statetype s_pinkychase1;
extern statetype s_pinkychase2;
extern statetype s_clydechase1;
extern statetype s_clydechase2;
//
// hans
//
extern statetype s_bossstand;
extern statetype s_bosschase1;
extern statetype s_bosschase1s;
extern statetype s_bosschase2;
extern statetype s_bosschase3;
extern statetype s_bosschase3s;
extern statetype s_bosschase4;
extern statetype s_bossdie1;
extern statetype s_bossdie2;
extern statetype s_bossdie3;
extern statetype s_bossdie4;
extern statetype s_bossshoot1;
extern statetype s_bossshoot2;
extern statetype s_bossshoot3;
extern statetype s_bossshoot4;
extern statetype s_bossshoot5;
extern statetype s_bossshoot6;
extern statetype s_bossshoot7;
extern statetype s_bossshoot8;
//
// gretel
//
extern statetype s_gretelstand;
extern statetype s_gretelchase1;
extern statetype s_gretelchase1s;
extern statetype s_gretelchase2;
extern statetype s_gretelchase3;
extern statetype s_gretelchase3s;
extern statetype s_gretelchase4;
extern statetype s_greteldie1;
extern statetype s_greteldie2;
extern statetype s_greteldie3;
extern statetype s_greteldie4;
extern statetype s_gretelshoot1;
extern statetype s_gretelshoot2;
extern statetype s_gretelshoot3;
extern statetype s_gretelshoot4;
extern statetype s_gretelshoot5;
extern statetype s_gretelshoot6;
extern statetype s_gretelshoot7;
extern statetype s_gretelshoot8;
//
// schabb
//
extern statetype s_schabbstand;
extern statetype s_schabbchase1;
extern statetype s_schabbchase1s;
extern statetype s_schabbchase2;
extern statetype s_schabbchase3;
extern statetype s_schabbchase3s;
extern statetype s_schabbchase4;
extern statetype s_schabbdeathcam;
extern statetype s_schabbdie1;
extern statetype s_schabbdie2;
extern statetype s_schabbdie3;
extern statetype s_schabbdie4;
extern statetype s_schabbdie5;
extern statetype s_schabbdie6;
extern statetype s_schabbshoot1;
extern statetype s_schabbshoot2;
extern statetype s_needle1;
extern statetype s_needle2;
extern statetype s_needle3;
extern statetype s_needle4;
//
// gift
//
extern statetype s_giftstand;
extern statetype s_giftchase1;
extern statetype s_giftchase1s;
extern statetype s_giftchase2;
extern statetype s_giftchase3;
extern statetype s_giftchase3s;
extern statetype s_giftchase4;
extern statetype s_giftdeathcam;
extern statetype s_giftdie1;
extern statetype s_giftdie2;
extern statetype s_giftdie3;
extern statetype s_giftdie4;
extern statetype s_giftdie5;
extern statetype s_giftdie6;
extern statetype s_giftshoot1;
extern statetype s_giftshoot2;
//
// fat
//
extern statetype s_fatstand;
extern statetype s_fatchase1;
extern statetype s_fatchase1s;
extern statetype s_fatchase2;
extern statetype s_fatchase3;
extern statetype s_fatchase3s;
extern statetype s_fatchase4;
extern statetype s_fatdeathcam;
extern statetype s_fatdie1;
extern statetype s_fatdie2;
extern statetype s_fatdie3;
extern statetype s_fatdie4;
extern statetype s_fatdie5;
extern statetype s_fatdie6;
extern statetype s_fatshoot1;
extern statetype s_fatshoot2;
extern statetype s_fatshoot3;
extern statetype s_fatshoot4;
extern statetype s_fatshoot5;
extern statetype s_fatshoot6;
//
// fake
//
extern statetype s_fakestand;
extern statetype s_fakechase1;
extern statetype s_fakechase1s;
extern statetype s_fakechase2;
extern statetype s_fakechase3;
extern statetype s_fakechase3s;
extern statetype s_fakechase4;
extern statetype s_fakedie1;
extern statetype s_fakedie2;
extern statetype s_fakedie3;
extern statetype s_fakedie4;
extern statetype s_fakedie5;
extern statetype s_fakedie6;
extern statetype s_fakeshoot1;
extern statetype s_fakeshoot2;
extern statetype s_fakeshoot3;
extern statetype s_fakeshoot4;
extern statetype s_fakeshoot5;
extern statetype s_fakeshoot6;
extern statetype s_fakeshoot7;
extern statetype s_fakeshoot8;
extern statetype s_fakeshoot9;
extern statetype s_fire1;
extern statetype s_fire2;
//
// hitler
//
extern statetype s_mechastand;
extern statetype s_mechachase1;
extern statetype s_mechachase1s;
extern statetype s_mechachase2;
extern statetype s_mechachase3;
extern statetype s_mechachase3s;
extern statetype s_mechachase4;
extern statetype s_mechadie1;
extern statetype s_mechadie2;
extern statetype s_mechadie3;
extern statetype s_mechadie4;
extern statetype s_mechashoot1;
extern statetype s_mechashoot2;
extern statetype s_mechashoot3;
extern statetype s_mechashoot4;
extern statetype s_mechashoot5;
extern statetype s_mechashoot6;
extern statetype s_hitlerchase1;
extern statetype s_hitlerchase1s;
extern statetype s_hitlerchase2;
extern statetype s_hitlerchase3;
extern statetype s_hitlerchase3s;
extern statetype s_hitlerchase4;
extern statetype s_hitlerdeathcam;
extern statetype s_hitlerdie1;
extern statetype s_hitlerdie2;
extern statetype s_hitlerdie3;
extern statetype s_hitlerdie4;
extern statetype s_hitlerdie5;
extern statetype s_hitlerdie6;
extern statetype s_hitlerdie7;
extern statetype s_hitlerdie8;
extern statetype s_hitlerdie9;
extern statetype s_hitlerdie10;
extern statetype s_hitlershoot1;
extern statetype s_hitlershoot2;
extern statetype s_hitlershoot3;
extern statetype s_hitlershoot4;
extern statetype s_hitlershoot5;
extern statetype s_hitlershoot6;
//
// BJ victory
//
extern statetype s_bjrun1;
extern statetype s_bjrun1s;
extern statetype s_bjrun2;
extern statetype s_bjrun3;
extern statetype s_bjrun3s;
extern statetype s_bjrun4;
extern statetype s_bjjump1;
extern statetype s_bjjump2;
extern statetype s_bjjump3;
extern statetype s_bjjump4;
extern statetype s_deathcam;
#endif
extern statetype s_player;
extern statetype s_attack;
#endif
...@@ -41,12 +41,6 @@ objtype *LastAttacker; ...@@ -41,12 +41,6 @@ objtype *LastAttacker;
*/ */
void T_Player(objtype *ob);
void T_Attack(objtype *ob);
statetype s_player = {false,0,0,T_Player,NULL,NULL};
statetype s_attack = {false,0,0,T_Attack,NULL,NULL};
struct atkinf struct atkinf
{ {
char tics, attack, frame; // attack is 1 for gun, 2 for knife char tics, attack, frame; // attack is 1 for gun, 2 for knife
...@@ -62,13 +56,6 @@ void DrawWeapon (void); ...@@ -62,13 +56,6 @@ void DrawWeapon (void);
void GiveWeapon (int weapon); void GiveWeapon (int weapon);
void GiveAmmo (int ammo); void GiveAmmo (int ammo);
//===========================================================================
boolean TryMove (objtype *ob);
void T_Player (objtype *ob);
void ClipMove (objtype *ob, long xmove, long ymove);
/* /*
============================================================================= =============================================================================
...@@ -87,7 +74,7 @@ void ClipMove (objtype *ob, long xmove, long ymove); ...@@ -87,7 +74,7 @@ void ClipMove (objtype *ob, long xmove, long ymove);
====================== ======================
*/ */
void CheckWeaponChange (void) void CheckWeaponChange()
{ {
int i; int i;
...@@ -264,7 +251,6 @@ void UpdateFace() ...@@ -264,7 +251,6 @@ void UpdateFace()
} }
/* /*
=============== ===============
= =
...@@ -734,11 +720,11 @@ void GetBonus (statobj_t *check) ...@@ -734,11 +720,11 @@ void GetBonus (statobj_t *check)
= TryMove = TryMove
= =
= returns true if move ok = returns true if move ok
= debug: use pointers to optimize =
=================== ===================
*/ */
boolean TryMove (objtype *ob) boolean TryMove(objtype *ob)
{ {
int xl,yl,xh,yh,x,y; int xl,yl,xh,yh,x,y;
objtype *check; objtype *check;
...@@ -803,7 +789,7 @@ boolean TryMove (objtype *ob) ...@@ -803,7 +789,7 @@ boolean TryMove (objtype *ob)
=================== ===================
*/ */
void ClipMove (objtype *ob, long xmove, long ymove) void ClipMove(objtype *ob, long xmove, long ymove)
{ {
long basex,basey; long basex,basey;
...@@ -847,12 +833,11 @@ void ClipMove (objtype *ob, long xmove, long ymove) ...@@ -847,12 +833,11 @@ void ClipMove (objtype *ob, long xmove, long ymove)
=================== ===================
*/ */
void VictoryTile (void) void VictoryTile()
{ {
#ifndef SPEAR #ifndef SPEAR
SpawnBJVictory (); SpawnBJVictory();
#endif #endif
gamestate.victoryflag = true; gamestate.victoryflag = true;
} }
...@@ -870,14 +855,13 @@ void Thrust(int angle, long speed) ...@@ -870,14 +855,13 @@ void Thrust(int angle, long speed)
long xmove,ymove; long xmove,ymove;
unsigned offset; unsigned offset;
#ifdef SPEAR
// //
// ZERO FUNNY COUNTER IF MOVED! // ZERO FUNNY COUNTER IF MOVED!
// //
#ifdef SPEAR
if (speed) if (speed)
funnyticount = 0; funnyticount = 0;
#endif #endif
thrustspeed += speed; thrustspeed += speed;
// //
...@@ -919,7 +903,7 @@ void Thrust(int angle, long speed) ...@@ -919,7 +903,7 @@ void Thrust(int angle, long speed)
=============== ===============
*/ */
void Cmd_Fire (void) void Cmd_Fire()
{ {
buttonheld[bt_attack] = true; buttonheld[bt_attack] = true;
...@@ -946,8 +930,8 @@ void Cmd_Fire (void) ...@@ -946,8 +930,8 @@ void Cmd_Fire (void)
void Cmd_Use() void Cmd_Use()
{ {
int checkx,checky,doornum,dir; int checkx, checky, doornum, dir;
boolean elevatorok; boolean elevatorok;
// //
// find which cardinal direction the player is facing // find which cardinal direction the player is facing
...@@ -1003,16 +987,16 @@ void Cmd_Use() ...@@ -1003,16 +987,16 @@ void Cmd_Use()
playstate = ex_secretlevel; playstate = ex_secretlevel;
else else
playstate = ex_completed; playstate = ex_completed;
SD_PlaySound (LEVELDONESND); SD_PlaySound(LEVELDONESND);
SD_WaitSoundDone(); SD_WaitSoundDone();
} }
else if (!buttonheld[bt_use] && doornum & 0x80) else if (!buttonheld[bt_use] && doornum & 0x80)
{ {
buttonheld[bt_use] = true; buttonheld[bt_use] = true;
OperateDoor (doornum & ~0x80); OperateDoor(doornum & ~0x80);
} }
else else
SD_PlaySound (DONOTHINGSND); SD_PlaySound(DONOTHINGSND);
} }
...@@ -1191,9 +1175,9 @@ void GunAttack(objtype *ob) ...@@ -1191,9 +1175,9 @@ void GunAttack(objtype *ob)
=============== ===============
*/ */
void VictorySpin (void) void VictorySpin()
{ {
long desty; long desty;
if (player->angle > 270) if (player->angle > 270)
{ {
...@@ -1231,13 +1215,13 @@ void VictorySpin (void) ...@@ -1231,13 +1215,13 @@ void VictorySpin (void)
void T_Attack(objtype *ob) void T_Attack(objtype *ob)
{ {
struct atkinf *cur; struct atkinf *cur;
UpdateFace (); UpdateFace();
if (gamestate.victoryflag) // watching the BJ actor if (gamestate.victoryflag) // watching the BJ actor
{ {
VictorySpin (); VictorySpin();
return; return;
} }
...@@ -1317,10 +1301,6 @@ void T_Attack(objtype *ob) ...@@ -1317,10 +1301,6 @@ void T_Attack(objtype *ob)
} }
//===========================================================================
/* /*
=============== ===============
= =
...@@ -1329,32 +1309,29 @@ void T_Attack(objtype *ob) ...@@ -1329,32 +1309,29 @@ void T_Attack(objtype *ob)
=============== ===============
*/ */
void T_Player (objtype *ob) void T_Player(objtype *ob)
{ {
if (gamestate.victoryflag) // watching the BJ actor if (gamestate.victoryflag) // watching the BJ actor
{ {
VictorySpin (); VictorySpin();
return; return;
} }
UpdateFace (); UpdateFace();
CheckWeaponChange (); CheckWeaponChange();
if ( buttonstate[bt_use] ) if (buttonstate[bt_use])
Cmd_Use (); Cmd_Use();
if ( buttonstate[bt_attack] && !buttonheld[bt_attack]) if (buttonstate[bt_attack] && !buttonheld[bt_attack])
Cmd_Fire (); Cmd_Fire();
ControlMovement (ob); ControlMovement(ob);
if (gamestate.victoryflag) // watching the BJ actor if (gamestate.victoryflag) // watching the BJ actor
return; return;
plux = player->x >> UNSIGNEDSHIFT; // scale to fit in unsigned plux = player->x >> UNSIGNEDSHIFT; // scale to fit in unsigned
pluy = player->y >> UNSIGNEDSHIFT; pluy = player->y >> UNSIGNEDSHIFT;
player->tilex = player->x >> TILESHIFT; // scale to tile values player->tilex = player->x >> TILESHIFT; // scale to tile values
player->tiley = player->y >> TILESHIFT; player->tiley = player->y >> TILESHIFT;
} }
...@@ -862,9 +862,6 @@ extern fixed viewsin,viewcos; ...@@ -862,9 +862,6 @@ extern fixed viewsin,viewcos;
extern int horizwall[],vertwall[]; extern int horizwall[],vertwall[];
extern unsigned pwallpos;
fixed FixedByFrac (fixed a, fixed b); fixed FixedByFrac (fixed a, fixed b);
void BuildTables (void); void BuildTables (void);
void CalcTics (void); void CalcTics (void);
...@@ -977,66 +974,6 @@ void InitAreas (void); ...@@ -977,66 +974,6 @@ void InitAreas (void);
============================================================================= =============================================================================
*/ */
extern statetype s_grddie1;
extern statetype s_dogdie1;
extern statetype s_ofcdie1;
extern statetype s_mutdie1;
extern statetype s_ssdie1;
extern statetype s_bossdie1;
extern statetype s_schabbdie1;
extern statetype s_fakedie1;
extern statetype s_mechadie1;
extern statetype s_hitlerdie1;
extern statetype s_greteldie1;
extern statetype s_giftdie1;
extern statetype s_fatdie1;
extern statetype s_spectredie1;
extern statetype s_angeldie1;
extern statetype s_transdie0;
extern statetype s_uberdie0;
extern statetype s_willdie1;
extern statetype s_deathdie1;
extern statetype s_grdchase1;
extern statetype s_dogchase1;
extern statetype s_ofcchase1;
extern statetype s_sschase1;
extern statetype s_mutchase1;
extern statetype s_bosschase1;
extern statetype s_schabbchase1;
extern statetype s_fakechase1;
extern statetype s_mechachase1;
extern statetype s_gretelchase1;
extern statetype s_giftchase1;
extern statetype s_fatchase1;
extern statetype s_spectrechase1;
extern statetype s_angelchase1;
extern statetype s_transchase1;
extern statetype s_uberchase1;
extern statetype s_willchase1;
extern statetype s_deathchase1;
extern statetype s_blinkychase1;
extern statetype s_hitlerchase1;
extern statetype s_grdpain;
extern statetype s_grdpain1;
extern statetype s_ofcpain;
extern statetype s_ofcpain1;
extern statetype s_sspain;
extern statetype s_sspain1;
extern statetype s_mutpain;
extern statetype s_mutpain1;
extern statetype s_deathcam;
extern statetype s_schabbdeathcam2;
extern statetype s_hitlerdeathcam2;
extern statetype s_giftdeathcam2;
extern statetype s_fatdeathcam2;
void A_DeathScream(objtype *ob); void A_DeathScream(objtype *ob);
void SpawnBJVictory(void); void SpawnBJVictory(void);
...@@ -1073,4 +1010,6 @@ void SpawnHitler (int tilex, int tiley); ...@@ -1073,4 +1010,6 @@ void SpawnHitler (int tilex, int tiley);
extern void HelpScreens(); extern void HelpScreens();
extern void EndText(); extern void EndText();
#include "wl_act3.h"
#endif #endif
...@@ -56,9 +56,10 @@ void EndSpear() ...@@ -56,9 +56,10 @@ void EndSpear()
WindowW = 320; WindowW = 320;
PrintX = 0; PrintX = 0;
PrintY = 180; PrintY = 180;
US_CPrint (STR_ENDGAME1"\n"); US_CPrint(STR_ENDGAME1"\n");
US_CPrint (STR_ENDGAME2); US_CPrint(STR_ENDGAME2);
VW_UpdateScreen (); VW_UpdateScreen();
IN_StartAck (); IN_StartAck ();
set_TimeCount(0); set_TimeCount(0);
while ( !IN_CheckAck () && (get_TimeCount() < 700) ); while ( !IN_CheckAck () && (get_TimeCount() < 700) );
...@@ -66,9 +67,10 @@ void EndSpear() ...@@ -66,9 +67,10 @@ void EndSpear()
PrintX = 0; PrintX = 0;
PrintY = 180; PrintY = 180;
VW_Bar(0,180,320,20,0); VW_Bar(0,180,320,20,0);
US_CPrint (STR_ENDGAME3"\n"); US_CPrint(STR_ENDGAME3"\n");
US_CPrint (STR_ENDGAME4); US_CPrint(STR_ENDGAME4);
VW_UpdateScreen (); VW_UpdateScreen();
IN_StartAck (); IN_StartAck ();
set_TimeCount(0); set_TimeCount(0);
while ( !IN_CheckAck () && (get_TimeCount() < 700) ); while ( !IN_CheckAck () && (get_TimeCount() < 700) );
...@@ -493,7 +495,7 @@ void LevelCompleted() ...@@ -493,7 +495,7 @@ void LevelCompleted()
}; };
CacheLump(LEVELEND_LUMP_START,LEVELEND_LUMP_END); CacheLump(LEVELEND_LUMP_START,LEVELEND_LUMP_END);
ClearSplitVWB (); // set up for double buffering in split screen ClearSplitVWB(); // set up for double buffering in split screen
VW_Bar (0,0,320,200-STATUSLINES,127); VW_Bar (0,0,320,200-STATUSLINES,127);
StartCPMusic(ENDLEVEL_MUS); StartCPMusic(ENDLEVEL_MUS);
...@@ -814,14 +816,14 @@ void LevelCompleted() ...@@ -814,14 +816,14 @@ void LevelCompleted()
#ifdef SPEARDEMO #ifdef SPEARDEMO
if (gamestate.mapon == 1) if (gamestate.mapon == 1)
{ {
SD_PlaySound (BONUS1UPSND); SD_PlaySound(BONUS1UPSND);
CA_CacheGrChunk (STARTFONT+1); CA_CacheGrChunk(STARTFONT+1);
Message ("This concludes your demo\n" Message("This concludes your demo\n"
"of Spear of Destiny! Now,\n" "of Spear of Destiny! Now,\n"
"go to your local software\n" "go to your local software\n"
"store and buy it!"); "store and buy it!");
CA_UnCacheGrChunk (STARTFONT+1); CA_UnCacheGrChunk(STARTFONT+1);
IN_ClearKeysDown(); IN_ClearKeysDown();
IN_Ack(); IN_Ack();
...@@ -933,14 +935,14 @@ void DrawHighScores() ...@@ -933,14 +935,14 @@ void DrawHighScores()
fontnumber = 0; fontnumber = 0;
#else #else
CacheLump (BACKDROP_LUMP_START,BACKDROP_LUMP_END); CacheLump(BACKDROP_LUMP_START,BACKDROP_LUMP_END);
ClearMScreen(); ClearMScreen();
DrawStripes(10); DrawStripes(10);
UnCacheLump (BACKDROP_LUMP_START,BACKDROP_LUMP_END); UnCacheLump(BACKDROP_LUMP_START,BACKDROP_LUMP_END);
CacheLump (HIGHSCORES_LUMP_START,HIGHSCORES_LUMP_END); CacheLump(HIGHSCORES_LUMP_START,HIGHSCORES_LUMP_END);
CA_CacheGrChunk (STARTFONT+1); CA_CacheGrChunk(STARTFONT+1);
VWB_DrawPic (0,0,HIGHSCORESPIC); VWB_DrawPic(0,0,HIGHSCORESPIC);
fontnumber = 1; fontnumber = 1;
#endif #endif
...@@ -979,15 +981,13 @@ void DrawHighScores() ...@@ -979,15 +981,13 @@ void DrawHighScores()
PrintX = 194 - w; PrintX = 194 - w;
#endif #endif
#ifndef UPLOAD #if !defined(UPLOAD) || !defined(SPEAR)
#ifndef SPEAR
PrintX -= 6; PrintX -= 6;
itoa(s->episode+1,buffer1,10); itoa(s->episode+1,buffer1,10);
US_Print("E"); US_Print("E");
US_Print(buffer1); US_Print(buffer1);
US_Print("/L"); US_Print("/L");
#endif #endif
#endif
#ifdef SPEAR #ifdef SPEAR
if (s->completed == 21) if (s->completed == 21)
...@@ -1015,14 +1015,11 @@ void DrawHighScores() ...@@ -1015,14 +1015,11 @@ void DrawHighScores()
VW_UpdateScreen(); VW_UpdateScreen();
#ifdef SPEAR #ifdef SPEAR
UnCacheLump (HIGHSCORES_LUMP_START,HIGHSCORES_LUMP_END); UnCacheLump(HIGHSCORES_LUMP_START, HIGHSCORES_LUMP_END);
fontnumber = 0; fontnumber = 0;
#endif #endif
} }
//===========================================================================
/* /*
======================= =======================
= =
...@@ -1031,27 +1028,22 @@ void DrawHighScores() ...@@ -1031,27 +1028,22 @@ void DrawHighScores()
======================= =======================
*/ */
void CheckHighScore (long score,word other) void CheckHighScore(long score, word other)
{ {
word i,j; word i, j;
int n; int n;
HighScore myscore; HighScore myscore;
strcpy(myscore.name,""); strcpy(myscore.name, "");
myscore.score = score; myscore.score = score;
myscore.episode = gamestate.episode; myscore.episode = gamestate.episode;
myscore.completed = other; myscore.completed = other;
for (i = 0,n = -1;i < MaxScores;i++) for (i = 0, n = -1; i < MaxScores;i++)
{ {
if if ((myscore.score > Scores[i].score) ||
( ((myscore.score == Scores[i].score) &&
(myscore.score > Scores[i].score) (myscore.completed > Scores[i].completed)))
|| (
(myscore.score == Scores[i].score)
&& (myscore.completed > Scores[i].completed)
)
)
{ {
for (j = MaxScores;--j > i;) for (j = MaxScores;--j > i;)
Scores[j] = Scores[j - 1]; Scores[j] = Scores[j - 1];
...@@ -1062,13 +1054,13 @@ void CheckHighScore (long score,word other) ...@@ -1062,13 +1054,13 @@ void CheckHighScore (long score,word other)
} }
#ifdef SPEAR #ifdef SPEAR
StartCPMusic (XAWARD_MUS); StartCPMusic(XAWARD_MUS);
#else #else
StartCPMusic (ROSTER_MUS); StartCPMusic(ROSTER_MUS);
#endif #endif
DrawHighScores (); DrawHighScores();
VW_FadeIn (); VW_FadeIn();
if (n != -1) if (n != -1)
{ {
...@@ -1085,7 +1077,7 @@ void CheckHighScore (long score,word other) ...@@ -1085,7 +1077,7 @@ void CheckHighScore (long score,word other)
PrintX = 16; PrintX = 16;
fontnumber = 1; fontnumber = 1;
VW_Bar(PrintX-2,PrintY-2,145,15,0x9c); VW_Bar(PrintX-2,PrintY-2,145,15,0x9c);
VW_UpdateScreen (); VW_UpdateScreen();
backcolor = 0x9c; backcolor = 0x9c;
fontcolor = 15; fontcolor = 15;
US_LineInput(PrintX,PrintY,Scores[n].name,NULL,true,MaxHighName,130); US_LineInput(PrintX,PrintY,Scores[n].name,NULL,true,MaxHighName,130);
...@@ -1093,7 +1085,7 @@ void CheckHighScore (long score,word other) ...@@ -1093,7 +1085,7 @@ void CheckHighScore (long score,word other)
} }
else else
{ {
IN_ClearKeysDown (); IN_ClearKeysDown();
IN_UserInput(500); IN_UserInput(500);
} }
......
...@@ -282,9 +282,9 @@ void DiskFlopAnim(int x, int y) ...@@ -282,9 +282,9 @@ void DiskFlopAnim(int x, int y)
long DoChecksum(byte *source, unsigned size, long checksum) long DoChecksum(byte *source, unsigned size, long checksum)
{ {
unsigned i; int i;
for (i=0;i<size-1;i++) for (i = 0; i < size-1; i++)
checksum += source[i]^source[i+1]; checksum += source[i]^source[i+1];
return checksum; return checksum;
...@@ -427,9 +427,9 @@ boolean LoadTheGame(int file,int x,int y) ...@@ -427,9 +427,9 @@ boolean LoadTheGame(int file,int x,int y)
if (nullobj.active == ac_badobject) if (nullobj.active == ac_badobject)
break; break;
GetNewActor (); GetNewActor();
// don't copy over the links // don't copy over the links
memcpy(new,&nullobj,sizeof(nullobj)-4); memcpy(new, &nullobj, sizeof(nullobj)-4);
} }
......
...@@ -440,7 +440,7 @@ void US_ControlPanel(byte scancode) ...@@ -440,7 +440,7 @@ void US_ControlPanel(byte scancode)
#ifdef SPEAR #ifdef SPEAR
UnCacheLump (OPTIONS_LUMP_START,OPTIONS_LUMP_END); UnCacheLump (OPTIONS_LUMP_START,OPTIONS_LUMP_END);
MM_SortMem (); MM_SortMem();
#endif #endif
} }
...@@ -1344,7 +1344,6 @@ int CP_SaveGame(int quick) ...@@ -1344,7 +1344,6 @@ int CP_SaveGame(int quick)
if (SaveGamesAvail[which]) if (SaveGamesAvail[which])
{ {
name[7]=which+'0'; name[7]=which+'0';
unlink(name);
handle=creat(name,S_IREAD|S_IWRITE); handle=creat(name,S_IREAD|S_IWRITE);
strcpy(input,&SaveGameNames[which][0]); strcpy(input,&SaveGameNames[which][0]);
...@@ -1399,16 +1398,15 @@ int CP_SaveGame(int quick) ...@@ -1399,16 +1398,15 @@ int CP_SaveGame(int quick)
if (US_LineInput(LSM_X+LSItems.indent+2,LSM_Y+which*13+1,input,input,true,31,LSM_W-LSItems.indent-30)) if (US_LineInput(LSM_X+LSItems.indent+2,LSM_Y+which*13+1,input,input,true,31,LSM_W-LSItems.indent-30))
{ {
SaveGamesAvail[which]=1; SaveGamesAvail[which] = 1;
strcpy(&SaveGameNames[which][0],input); strcpy(&SaveGameNames[which][0],input);
unlink(name); handle = creat(name, S_IREAD|S_IWRITE);
handle=creat(name,S_IREAD|S_IWRITE); nwritten = write(handle, (void *)input, 32);
nwritten = write(handle,(void *)input,32); lseek(handle, 32, SEEK_SET);
lseek(handle,32,SEEK_SET);
DrawLSAction(1); DrawLSAction(1);
SaveTheGame(handle,LSA_X+8,LSA_Y+5); SaveTheGame(handle, LSA_X+8, LSA_Y+5);
close(handle); close(handle);
...@@ -3244,7 +3242,6 @@ void StartCPMusic(int song) ...@@ -3244,7 +3242,6 @@ void StartCPMusic(int song)
lastmusic = song; lastmusic = song;
CA_CacheAudioChunk(STARTMUSIC + song); CA_CacheAudioChunk(STARTMUSIC + song);
MM_SetLock((memptr *)&(audiosegs[STARTMUSIC + song]), true);
SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + song]); SD_StartMusic((MusicGroup *)audiosegs[STARTMUSIC + song]);
} }
...@@ -3252,8 +3249,10 @@ void FreeMusic() ...@@ -3252,8 +3249,10 @@ void FreeMusic()
{ {
SD_MusicOff(); SD_MusicOff();
if (lastmusic >= 0) if (lastmusic >= 0) {
CA_UnCacheAudioChunk(STARTMUSIC + lastmusic); CA_UnCacheAudioChunk(STARTMUSIC + lastmusic);
lastmusic = -1;
}
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
......
...@@ -1104,7 +1104,7 @@ void FinishPaletteShifts (void) ...@@ -1104,7 +1104,7 @@ void FinishPaletteShifts (void)
===================== =====================
*/ */
void DoActor (objtype *ob) void DoActor(objtype *ob)
{ {
void (*think)(objtype *); void (*think)(objtype *);
...@@ -1134,7 +1134,7 @@ void DoActor (objtype *ob) ...@@ -1134,7 +1134,7 @@ void DoActor (objtype *ob)
if (ob->flags&FL_NEVERMARK) if (ob->flags&FL_NEVERMARK)
return; return;
if ( (ob->flags&FL_NONMARK) && actorat[ob->tilex][ob->tiley]) if ((ob->flags&FL_NONMARK) && actorat[ob->tilex][ob->tiley])
return; return;
actorat[ob->tilex][ob->tiley] = ob; actorat[ob->tilex][ob->tiley] = ob;
...@@ -1153,7 +1153,7 @@ void DoActor (objtype *ob) ...@@ -1153,7 +1153,7 @@ void DoActor (objtype *ob)
think (ob); think (ob);
if (!ob->state) if (!ob->state)
{ {
RemoveObj (ob); RemoveObj(ob);
return; return;
} }
} }
...@@ -1185,7 +1185,7 @@ think: ...@@ -1185,7 +1185,7 @@ think:
think (ob); think (ob);
if (!ob->state) if (!ob->state)
{ {
RemoveObj (ob); RemoveObj(ob);
return; return;
} }
} }
...@@ -1193,7 +1193,7 @@ think: ...@@ -1193,7 +1193,7 @@ think:
if (ob->flags&FL_NEVERMARK) if (ob->flags&FL_NEVERMARK)
return; return;
if ( (ob->flags&FL_NONMARK) && actorat[ob->tilex][ob->tiley]) if ((ob->flags&FL_NONMARK) && actorat[ob->tilex][ob->tiley])
return; return;
actorat[ob->tilex][ob->tiley] = ob; actorat[ob->tilex][ob->tiley] = ob;
......
...@@ -1214,25 +1214,19 @@ void FirstSighting (objtype *ob) ...@@ -1214,25 +1214,19 @@ void FirstSighting (objtype *ob)
break; break;
case gretelobj: case gretelobj:
#ifndef UPLOAD
SD_PlaySound(KEINSND); SD_PlaySound(KEINSND);
#endif
NewState (ob,&s_gretelchase1); NewState (ob,&s_gretelchase1);
ob->speed *= 3; // go faster when chasing player ob->speed *= 3; // go faster when chasing player
break; break;
case giftobj: case giftobj:
#ifndef UPLOAD
SD_PlaySound(EINESND); SD_PlaySound(EINESND);
#endif
NewState (ob,&s_giftchase1); NewState (ob,&s_giftchase1);
ob->speed *= 3; // go faster when chasing player ob->speed *= 3; // go faster when chasing player
break; break;
case fatobj: case fatobj:
#ifndef UPLOAD
SD_PlaySound(ERLAUBENSND); SD_PlaySound(ERLAUBENSND);
#endif
NewState (ob,&s_fatchase1); NewState (ob,&s_fatchase1);
ob->speed *= 3; // go faster when chasing player ob->speed *= 3; // go faster when chasing player
break; break;
......
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