- Editor now displays hints about ambiguous tiles such as rollers/moving water

- Added new level
This commit is contained in:
Rob Pearce 2008-11-09 20:19:53 +00:00
parent a22cabc37e
commit 4fb89c3b95
7 changed files with 113 additions and 0 deletions

View File

@ -415,3 +415,21 @@ dir newtiles
file waterright.png waterright2.png waterright3.png waterright4.png waterright5.png file waterright.png waterright2.png waterright3.png waterright4.png waterright5.png
animspeed 5 animspeed 5
end 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

47
data/world1/level406.dat Normal file
View File

@ -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

2
defs.h
View File

@ -601,6 +601,8 @@
#define T_ICETOP 20 // slippery #define T_ICETOP 20 // slippery
#define T_ICE 21 // slippery #define T_ICE 21 // slippery
#define T_WATERRIGHT 22 #define T_WATERRIGHT 22
#define T_WATERLEFT 23
#define T_WATERDOWN 24
// death states // death states
#define D_INITIAL (1) // Need to trigger death sequence #define D_INITIAL (1) // Need to trigger death sequence

18
edit.c
View File

@ -918,6 +918,7 @@ void drawpalette(void) {
SDL_BlitSurface(bg->img[0], NULL, screen, &area); SDL_BlitSurface(bg->img[0], NULL, screen, &area);
/* draw tile */ /* draw tile */
SDL_BlitSurface(tt->img[0], NULL, screen, &area); SDL_BlitSurface(tt->img[0], NULL, screen, &area);
drawtilehint(screen, tt, area.x, area.y);
/* draw selector box */ /* draw selector box */
if (seltile == tt) { if (seltile == tt) {
drawbox16(screen,area.x,area.y,area.x+area.w-1,area.y+area.h-1,&red,NULL); 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); SDL_BlitSurface(greyim, NULL, where, &area);
} else { } else {
SDL_BlitSurface(tt->img[frame], NULL, where, &area); 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); SDL_BlitSurface(greyim, NULL, where, &area);
} else { } else {
SDL_BlitSurface(tt->img[frame], NULL, where, &area); 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) { int writetext(SDL_Surface *where, int x, int y, char *text, int size, SDL_Color *col) {
SDL_Surface *temps; SDL_Surface *temps;
SDL_Rect area; SDL_Rect area;

3
edit.h
View File

@ -8,6 +8,8 @@
#define EDITLINE (EDITTEXT + 1) #define EDITLINE (EDITTEXT + 1)
#define PALTEXTSIZE 10 // size of helper text on palette
// MAP // MAP
#define EDITMAPW 640 // TODO: fix #define EDITMAPW 640 // TODO: fix
#define EDITMAPH 480 #define EDITMAPH 480
@ -41,6 +43,7 @@
// Editor specific functions // Editor specific functions
void draweditorlevel(void); void draweditorlevel(void);
void draweditortile(SDL_Surface *where, int x, int y); 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 drawpalette(void);
void drawsprites(void); void drawsprites(void);
int savelevel(int wnum, int lnum); int savelevel(int wnum, int lnum);

24
rc.c
View File

@ -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 */ /* check under us */
tt = gettileat(s->x,s->y+3,&tilex,&tiley); tt = gettileat(s->x,s->y+3,&tilex,&tiley);

View File

@ -65,6 +65,7 @@
<tr><td align=center><img src="img/slug.png"><br>Slug</td><td>Slugs are faster moving than snails and capable of launching themselves through the air at their prey!</td></tr> <tr><td align=center><img src="img/slug.png"><br>Slug</td><td>Slugs are faster moving than snails and capable of launching themselves through the air at their prey!</td></tr>
<tr><td align=center><img src="img/fish.png"><br>Pirahna</td><td>These fish at at home in the water and unhampered by slowness while swimming.</td></tr> <tr><td align=center><img src="img/fish.png"><br>Pirahna</td><td>These fish at at home in the water and unhampered by slowness while swimming.</td></tr>
<tr><td align=center><img src="img/plant.png"><br>Plant</td><td>Evil venus fly trap plants will lie in wait and devour any player foolish enough to wander into their clutches.</td></tr> <tr><td align=center><img src="img/plant.png"><br>Plant</td><td>Evil venus fly trap plants will lie in wait and devour any player foolish enough to wander into their clutches.</td></tr>
<tr><td align=center><img src="img/fly.png"><br>Fly</td><td>Annoying 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.</td></tr>
<tr bgcolor="#ffff00"><th colspan=2>Bosses</th></tr> <tr bgcolor="#ffff00"><th colspan=2>Bosses</th></tr>
<tr><td align=center><img src="img/cloud.png"><br>Cloud of Doom</td><td>This 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!</td></tr> <tr><td align=center><img src="img/cloud.png"><br>Cloud of Doom</td><td>This 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!</td></tr>
<tr><td align=center><img src="img/kingrat.png"><br>King Rat</td><td>This 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.</td></tr> <tr><td align=center><img src="img/kingrat.png"><br>King Rat</td><td>This 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.</td></tr>