diff --git a/data/green.tiles b/data/green.tiles index 93ee394..547ca2f 100644 --- a/data/green.tiles +++ b/data/green.tiles @@ -415,3 +415,21 @@ dir newtiles file waterright.png waterright2.png waterright3.png waterright4.png waterright5.png animspeed 5 end + +tile waterleft +id 23 +solid 0 +water 1 +dir newtiles +file waterleft.png waterleft2.png waterleft3.png waterleft4.png waterleft5.png +animspeed 5 +end + +tile waterdown +id 24 +solid 0 +water 1 +dir newtiles +file waterdown.png waterdown2.png waterdown3.png waterdown4.png waterdown5.png +animspeed 5 +end diff --git a/data/world1/level406.dat b/data/world1/level406.dat new file mode 100644 index 0000000..6a521c0 --- /dev/null +++ b/data/world1/level406.dat @@ -0,0 +1,47 @@ +bgfile kitchen3.png +bg 0 +hurryup 30 +help +endhelp +monsters +0 5 8 +23 18 9 +60 26 25 +60 16 27 +60 5 26 +133 30 4 +133 33 15 +18 25 16 +endmonsters +exitdir 1 +57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,0,0,0,0,0,0,57, +57,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,57, +57,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,57, +57,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,57, +57,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,57, +57,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,57, +57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,58,58,58,58,58,58,58,58,58,58,60,0,0,57, +57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,57,57,57,57,57,57,57,57,57,57,57,0,0,57, +57,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,57, +57,0,45,45,45,45,45,45,45,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,57, +57,0,0,0,0,33,0,0,0,0,0,0,0,59,58,58,58,58,58,58,58,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57, +57,0,0,0,56,56,56,0,0,0,0,0,0,57,57,57,57,57,57,57,57,57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57, +57,56,56,56,56,56,56,56,56,56,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,57, +57,56,0,0,0,0,56,56,56,56,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,57, +57,0,0,0,0,0,0,67,67,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,57, +57,0,0,0,0,0,0,67,67,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,57, +57,0,0,0,0,0,0,67,67,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,57, +57,56,56,15,15,15,15,15,15,15,15,15,15,15,56,56,56,56,56,56,56,56,56,56,58,58,58,58,58,58,58,58,58,58,58,58,58,58,58,57, +57,57,56,15,15,15,15,15,15,15,15,15,15,15,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57, +57,57,56,15,15,15,15,15,15,15,15,15,15,15,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57, +57,57,56,15,15,15,15,15,15,15,15,15,15,15,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57, +57,57,56,15,15,65,67,67,67,67,66,15,15,15,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57, +57,57,56,56,56,56,67,67,67,67,56,56,56,56,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57, +57,57,57,57,57,56,67,67,67,67,56,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57, +57,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,57, +57,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,57, +57,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,57, +57,65,65,65,65,65,65,65,65,65,65,65,65,65,15,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,57, +57,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,57, +57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,65,65,65,65,65,65,57, +layer2 diff --git a/defs.h b/defs.h index 612ceac..b81aa5c 100644 --- a/defs.h +++ b/defs.h @@ -601,6 +601,8 @@ #define T_ICETOP 20 // slippery #define T_ICE 21 // slippery #define T_WATERRIGHT 22 +#define T_WATERLEFT 23 +#define T_WATERDOWN 24 // death states #define D_INITIAL (1) // Need to trigger death sequence diff --git a/edit.c b/edit.c index 700e511..393c628 100644 --- a/edit.c +++ b/edit.c @@ -918,6 +918,7 @@ void drawpalette(void) { SDL_BlitSurface(bg->img[0], NULL, screen, &area); /* draw tile */ SDL_BlitSurface(tt->img[0], NULL, screen, &area); + drawtilehint(screen, tt, area.x, area.y); /* draw selector box */ if (seltile == tt) { drawbox16(screen,area.x,area.y,area.x+area.w-1,area.y+area.h-1,&red,NULL); @@ -1177,6 +1178,7 @@ void draweditortile(SDL_Surface *where, int x, int y) { SDL_BlitSurface(greyim, NULL, where, &area); } else { SDL_BlitSurface(tt->img[frame], NULL, where, &area); + drawtilehint(where, tt, area.x, area.y); } } @@ -1201,6 +1203,7 @@ void draweditortile(SDL_Surface *where, int x, int y) { SDL_BlitSurface(greyim, NULL, where, &area); } else { SDL_BlitSurface(tt->img[frame], NULL, where, &area); + drawtilehint(where, tt, area.x, area.y); } } @@ -1210,6 +1213,21 @@ void draweditortile(SDL_Surface *where, int x, int y) { } +/* draw hints on some more obscure tiles */ +void drawtilehint(SDL_Surface *where, tiletype_t *tt, double x, double y) { + if (tt->id == T_WATERRIGHT) { + writetext(where, x+1, y+1, "->", PALTEXTSIZE, &red); + } else if (tt->id == T_WATERLEFT) { + writetext(where, x+1, y+1, "<-", PALTEXTSIZE, &red); + } else if (tt->id == T_WATERDOWN) { + writetext(where, x+1, y+1, "V", PALTEXTSIZE, &red); + } else if (tt->id == T_RIGHT) { + writetext(where, x+1, y+1, "->", PALTEXTSIZE, &red); + } else if (tt->id == T_LEFT) { + writetext(where, x+1, y+1, "<-", PALTEXTSIZE, &red); + } +} + int writetext(SDL_Surface *where, int x, int y, char *text, int size, SDL_Color *col) { SDL_Surface *temps; SDL_Rect area; diff --git a/edit.h b/edit.h index e38e182..6c88360 100644 --- a/edit.h +++ b/edit.h @@ -8,6 +8,8 @@ #define EDITLINE (EDITTEXT + 1) +#define PALTEXTSIZE 10 // size of helper text on palette + // MAP #define EDITMAPW 640 // TODO: fix #define EDITMAPH 480 @@ -41,6 +43,7 @@ // Editor specific functions void draweditorlevel(void); void draweditortile(SDL_Surface *where, int x, int y); +void drawtilehint(SDL_Surface *where, tiletype_t *tt, double x, double y); void drawpalette(void); void drawsprites(void); int savelevel(int wnum, int lnum); diff --git a/rc.c b/rc.c index a23408d..db61552 100644 --- a/rc.c +++ b/rc.c @@ -3779,6 +3779,30 @@ void dotileeffects(sprite_t *s) { // } } + switch (tt->id) { + case T_WATERRIGHT: + if (!ismonster(s->id) && !isfruit(s->id)) { + movex(s, 1.5); + } else if (s->id == P_PLANT) { + movex(s, 1.5); + } + break; + case T_WATERLEFT: + if (!ismonster(s->id) && !isfruit(s->id)) { + movex(s, -1.5); + } else if (s->id == P_PLANT) { + movex(s, -1.5); + } + break; + case T_WATERDOWN: + if (!ismonster(s->id) && !isfruit(s->id)) { + s->y += 1.5; + } else if (s->id == P_PLANT) { + s->y += 1.5; + } + break; + } + /* check under us */ tt = gettileat(s->x,s->y+3,&tilex,&tiley); diff --git a/website/info.html b/website/info.html index 15f6317..3e03c7c 100644 --- a/website/info.html +++ b/website/info.html @@ -65,6 +65,7 @@
SlugSlugs are faster moving than snails and capable of launching themselves through the air at their prey!
PirahnaThese fish at at home in the water and unhampered by slowness while swimming.
PlantEvil venus fly trap plants will lie in wait and devour any player foolish enough to wander into their clutches. +
FlyAnnoying pests at the best of times, flies pose additional danger to dwarves. They fly around more erratically than bees and after landing can scurry quickly back and forth. Bosses
Cloud of DoomThis unkillable cloud will appear if you spend too much time on one level. Beware, as the only way to defeat the cloud of doom is to complete the level before it grows too large to handle!
King RatThis mighty creature is the ruler of the rats, and impervious to the player's net. It can only be harmed by slamming another monster into it! King Rat will roam the level searching for a player, and upon locating them will charge at high speed.