diff --git a/defs.h b/defs.h index 0adb1d1..4512ba0 100644 --- a/defs.h +++ b/defs.h @@ -339,7 +339,7 @@ #define S_SLOPE 2 // Sprite types -#define MAXPTYPES 140 +#define MAXPTYPES 144 #define P_PLAYER 0 #define P_RAT 1 #define P_CHEESE 2 @@ -485,6 +485,10 @@ #define P_WAND 137 #define P_WHISTLE 138 #define P_CANDLE 139 +#define P_PIZZA 140 +#define P_SUNDAE 141 +#define P_CANDY 142 +#define P_CHOCOLATE 143 #define FLY_FLYTIME 150 diff --git a/rc.c b/rc.c index df70b21..0c54696 100644 --- a/rc.c +++ b/rc.c @@ -101,6 +101,10 @@ int fruittypes[] = { P_ICECREAM, P_CHIPS, P_BURGER, + P_PIZZA, + P_SUNDAE, + P_CANDY, + P_CHOCOLATE, -1 }; @@ -121,6 +125,7 @@ int poweruptypes[] = { -1 }; +int fruittime = -1; int curfruittype = 0; int curpoweruptype = 0; @@ -1023,6 +1028,16 @@ void tick(void) { } } + /* 3 seconds after fruit creation */ + if (fruittime != -1) { + if (gtime >= fruittime + 3) { + fruittime = -1; + // reset fruit counter + curfruittype = 0; + } + } + + /* 5 seconds after level completion */ if (levelcomplete == LV_FINAL) { @@ -1126,6 +1141,8 @@ void nextlevel(void) { } watertime = -1; + fruittime = -1; + // do the moving to next level transition (ie. scroll the screen) drawlevel(); @@ -5997,8 +6014,6 @@ void dogravity(sprite_t *s) { if (!s->jumptimer) { s->jumpdir = 0; } -//oooooooooo - if (s->falling && s->iced) { // when an iced monster hits the ground, it smashes @@ -6149,9 +6164,6 @@ void dogravity(sprite_t *s) { s->slamming = 0; - /* reset fruit type counter */ - curfruittype = 0; - // if we have a mace, add an explosion and play a thump sound if (s->powerup == PW_MACE) { // play sound @@ -6216,6 +6228,8 @@ void dogravity(sprite_t *s) { if (fruittypes[curfruittype] == -1) { curfruittype = 0; } + // fruit time + if (fruittime == -1) fruittime = gtime; } if ((s->powerup == PW_MACE) && (s2->id == P_SNAIL)) { @@ -6360,6 +6374,7 @@ void dogravity(sprite_t *s) { if (fruittypes[++curfruittype] == -1) { curfruittype = 0; } + if (fruittime == -1) fruittime = gtime; } if (s2->id == P_SNAIL) { // turn into a slug so that it really dies diff --git a/shared.c b/shared.c index 8d00a7c..2326f12 100644 --- a/shared.c +++ b/shared.c @@ -1350,6 +1350,18 @@ int loadimagesets(void) { loadspriteimage(P_SPEED,F_WALK1, "sprites/speed.png"); imageset[P_SPEED].numimages = 1; + loadspriteimage(P_PIZZA,F_WALK1, "sprites/pizza.png"); + imageset[P_PIZZA].numimages = 1; + + loadspriteimage(P_SUNDAE,F_WALK1, "sprites/sundae.png"); + imageset[P_SUNDAE].numimages = 1; + + loadspriteimage(P_CANDY,F_WALK1, "sprites/candy.png"); + imageset[P_CANDY].numimages = 1; + + loadspriteimage(P_CHOCOLATE,F_WALK1, "sprites/chocolate.png"); + imageset[P_CHOCOLATE].numimages = 1; + // don't load image for P_RANDOM imageset[P_RANDOM].numimages = 0; @@ -2337,6 +2349,10 @@ int isfruit(int id) { case P_ICECREAM: case P_CHIPS: case P_BURGER: + case P_PIZZA: + case P_SUNDAE: + case P_CANDY: + case P_CHOCOLATE: case P_DIAMOND: return FT_FRUIT; @@ -2893,20 +2909,32 @@ int getpoints(int id) { int points; switch (id) { case P_CHEESE: - points = 1000; + points = 500; break; case P_ICECREAM: - points = 1500; + points = 1000; break; case P_CHIPS: - points = 2000; + points = 1500; break; case P_BURGER: + points = 2000; + break; + case P_PIZZA: points = 2500; break; - case P_DIAMOND: + case P_SUNDAE: points = 3000; break; + case P_CANDY: + points = 3500; + break; + case P_CHOCOLATE: + points = 4000; + break; + case P_DIAMOND: + points = 2500; + break; case P_FLOWERYELLOW: points = 5; break; @@ -3194,6 +3222,10 @@ void setfruitinfo(void) { setinfo(P_CHIPS, "Chips", "", "chips.png"); setinfo(P_BURGER, "Burger", "", "burger.png"); setinfo(P_DIAMOND, "Diamond", "", "diamond.png"); + setinfo(P_PIZZA, "Pizza", "", "pizza.png"); + setinfo(P_SUNDAE, "Sundae", "", "sundae.png"); + setinfo(P_CANDY, "Candy", "", "candy.png"); + setinfo(P_CHOCOLATE, "Chocolate", "", "chocolate.png"); setinfo(P_FLOWERYELLOW, "Sunflower", "", "flower-yellow.png"); setinfo(P_FLOWERRED, "Tulip", "", "flower-red.png"); setinfo(P_FLOWERPURPLE, "Orchid", "", "flower-purple.png"); diff --git a/website/info.html b/website/info.html index 6eb320c..aceaf99 100644 --- a/website/info.html +++ b/website/info.html @@ -22,17 +22,21 @@

Power-Ups

- - - - - - - - - - - + + + + + + + + + + + + + + +
Fruits

Cheese
Worth 1000 points.
Ice Cream
Worth 1500 points.

Chips
Worth 2000 points.
Burger
Worth 2500 points.

Yellow Flower
Worth 5 points.
Red Flower
Worth 10 points.

Purple Flower
Worth 30 points.
Red Gem
Worth 75 points.

Yellow Gem
Worth 50 points.
Purple Gem
Worth 100 points.

Diamond
Worth 3000 points.

Cheese
Worth 500 points.
Ice Cream
Worth 1000 points.

Chips
Worth 1500 points.
Burger
Worth 2000 points.

Sunflower
Worth 5 points.
Tulip
Worth 10 points.

Orchid
Worth 30 points.
Ruby
Worth 75 points.

Topaz
Worth 50 points.
Amethyst
Worth 100 points.

Diamond
Worth 2500 points.
Pizza
Worth 2500 points.

Sundae
Worth 3000 points.
Candy
Worth 3500 points.

Chocolate
Worth 4000 points.  
Permenant Powerups

Speed Up
Makes you walk faster.
More Nets
Increases the number of monsters you can catch simultaneously.