- Mostly finished King Ant

- Added objects for king ant:
	- ant eggs
	- big armour

- Updated level screenshots
This commit is contained in:
Rob Pearce 2009-03-05 20:59:20 +00:00
parent 405732f5ea
commit 258a16186a
24 changed files with 163 additions and 13 deletions

88
data/levels/level614.dat Normal file
View File

@ -0,0 +1,88 @@
bgfile snow2.png
bg 0
hurryup 30
help
endhelp
monsters
0 14 18
134 25 18
23 25 13
7 19 5
18 2 3
18 35 7
18 4 27
18 33 23
6 31 10
133 35 25
133 5 22
16 11 19
16 10 19
16 9 19
16 28 19
16 29 19
16 30 19
15 32 11
15 31 11
15 8 11
15 7 11
15 6 11
6 7 10
17 35 27
17 4 27
17 4 7
17 35 7
endmonsters
exitdir 1
33,87,87,87,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,87,87,87,32,
33,87,87,87,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,87,87,87,33,
33,32,87,87,87,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,87,87,87,32,33,
33,33,87,87,87,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,87,87,87,33,33,
33,33,32,87,87,87,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,87,87,87,32,33,33,
33,33,33,87,87,87,33,33,33,33,33,33,33,33,33,33,33,33,87,87,87,87,33,33,33,33,33,33,33,33,33,33,33,33,87,87,87,33,33,33,
33,33,33,32,87,87,87,33,33,33,33,33,33,33,33,33,33,33,87,87,87,87,33,33,33,33,33,33,33,33,33,33,33,87,87,87,32,33,33,33,
33,33,33,33,87,87,87,33,33,33,33,33,33,33,33,33,33,33,87,87,87,87,33,33,33,33,33,33,33,33,33,33,33,87,87,87,33,33,33,33,
33,33,33,33,32,87,87,87,87,33,33,33,33,33,33,33,33,33,87,87,87,87,33,33,33,33,33,33,33,33,33,87,87,87,87,32,33,33,33,33,
33,33,33,33,33,87,87,87,87,87,33,33,33,33,33,33,33,33,87,87,87,87,33,33,33,33,33,33,33,33,87,87,87,87,87,33,33,33,33,33,
33,33,33,33,33,32,87,87,87,87,87,87,33,33,33,33,33,33,87,87,87,87,33,33,33,33,33,33,87,87,87,87,87,87,32,33,33,33,33,33,
33,33,33,33,33,33,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,33,33,33,33,33,33,
33,33,33,33,33,33,32,32,32,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,32,32,32,33,33,33,33,33,33,
33,33,33,33,33,33,33,33,33,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,33,33,33,33,33,33,33,33,33,
33,33,33,33,33,33,33,33,33,87,32,33,32,32,32,32,32,32,87,87,87,87,32,32,32,32,32,32,33,32,87,33,33,33,33,33,33,33,33,33,
33,33,33,33,33,33,33,33,33,87,87,33,33,33,33,33,33,33,87,87,87,87,33,33,33,33,33,33,33,87,87,33,33,33,33,33,33,33,33,33,
33,33,33,33,33,33,33,33,33,87,87,33,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,33,87,87,33,33,33,33,33,33,33,33,33,
33,33,33,33,33,33,33,33,33,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,33,33,33,33,33,33,33,
33,33,33,33,33,33,33,33,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,33,33,33,33,33,33,33,
33,33,33,33,33,33,87,87,87,87,87,87,32,32,32,32,32,32,87,87,87,87,32,32,32,32,32,32,87,87,87,87,87,87,33,33,33,33,33,33,
33,33,33,33,33,87,87,87,87,32,32,32,33,33,33,33,33,33,87,87,87,87,33,33,33,33,33,33,32,32,32,87,87,87,87,33,33,33,33,33,
33,33,33,33,33,87,87,87,87,33,33,33,33,33,33,33,33,33,87,87,87,87,33,33,33,33,33,33,33,33,33,87,87,87,87,33,33,33,33,33,
33,33,33,33,87,87,87,32,32,33,33,33,33,33,33,33,33,33,87,87,87,87,33,33,33,33,33,33,33,33,33,32,32,87,87,87,33,33,33,33,
33,33,33,33,87,87,87,33,33,33,33,33,33,33,33,33,33,33,87,87,87,87,33,33,33,33,33,33,33,33,33,33,33,87,87,87,33,33,33,33,
33,33,33,87,87,87,32,33,33,33,33,33,33,33,33,33,33,33,87,87,87,87,33,33,33,33,33,33,33,33,33,33,33,32,87,87,87,33,33,33,
33,33,33,87,87,87,33,33,33,33,33,33,33,33,33,33,33,33,87,87,87,87,33,33,33,33,33,33,33,33,33,33,33,33,87,87,87,33,33,33,
33,33,87,87,87,32,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,32,87,87,87,33,33,
33,33,87,87,87,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,87,87,87,33,33,
33,87,87,87,32,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,32,87,87,87,33,
33,87,87,87,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,87,87,87,33,
layer2
35,2,86
8,8,86
29,10,86
17,11,95,layer3
22,11,95,layer3
17,12,95,layer3
22,12,95,layer3
17,13,95,layer3
22,13,95,layer3
17,16,95,layer3
22,16,95,layer3
17,17,95,layer3
22,17,95,layer3
17,18,95,layer3
22,18,95,layer3
6,19,86
7,19,86
36,24,86
18,25,11
19,25,11
20,25,11
21,25,11

View File

@ -76,6 +76,7 @@
615,level615.dat,Raaa! 615,level615.dat,Raaa!
618,level618.dat,Secret Exit 618,level618.dat,Secret Exit
619,level619.dat,Slow and steady... 619,level619.dat,Slow and steady...
614,level614.dat,...marks the spot
620,level620.dat,King Ant 620,level620.dat,King Ant
109,level109.dat,THE END SO FAR 109,level109.dat,THE END SO FAR
99,level99.dat,TEST LEVEL 99,level99.dat,TEST LEVEL

BIN
data/sprites/bighelmet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
data/sprites/egg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

10
defs.h
View File

@ -27,8 +27,8 @@
#define MAXREGROW 200 #define MAXREGROW 200
// time a tile takes to regrow // time a tile takes to regrow
#define REGROWTIMER_SHORT 200 #define REGROWTIMER_SHORT 350
#define REGROWTIMER_LONG 400 #define REGROWTIMER_LONG 500
#define MAXCREDITS 5 #define MAXCREDITS 5
@ -278,7 +278,7 @@
// king ant // king ant
#define KA_WALKTIME 400 #define KA_WALKTIME 400
#define KA_SHOOTTIME 100 #define KA_SHOOTTIME 50
// king ant stats // king ant stats
#define KAS_WALK1 0 #define KAS_WALK1 0
#define KAS_JUMP1 1 #define KAS_JUMP1 1
@ -443,7 +443,7 @@
#define S_SLOPE 2 #define S_SLOPE 2
// Sprite types // Sprite types
#define MAXPTYPES 166 #define MAXPTYPES 168
#define P_PLAYER 0 #define P_PLAYER 0
#define P_RAT 1 #define P_RAT 1
#define P_CHEESE 2 #define P_CHEESE 2
@ -615,6 +615,8 @@
#define P_KINGANT 163 #define P_KINGANT 163
#define P_FLAME 164 // like mace smash but harmless #define P_FLAME 164 // like mace smash but harmless
#define P_BIGFIREBALL 165 #define P_BIGFIREBALL 165
#define P_EGG 166
#define P_BIGHELMET 167
#define FLY_FLYTIME 150 #define FLY_FLYTIME 150

61
rc.c
View File

@ -1840,6 +1840,9 @@ void die(sprite_t *s) {
case P_KINGFLY: case P_KINGFLY:
addsprite(P_SUPERUMBRELLA, (640/2), 0, "bigumbrella"); addsprite(P_SUPERUMBRELLA, (640/2), 0, "bigumbrella");
break; break;
case P_KINGANT:
addsprite(P_BIGHELMET, (640/2), 0, "bighelmet");
break;
} }
} else if ((s->id == P_SNAIL) && (s->lives > 0)) { // snails can't die but turn into slugs instead } else if ((s->id == P_SNAIL) && (s->lives > 0)) { // snails can't die but turn into slugs instead
sprite_t *newsp; sprite_t *newsp;
@ -2362,6 +2365,9 @@ void checkcollide(sprite_t *s) {
fruitamt = 1; fruitamt = 1;
break; break;
} }
// override for ant egg..
if (s2->id == P_EGG) fruitamt = 5;
s->timer1 += fruitamt; s->timer1 += fruitamt;
// huw much fruit is needed to grow? // huw much fruit is needed to grow?
if (s->id == P_ANT3) { if (s->id == P_ANT3) {
@ -2885,6 +2891,7 @@ int movesprite(sprite_t *s) {
case P_KINGRAT: case P_KINGRAT:
case P_KINGSNAIL: case P_KINGSNAIL:
case P_KINGFLY: case P_KINGFLY:
case P_KINGANT:
boss = newsp; boss = newsp;
} }
@ -4516,8 +4523,9 @@ printf("setting target to y = %d\n",ss->timer2);
if (s->timer1 == KAS_WALK1) { if (s->timer1 == KAS_WALK1) {
// shoot an ant out // shoot an ant out
if (countmonsters(-1) < 6) { // max 5 ants + king ant if (countmonsters(-1) < 7) { // max 6 ants + king ant
sprite_t *newsp; sprite_t *newsp;
puffin(-1, s->x, s->y - (s->img->h/2), "nothing", 0);
newsp = addsprite(P_ANT1, s->x, s->y-(s->img->h/2),"babant"); newsp = addsprite(P_ANT1, s->x, s->y-(s->img->h/2),"babant");
// make it shoot upwards // make it shoot upwards
newsp->jumping = 1; newsp->jumping = 1;
@ -4527,7 +4535,17 @@ printf("setting target to y = %d\n",ss->timer2);
else newsp->dir = -1; else newsp->dir = -1;
playfx(FX_WHOOSH); playfx(FX_WHOOSH);
} else { } else {
// TODO enough monsters, shoot food instead // enough monsters, shoot food instead
sprite_t *newsp;
puffin(-1, s->x, s->y - (s->img->h/2), "nothing", 0);
newsp = addsprite(P_EGG, s->x, s->y-(s->img->h/2),"antegg");
// make it shoot upwards
newsp->jumping = 1;
newsp->jumpspeed = (rand() % 7) + 7; // 7 - 13
newsp->jumpdir = (((double)(rand() % 110) - 50) / 10); // -5 to 5
if (rand() % 2) newsp->dir = 1;
else newsp->dir = -1;
playfx(FX_WHOOSH);
} }
} }
@ -7674,11 +7692,7 @@ void dogravity(sprite_t *s) {
} else { // not jumping } else { // not jumping
int ontheground; int ontheground;
if ((s->id == P_BIGSPEED) && (s->y < 480/2)) { if ((isfruit(s->id) == FT_SUPER) && (s->y < 480/2)) {
ontheground = B_FALSE;
} else if ((s->id == P_BIGSCUBA) && (s->y < 480/2)) {
ontheground = B_FALSE;
} else if ((s->id == P_SUPERUMBRELLA) && (s->y < 480/2)) {
ontheground = B_FALSE; ontheground = B_FALSE;
} else { } else {
ontheground = isonground(s); ontheground = isonground(s);
@ -8442,6 +8456,39 @@ int dofruiteffect(sprite_t *pp, sprite_t *s) {
} }
} }
return B_TRUE; return B_TRUE;
} else if (s->id == P_BIGHELMET) {
// both players
playfx(FX_POWERUP);
if (player) {
player->permarmour = B_TRUE;
player->armour = B_TRUE;
if ((player->lives > 0) && !player->dead) {
int xx,yy;
addoutlinetext(player->x,player->y - player->img->h/2, TEXTSIZE_LIFE, "SUPER ARMOUR!", &cyan,&black,POINTSDELAY, TT_NORM);
for (xx = player->x - TILEW; xx <= player->x + TILEW; xx += TILEW) {
for (yy = player->y - TILEW*2; yy <= player->y; yy += TILEH) {
puffin(-1, xx, yy, "nothing", 0);
}
}
}
player->id = P_ARMOUR; // change how the player looks
}
if (player2) {
player2->permarmour = B_TRUE;
player2->armour = B_TRUE;
if ((player2->lives > 0) && !player2->dead) {
int xx,yy;
addoutlinetext(player2->x,player2->y - player2->img->h/2, TEXTSIZE_LIFE, "SUPER ARMOUR!", &cyan,&black,POINTSDELAY, TT_NORM);
// add puffs
for (xx = player2->x - TILEW; xx <= player2->x + TILEW; xx += TILEW) {
for (yy = player2->y - TILEW*2; yy <= player2->y; yy += TILEH) {
puffin(-1, xx, yy, "nothing", 0);
}
}
}
player2->id = P_ARMOUR; // change how the player looks
}
return B_TRUE;
} else if (s->id == P_NUMNETS) { } else if (s->id == P_NUMNETS) {
playfx(FX_POWERUP); playfx(FX_POWERUP);
if (pp->netmax < 4) { if (pp->netmax < 4) {

View File

@ -1714,6 +1714,9 @@ int loadimagesets(void) {
loadspriteimage(P_UMBRELLA,F_WALK1, "sprites/umbrella.png"); loadspriteimage(P_UMBRELLA,F_WALK1, "sprites/umbrella.png");
imageset[P_UMBRELLA].numimages = 1; imageset[P_UMBRELLA].numimages = 1;
loadspriteimage(P_EGG,F_WALK1, "sprites/egg.png");
imageset[P_EGG].numimages = 1;
loadspriteimage(P_BIGUMBRELLA,F_WALK1, "sprites/bigumbrella.png"); loadspriteimage(P_BIGUMBRELLA,F_WALK1, "sprites/bigumbrella.png");
imageset[P_BIGUMBRELLA].numimages = 1; imageset[P_BIGUMBRELLA].numimages = 1;
@ -1767,6 +1770,9 @@ int loadimagesets(void) {
loadspriteimage(P_BIGSCUBA,F_WALK1, "sprites/bigscuba.png"); loadspriteimage(P_BIGSCUBA,F_WALK1, "sprites/bigscuba.png");
imageset[P_BIGSCUBA].numimages = 1; imageset[P_BIGSCUBA].numimages = 1;
loadspriteimage(P_BIGHELMET,F_WALK1, "sprites/bighelmet.png");
imageset[P_BIGHELMET].numimages = 1;
// puffs and mace smashes // puffs and mace smashes
for (i = 0; i < PUFFFRAMES; i++) { for (i = 0; i < PUFFFRAMES; i++) {
char name[SMALLBUFLEN]; char name[SMALLBUFLEN];
@ -1857,6 +1863,7 @@ int loadimagesets(void) {
loadspriteimage(P_BUBBLE,F_WALK1, "sprites/bubble.png"); loadspriteimage(P_BUBBLE,F_WALK1, "sprites/bubble.png");
imageset[P_BUBBLE].numimages = 1; imageset[P_BUBBLE].numimages = 1;
/* ray gun bullet */ /* ray gun bullet */
loadspriteimage(P_RAYGUNBULLET,F_WALK1, "sprites/raygunbullet.png"); loadspriteimage(P_RAYGUNBULLET,F_WALK1, "sprites/raygunbullet.png");
imageset[P_RAYGUNBULLET].numimages = 1; imageset[P_RAYGUNBULLET].numimages = 1;
@ -2674,6 +2681,7 @@ int isfruit(int id) {
case P_BIGSPEED: case P_BIGSPEED:
case P_BIGSCUBA: case P_BIGSCUBA:
case P_SUPERUMBRELLA: case P_SUPERUMBRELLA:
case P_BIGHELMET:
return FT_SUPER; return FT_SUPER;
/* permenant powerups */ /* permenant powerups */
case P_SPEED: case P_SPEED:
@ -2737,6 +2745,7 @@ int isfruit(int id) {
return FT_GEM; return FT_GEM;
/* misc */ /* misc */
case P_POWERUPPOS: case P_POWERUPPOS:
case P_EGG:
return FT_OTHER; return FT_OTHER;
} }
@ -3334,6 +3343,7 @@ int getpoints(int id) {
case P_GEMPURPLE: case P_GEMPURPLE:
points = 100; points = 100;
break; break;
case P_EGG:
default: default:
points = 0; points = 0;
break; break;
@ -3658,6 +3668,7 @@ void setfruitinfo(void) {
setinfo(P_BIGSPEED, "Big Speed Up", "Makes you walk faster, permenantly!", "bigspeed.png"); setinfo(P_BIGSPEED, "Big Speed Up", "Makes you walk faster, permenantly!", "bigspeed.png");
setinfo(P_BIGSCUBA, "Big Scuba Mask", "Permenantly gives you fast underwater movement.", "bigscuba.png"); setinfo(P_BIGSCUBA, "Big Scuba Mask", "Permenantly gives you fast underwater movement.", "bigscuba.png");
setinfo(P_SUPERUMBRELLA, "Big Umbrella", "Bestows you with an umbrella which can survive death!", "superumbrella.png"); setinfo(P_SUPERUMBRELLA, "Big Umbrella", "Bestows you with an umbrella which can survive death!", "superumbrella.png");
setinfo(P_BIGSPEED, "Big Helmet", "Endows you with a permenant suit of armour!", "bighelmet.png");
setinfo(P_MASKPOWERUP, "Scuba Mask", "Allows you to move fast underwater.", "maskpowerup.png"); setinfo(P_MASKPOWERUP, "Scuba Mask", "Allows you to move fast underwater.", "maskpowerup.png");
setinfo(P_WINGBOOTS, "Winged Boots", "These magical boots cause you to grow wings, allowing to you jump again while in mid-air!", "wingboots.png"); setinfo(P_WINGBOOTS, "Winged Boots", "These magical boots cause you to grow wings, allowing to you jump again while in mid-air!", "wingboots.png");

BIN
website/img/bighelmet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -108,8 +108,9 @@
<td align=center><img src="img/tophat.png"><br>Top Hat</td><td>Players wearing the top hat will find that every item which appears will now be a power-up!</td> <td align=center><img src="img/tophat.png"><br>Top Hat</td><td>Players wearing the top hat will find that every item which appears will now be a power-up!</td>
</tr><tr><td align=center><font color="ff00ff"><b><big>?</big></b></font><br>Random</td><td>Gives you a random effect...</td> </tr><tr><td align=center><font color="ff00ff"><b><big>?</big></b></font><br>Random</td><td>Gives you a random effect...</td>
<td colspan=2>&nbsp;</td></tr><tr bgcolor="#ffff00"><th colspan=4>Super Powerups</th></tr> <td colspan=2>&nbsp;</td></tr><tr bgcolor="#ffff00"><th colspan=4>Super Powerups</th></tr>
<tr><td align=center><img src="img/bigspeed.png"><br>Big Speed Up</td><td>Makes you walk faster, permenantly!</td> <tr><td align=center><img src="img/bighelmet.png"><br>Big Helmet</td><td>Endows you with a permenant suit of armour!</td>
<td align=center><img src="img/bigscuba.png"><br>Big Scuba Mask</td><td>Permenantly gives you fast underwater movement.</td> <td align=center><img src="img/bigscuba.png"><br>Big Scuba Mask</td><td>Permenantly gives you fast underwater movement.</td>
</tr><tr><td align=center><img src="img/superumbrella.png"><br>Big Umbrella</td><td>Bestows you with an umbrella which can survive death!</td> </tr><tr><td align=center><img src="img/superumbrella.png"><br>Big Umbrella</td><td>Bestows you with an umbrella which can survive death!</td>
<td colspan=2>&nbsp;</td></tr></table> <td align=center><img src="img/(null)"><br>(null)</td><td>(null)</td>
</tr></table>
</center> </center>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB