SimSprite *GlobalSprites[OBJN];
SimSprite *NewSprite(char *name, int type, int x, int y);
+void MonsterHere(int x, int y);
+void MakeShipHere(int x, int y);
+void StartFire(int x, int y);
+void OFireZone(int Xloc, int Yloc, int ch);
+void Destroy(int ox, int oy);
+void ExplodeSprite(SimSprite *sprite);
+int CanDriveOn(int x, int y);
+void DoBusSprite(SimSprite *sprite);
+void DoExplosionSprite(SimSprite *sprite);
+void DoTornadoSprite(SimSprite *sprite);
+void DoMonsterSprite(SimSprite *sprite);
+void DoShipSprite(SimSprite *sprite);
+void DoAirplaneSprite(SimSprite *sprite);
+void DoCopterSprite(SimSprite *sprite);
+void DoTrainSprite(SimSprite *sprite);
+void DrawSprite(SimView *view, SimSprite *sprite);
+void InitSprite(SimSprite *sprite, int x, int y);
#define TRA_GROOVE_X -39
return TCL_ERROR;
}
- if (ent = Tcl_FindHashEntry(&SpriteCmds, argv[1])) {
+ if ((ent = Tcl_FindHashEntry(&SpriteCmds, argv[1]))) {
cmd = (int (*)())ent->clientData;
Tk_Preserve((ClientData) sprite);
result = cmd(sprite, interp, argc, argv);
}
-sprite_command_init()
+void
+sprite_command_init(void)
{
int i;
}
+void
InitSprite(SimSprite *sprite, int x, int y)
{
sprite->x = x; sprite->y = y;
}
-DestroyAllSprites()
+void
+DestroyAllSprites(void)
{
SimSprite *sprite;
}
+void
DestroySprite(SimSprite *sprite)
{
SimView *view;
}
+void
DrawObjects(SimView *view)
{
SimSprite *sprite;
}
+void
DrawSprite(SimView *view, SimSprite *sprite)
{
Pixmap pict, mask;
}
+int
TryOther(int Tpoo, int Told, int Tnew)
{
register short z;
}
+int
GetDis(int x1, int y1, int x2, int y2)
{
register short dispX, dispY;
}
-MoveObjects()
+void MoveObjects(void)
{
SimSprite *sprite;
}
+void
DoTrainSprite(SimSprite *sprite)
{
static short Cx[4] = { 0, 16, 0, -16 };
}
+void
DoCopterSprite(SimSprite *sprite)
{
static short CDx[9] = { 0, 0, 3, 5, 3, 0, -3, -5, -3 };
}
+void
DoAirplaneSprite(SimSprite *sprite)
{
static short CDx[12] = { 0, 0, 6, 8, 6, 0, -6, -8, -6, 8, 8, 8 };
}
+void
DoShipSprite(SimSprite *sprite)
{
static short BDx[9] = { 0, 0, 1, 1, 1, 0, -1, -1, -1 };
}
+void
DoMonsterSprite(SimSprite *sprite)
{
static short Gx[5] = { 2, 2, -2, -2, 0 };
}
+void
DoTornadoSprite(SimSprite *sprite)
{
static short CDx[9] = { 2, 3, 2, 0, -2, -3 };
}
+void
DoExplosionSprite(SimSprite *sprite)
{
short x, y;
}
+void
DoBusSprite(SimSprite *sprite)
{
static short Dx[5] = { 0, 1, 0, -1, 0 };
static short Dy[5] = { -1, 0, 1, 0, 0 };
static short Dir2Frame[4] = { 1, 2, 1, 2 };
- register int dir, dir2;
- int c, dx, dy, crossed, tx, ty, otx, oty;
+ int dx, dy, tx, ty, otx, oty;
int turned = 0;
- int speed, z;
+ int speed = 0, z;
#ifdef DEBUGBUS
printf("Bus dir %d turn %d frame %d\n",
}
+void
ExplodeSprite(SimSprite *sprite)
{
int x, y;
}
+void
Destroy(int ox, int oy)
{
short t, z, x, y;
}
+void
OFireZone(int Xloc, int Yloc, int ch)
{
register short Xtem, Ytem;
}
+void
StartFire(int x, int y)
{
- register t, z;
+ register int t, z;
x >>= 4;
y >>= 4;
}
+void
GenerateTrain(int x, int y)
{
if ((TotalPop > 20) &&
}
+void
GenerateBus(int x, int y)
{
if ((GetSprite(BUS) == NULL) &&
}
+void
GenerateShip(void)
{
register short x, y;
}
-MakeShipHere(int x, int y, int z)
+void
+MakeShipHere(int x, int y)
{
MakeSprite(SHI, (x <<4) - (48 - 1), (y <<4));
}
+void
MakeMonster(void)
{
- register x, y, z, done = 0;
+ register int x, y, z, done = 0;
SimSprite *sprite;
if ((sprite = GetSprite(GOD)) != NULL) {
}
+void
MonsterHere(int x, int y)
{
- short z;
-
MakeSprite(GOD, (x <<4) + 48, (y <<4));
ClearMes();
SendMesAt(-21, x + 5, y);
}
+void
GenerateCopter(int x, int y)
{
if (GetSprite(COP) != NULL) return;
}
+void
GeneratePlane(int x, int y)
{
if (GetSprite(AIR) != NULL) return;
}
+void
MakeAirCrash(void)
{
#ifndef NO_AIRCRASH
}
+void
MakeTornado(void)
{
short x, y;
}
+void
MakeExplosion(int x, int y)
{
if ((x >= 0) && (x < WORLD_X) &&
}
+void
MakeExplosionAt(int x, int y)
{
MakeNewSprite(EXP, x - 40, y - 16);