diff --git a/data/levels/level99.dat b/data/levels/level99.dat
index 08d404c..166eb69 100644
--- a/data/levels/level99.dat
+++ b/data/levels/level99.dat
@@ -1,31 +1,12 @@
bgfile kitchen2.png
bg 0
-hurryup 30
+hurryup 10
help
endhelp
monsters
-0 29 13
-134 33 13
-23 36 13
-6 20 10
-158 2 27
-16 15 27
-16 19 24
-16 22 21
-16 5 21
-158 3 18
-16 5 18
-16 6 18
-16 7 18
-16 9 18
-16 11 18
-15 15 18
-17 2 18
-17 1 18
-17 17 18
-17 19 18
-17 21 18
-17 23 18
+134 18 15
+171 3 25
+0 38 28
endmonsters
exitdir 1
4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
@@ -33,40 +14,35 @@ exitdir 1
4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
-4,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
-4,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,7,0,0,4,
+4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,1,0,0,0,0,7,0,0,4,
+4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,1,0,0,0,0,7,0,0,4,
+4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,1,0,0,0,0,7,0,0,4,
+4,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0,0,0,0,7,0,0,4,
+4,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,4,
+4,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,4,
4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,
layer2
-28,13,94,layer3
-29,13,94,layer3
-30,13,94,layer3
-31,13,94,layer3
-32,13,94,layer3
-33,13,94,layer3
-34,13,94,layer3
-35,13,94,layer3
-36,13,94,layer3
-37,13,94,layer3
-38,13,94,layer3
+8,8,8
+36,13,8
+20,16,8
+26,21,8
+6,26,8
+16,26,8
diff --git a/data/sprites/whitespider.png b/data/sprites/whitespider.png
new file mode 100644
index 0000000..522e3d8
Binary files /dev/null and b/data/sprites/whitespider.png differ
diff --git a/data/sprites/whitespider1.png b/data/sprites/whitespider1.png
new file mode 100644
index 0000000..8615a5d
Binary files /dev/null and b/data/sprites/whitespider1.png differ
diff --git a/data/sprites/whitespidercaught.png b/data/sprites/whitespidercaught.png
new file mode 100644
index 0000000..5b59e93
Binary files /dev/null and b/data/sprites/whitespidercaught.png differ
diff --git a/data/sprites/whitespiderclimb.png b/data/sprites/whitespiderclimb.png
new file mode 100644
index 0000000..026708b
Binary files /dev/null and b/data/sprites/whitespiderclimb.png differ
diff --git a/data/sprites/whitespiderclimb1.png b/data/sprites/whitespiderclimb1.png
new file mode 100644
index 0000000..858b86f
Binary files /dev/null and b/data/sprites/whitespiderclimb1.png differ
diff --git a/data/sprites/whitespiderdead.png b/data/sprites/whitespiderdead.png
new file mode 100644
index 0000000..a821d81
Binary files /dev/null and b/data/sprites/whitespiderdead.png differ
diff --git a/defs.h b/defs.h
index 04f24fd..749ae87 100644
--- a/defs.h
+++ b/defs.h
@@ -444,7 +444,7 @@
#define S_SLOPE 2
// Sprite types
-#define MAXPTYPES 171
+#define MAXPTYPES 172
#define P_PLAYER 0
#define P_RAT 1
#define P_CHEESE 2
@@ -621,6 +621,7 @@
#define P_GOLDCOIN 168
#define P_LAMP 169
#define P_GOLDBAR 170
+#define P_WSPIDER 171
#define FLY_FLYTIME 150
diff --git a/rc.c b/rc.c
index d47e3f4..d328f4c 100644
--- a/rc.c
+++ b/rc.c
@@ -1349,6 +1349,9 @@ void nextlevel(void) {
player2->oncloud = B_FALSE;
}
+ // clear regrowth
+ numregrow = 0;
+
// load next level data
if (haspowerupany(PW_PHONE) && !isbosslevel(curlevelnum)) {
// don't add monsters
@@ -2322,12 +2325,14 @@ void checkcollide(sprite_t *s) {
die(s);
}
} else {
+ printf("DB: player killed by %s\n",s2->name); fflush(stdout);
die(s);
}
} else {
// initial flashing black cloud doesn't kill player;
if ((s2->id == P_BLACKCLOUD) && (!s2->invuln)) {
die(s);
+ printf("DB: player killed by blackclodu\n"); fflush(stdout);
// play sound
playfx(FX_EVILLAUGH);
}
@@ -4793,6 +4798,143 @@ printf("setting target to y = %d\n",ss->timer2);
+ /* moves like an angry rat all the time */
+ if (globpowerup != PW_CAMERA) {
+ if ((playersalive()) && (!s->jumping) && (!s->jumptimer)) {
+ sprite_t *abovep;
+ /* if player is above us...*/
+ abovep = isplayerabove(s);
+ if (abovep) {
+ if ((xdiff >= (TILEW*2)) && (xdiff <= (TILEW*3))) { // if 2-3 tiles right
+ /* jump right */
+ jump(s, D_RIGHT);
+ } else if ((xdiff <= -(TILEW*2)) && (xdiff >= -(TILEW*3))) { // if 2-3 tiles left
+ /* jump left */
+ jump(s, D_LEFT);
+ } else if (s->y - abovep->y <= (TILEH*6)) { // player less than 6 tiles above
+ if ((xdiff >= 0) && (xdiff < (TILEW*4))) { // ... and within 4 tiles
+ /* jump up */
+ jump(s, 0);
+ } else if ((xdiff <= 0) && (xdiff > -(TILEW*4))) { // ... and within 4 tiles
+ /* jump up */
+ jump(s, 0);
+ }
+ }
+ }
+ }
+ }
+ } else { // falling
+ movex(s, s->jumpdir*getspeed(s), B_TRUE);
+ }
+ } else if (s->id == P_WSPIDER) { // white spider - very intelligent!
+ // timer3 is climb direction
+ if (!s->falling) {
+ int move = B_FALSE;
+ int xdiff, absxdiff;
+ int ladderx = isladderabove(s);
+
+
+ /* distance to closest player */
+ xdiff = getxdisttoplayer(s, NULL);
+ absxdiff = abs(xdiff);
+
+
+ /* already climbing */
+ if (s->climbing) {
+ // TODO: replace with just climbing the current dir
+ if (s->timer3 == D_UP) {
+ // climb up
+ int ladderx = isladderabove(s);
+ // if tile above is non-solid, or a ladder
+ if (ladderx || !isroofabove(s)) {
+ /*
+ // lock to ladder
+ if (ladderx) {
+ s->x = ladderx; // lock to ladder
+ }
+ */
+ // continue climbing
+ s->y -= getspeed(s);
+ s->jumping = 0;
+ s->falling = 0;
+ s->climbing = B_TRUE;
+ s->moved = MV_WALK;
+ }
+ } else { // down
+ if (isonladder(s)) {
+ // climb down
+ s->y += getspeed(s);
+ s->jumping = 0;
+ s->falling = 0;
+ s->climbing = B_TRUE;
+ s->moved = MV_WALK;
+ }
+ }
+ } else if (ladderx && isplayerabove(s)) { // if we are at the bottom of a ladder
+ // start climbing
+ s->x = ladderx; // lock to ladder
+ s->y -= getspeed(s);
+ s->jumping = 0;
+ s->falling = 0;
+ s->climbing = B_TRUE;
+ s->moved = MV_WALK;
+ s->timer3 = D_UP;
+ } else if (isonladder(s) && isplayerbelow(s)) { // is we are at top of ladder
+ int ladderx = isonladder(s);
+ s->y += getspeed(s);
+ s->jumping = 0;
+ s->falling = 0;
+ s->climbing = B_TRUE;
+ s->moved = MV_WALK;
+ // lock to centre of ladder
+ s->x = ladderx;
+ s->timer3 = D_DOWN;
+ } else {
+ // walk
+ tt = gettileat(s->x + s->dir+getspeed(s),s->y,NULL,NULL);
+ /* if there's a hole in front of us */
+ if (tt->solid == S_NOTSOLID) {
+ double ycutoff = s->y + (TILEH/2);
+ if ((player && (player->y >= ycutoff)) || (player2 && (player2->y >= ycutoff ))) {
+ /* if player is below and nearby, fall off */
+ if (xdiff <= (TILEW*16)) {
+ move = B_TRUE;
+ }
+ } else if ((player && (player->y == s->y)) || (player2 && (player2->y == s->y ))) {
+ if (globpowerup != PW_CAMERA) {
+ /* if player is at same level and close, jump */
+ if ((s->dir == D_RIGHT) && (xdiff > 0) && (xdiff <= (TILEW*7))) {
+ jump(s,D_RIGHT);
+ } else if ((s->dir == D_LEFT) && (xdiff < 0) && (xdiff >= -(TILEW*7))) {
+ jump(s,D_LEFT);
+ }
+ }
+ } else if (level->bottomopen && (s->y >= (480 - 100)) && isplayerabove(s)) {
+ // if near bottom of the screen and can fall through...
+ move = B_TRUE;
+ }
+ } else {
+ move = B_TRUE;
+ }
+
+ if (globpowerup == PW_CAMERA) {
+ move = B_TRUE;
+ }
+
+ /* either move or turn around */
+ if (move) {
+ rv = movex(s, s->dir*getspeed(s), B_TRUE);
+ if (rv) {
+ /* if we couldn't move (hit a wall), turn */
+ s->dir = -s->dir;
+ }
+ } else {
+ s->dir = -s->dir;
+ }
+
+ }
+
+
/* moves like an angry rat all the time */
if (globpowerup != PW_CAMERA) {
if ((playersalive()) && (!s->jumping) && (!s->jumptimer)) {
@@ -5855,6 +5997,7 @@ void dotileeffects(sprite_t *s) {
if (!s->invuln) {
if ((s->id != P_BLACKCLOUD) && (s->id != P_KINGSNAIL)) {
die(s);
+ printf("DB: killed by spikes\n"); fflush(stdout);
}
}
}
@@ -6525,6 +6668,9 @@ double getspeed(sprite_t *s ) {
} else if (id == P_RAT) {
if (s->angry) speed = 1.5;
else speed = 1;
+ } else if (id == P_WSPIDER) {
+ if (s->angry) speed = 1.5;
+ else speed = 1;
} else if (id == P_ANT1) {
if (s->angry) speed = 1.5;
else speed = 1;
@@ -12075,6 +12221,8 @@ void startgame(void) {
fpsticks = 0;
fpsstart = 0;
+ numregrow = 0;
+
// init player variables - if player
// hasn't been allocated yet then this will
// be done so in loadlevel(), and the below
diff --git a/shared.c b/shared.c
index 6564207..862470c 100644
--- a/shared.c
+++ b/shared.c
@@ -1404,6 +1404,18 @@ int loadimagesets(void) {
/* next 3 are auto generated */
imageset[P_ANT3].numimages = 8;
+ loadspriteimage(P_WSPIDER,F_WALK1, "sprites/whitespider.png");
+ loadspriteimage(P_WSPIDER,F_JUMP, "sprites/whitespider1.png");
+ loadspriteimage(P_WSPIDER,F_FALL, "sprites/whitespider1.png");
+ loadspriteimage(P_WSPIDER,F_CAUGHT, "sprites/whitespidercaught.png");
+ loadspriteimage(P_WSPIDER,F_DEAD, "sprites/whitespiderdead.png");
+ /* next 3 are auto generated */
+ loadspriteimage(P_WSPIDER,F_CLIMB1, "sprites/whitespiderclimb.png");
+ loadspriteimage(P_WSPIDER,F_CLIMB2, "sprites/whitespiderclimb1.png");
+ loadspriteimage(P_WSPIDER,F_SHOOT, "sprites/whitespiderclimb1.png"); // TO WORK AROUND A BUG!!
+ imageset[P_WSPIDER].numimages = 11;
+
+
loadspriteimage(P_SPIDER,F_WALK1, "sprites/newspider.png");
loadspriteimage(P_SPIDER,F_JUMP, "sprites/newspiderjump.png");
loadspriteimage(P_SPIDER,F_FALL, "sprites/newspiderfall.png");
@@ -2009,10 +2021,8 @@ int loadimagesets(void) {
// free red image surface
SDL_FreeSurface(reds);
-
/* flipped angry image */
imageset[p].img[MAXFRAMES*3+i] = rotozoomSurfaceXY(imageset[p].img[MAXFRAMES*2+i], 0, -1,1,0);
-
SDL_SetColorKey(imageset[p].img[MAXFRAMES*3+i],SDL_RLEACCEL, 0);
}
}
@@ -2172,7 +2182,7 @@ void drawsprite(sprite_t *s) {
} else {
frame = F_SWIM2;
}
- } else if (s->netting) {
+ } else if (s->netting && isplayer(s)) {
frame = F_SHOOT;
} else if (s->iced) {
frame = F_WALK1;
@@ -3222,6 +3232,7 @@ int ismonster(int id) {
case P_BEE:
case P_FLY:
case P_SPIDER:
+ case P_WSPIDER:
case P_SNAKE:
case P_TICK:
case P_PLANT:
@@ -3746,6 +3757,7 @@ void setfruitinfo(void) {
setinfo(P_FISH, "Pirahna", "These fish at at home in the water and unhampered by slowness while swimming.", "fish.png");
setinfo(P_SPIDER, "Spider", "Spiders will lurk quietly on the ceiling, crawling back and forth. If they notice a player nearby however they will swiftly pounce down onto their prey!", "spider.png");
+ setinfo(P_WSPIDER, "White Spider", "White Spiders are more intelligent than other monsters - they are aware of nearby players and will use the landscape to track them down!", "whitespider.png");
setinfo(P_FROG, "Frog", "Green frogs will continually bounce around, making them more difficult to catch. They are also excellent swimmers.", "frog.png");
diff --git a/website/img/whitespider.png b/website/img/whitespider.png
new file mode 100644
index 0000000..393b914
Binary files /dev/null and b/website/img/whitespider.png differ
diff --git a/website/info.html b/website/info.html
index 985ccb2..1bc0fb5 100644
--- a/website/info.html
+++ b/website/info.html
@@ -32,7 +32,9 @@
Soldier Ant