- Updated doco for adding sprites

- Added new monster - coke can (like angry rat)
- Added sound and music
- Fix score sizes for flowers
- Can no longer turn while slamming
- Fixed bug with sprite starting position
- Can now drop through bridges with down+jump
- New graphics for conveyor belts
- Added more flower types
- Added new player frame for shooting
This commit is contained in:
Rob Pearce 2008-09-26 09:51:17 +00:00
parent 1047c268b7
commit c80fb57c54
30 changed files with 602 additions and 125 deletions

View File

@ -1,8 +1,8 @@
all: rc edit all: rc edit
rc: rc.c shared.c rc.h shared.h globals.h defs.h rc: rc.c shared.c rc.h shared.h globals.h defs.h
gcc -Wall -o rc -g rc.c shared.c `sdl-config --cflags --libs` -I/usr/local/include -L/usr/local/lib -lSDLmain -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf gcc -Wall -o rc -g rc.c shared.c `sdl-config --cflags --libs` -I/usr/local/include -L/usr/local/lib -lSDLmain -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf -lSDL_Mixer
edit: edit.c shared.c edit.h shared.h globals.h defs.h edit: edit.c shared.c edit.h shared.h globals.h defs.h
gcc -Wall -o edit -g edit.c shared.c `sdl-config --cflags --libs` -I/usr/local/include -L/usr/local/lib -lSDLmain -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf gcc -D__EDITOR -Wall -o edit -g edit.c shared.c `sdl-config --cflags --libs` -I/usr/local/include -L/usr/local/lib -lSDLmain -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf

33
defs.h
View File

@ -1,6 +1,8 @@
#ifndef __DEFS_H #ifndef __DEFS_H
#define __DEFS_H #define __DEFS_H
#include <SDL_mixer.h>
/* Macros */ /* Macros */
//#define OPENGL //#define OPENGL
@ -16,7 +18,7 @@
// how long to keep various text on the screen // how long to keep various text on the screen
#define POINTSDELAY 40 #define POINTSDELAY 40
#define HURRYDELAY 50 #define HURRYDELAY 50
#define LEVELDELAY 40 #define LEVELDELAY 70
#define HELPDELAY 80 #define HELPDELAY 80
@ -40,9 +42,9 @@
#define MAXMAPPINGS 50 #define MAXMAPPINGS 50
#define MAXMONSTERSPERLEVEL 20 #define MAXMONSTERSPERLEVEL 20
#define MAXLETTERHEIGHT 100 #define MAXLETTERHEIGHT 100
#define MAXFRAMES 10 #define MAXFRAMES 11 // max number of frames for sprites
#define MAXHELP 5 #define MAXHELP 5
#define MAXTILEFRAMES 5 // max number of frames for animated tiles #define MAXTILEFRAMES 10 // max number of frames for animated tiles
// Fixed text buffer sizes // Fixed text buffer sizes
#define BUFLEN 512 #define BUFLEN 512
@ -60,13 +62,25 @@
/* enums */ /* enums */
/* sounds */
#define MAXFX 9
#define FX_SHOOT 0
#define FX_SLAM 1
#define FX_KILL 2
#define FX_MULTIKILL 3
#define FX_JUMP 4
#define FX_FRUIT 5
#define FX_POWERUP 6
#define FX_DIE 7
#define FX_WINLEVEL 8
// Slope types // Slope types
#define S_NOTSOLID 0 #define S_NOTSOLID 0
#define S_SOLID 1 #define S_SOLID 1
#define S_SLOPE 2 #define S_SLOPE 2
// Sprite types // Sprite types
#define MAXPTYPES 16 #define MAXPTYPES 19
#define P_PLAYER 0 #define P_PLAYER 0
#define P_RAT 1 #define P_RAT 1
#define P_CHEESE 2 #define P_CHEESE 2
@ -82,7 +96,10 @@
#define P_SNAKE 12 #define P_SNAKE 12
#define P_SPIT 13 #define P_SPIT 13
#define P_HELP 14 #define P_HELP 14
#define P_FLOWERRED 15 #define P_FLOWERYELLOW 15
#define P_FLOWERRED 16
#define P_FLOWERPURPLE 17
#define P_COKE 18
// Frame names // Frame names
#define F_WALK1 0 #define F_WALK1 0
@ -95,6 +112,7 @@
#define F_DEAD4 7 #define F_DEAD4 7
#define F_CLIMB1 8 #define F_CLIMB1 8
#define F_CLIMB2 9 #define F_CLIMB2 9
#define F_SHOOT 10
// Tile types // Tile types
#define T_BLANK 0 #define T_BLANK 0
@ -114,6 +132,7 @@
#define T_WATER 14 #define T_WATER 14
#define T_WATERTOP 15 #define T_WATERTOP 15
#define T_WATERSPIKES 16 #define T_WATERSPIKES 16
#define T_BRIDGE 17 // like land but you can drop down through it
// death states // death states
#define D_INITIAL (1) // Need to trigger death sequence #define D_INITIAL (1) // Need to trigger death sequence
@ -236,6 +255,8 @@ typedef struct sprite_s {
// player and monster // player and monster
int falling; // are we falling? int falling; // are we falling?
int dropping; // are we purposely dropping through solid ground?
int dropx,dropy;// coords of tile we dropped from
int fallspeed; // how fast are we falling? int fallspeed; // how fast are we falling?
int jumping; // are we jumping? int jumping; // are we jumping?
int jumpdir; //which way are we jumping? int jumpdir; //which way are we jumping?
@ -280,6 +301,8 @@ extern SDL_Color yellow;
extern int vidargs; extern int vidargs;
extern int toggletimer; extern int toggletimer;
extern TTF_Font *font[]; extern TTF_Font *font[];
extern Mix_Music *music;
extern Mix_Chunk *sfx[];
#endif #endif

View File

@ -4,3 +4,6 @@
- in shared.c: add loadspriteimage() line(s) in loadimagesets() - in shared.c: add loadspriteimage() line(s) in loadimagesets()
- in shared.c: add entry to monstertochar - in shared.c: add entry to monstertochar
- in shared.c: add entry to chartomonster - in shared.c: add entry to chartomonster
- in shared.c: update isfruit(), isbullet()
- in rc.c: update ismonster()
- in rc.c: add monster movement

32
edit.c
View File

@ -122,8 +122,8 @@ int main (int argc, char **argv) {
timer = 0; timer = 0;
player->invuln = INVULNTIME; //player->invuln = INVULNTIME;
player->score = 0; //player->score = 0;
while (1) { while (1) {
@ -178,7 +178,7 @@ int main (int argc, char **argv) {
} else { } else {
// check next one // check next one
x += w; x += w;
if (x >= EDITORW) { if (x >= EDITORW-TILEW) {
x = SPALX; x = SPALX;
y += maxh; y += maxh;
maxh = 0; maxh = 0;
@ -278,6 +278,30 @@ int main (int argc, char **argv) {
} }
} }
/* next level */
if (keys[SDLK_RIGHT]) {
if (toggletimer == 0) {
printf("Skipping to next level.\n");
curlevelnum++;
loadlevel(curworld,curlevelnum);
draweditorlevel();
drawsprites();
toggletimer = 30;
}
}
/* prev level */
if (keys[SDLK_LEFT]) {
if (toggletimer == 0) {
if (curlevelnum > 1) {
printf("Skipping to previous level.\n");
curlevelnum--;
loadlevel(curworld,curlevelnum);
draweditorlevel();
drawsprites();
toggletimer = 30;
}
}
}
if (keys[SDLK_RETURN]) { if (keys[SDLK_RETURN]) {
if (toggletimer == 0) { if (toggletimer == 0) {
@ -451,7 +475,7 @@ void drawpalette(void) {
/* move to next position */ /* move to next position */
area.x += area.w; area.x += area.w;
if (area.x >= EDITORW) { if (area.x >= EDITORW-TILEW) {
area.x = SPALX; area.x = SPALX;
area.y += maxheight; area.y += maxheight;
maxheight = 0; maxheight = 0;

View File

@ -8,6 +8,9 @@ sprite_t *sprite; // head of sprite linked list
sprite_t *lastsprite; // tail of sprite linked list sprite_t *lastsprite; // tail of sprite linked list
sprite_t *player; // pointer to the player's sprite sprite_t *player; // pointer to the player's sprite
Mix_Music *music;
Mix_Chunk *sfx[MAXFX];
level_t *curlevel; // the current level's data level_t *curlevel; // the current level's data
tiletype_t fakeblock; // used for returning tiletypes from a function tiletype_t fakeblock; // used for returning tiletypes from a function

BIN
music/main.mod Normal file

Binary file not shown.

BIN
rc

Binary file not shown.

266
rc.c
View File

@ -1,4 +1,3 @@
#include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -14,6 +13,7 @@
#include <SDL_rotozoom.h> #include <SDL_rotozoom.h>
#include <SDL_ttf.h> #include <SDL_ttf.h>
#include <SDL_framerate.h> #include <SDL_framerate.h>
#include <SDL_mixer.h>
#include "shared.h" #include "shared.h"
#include "rc.h" #include "rc.h"
@ -159,6 +159,15 @@ int main (int argc, char **argv) {
return 1; return 1;
} }
/* init sound */
if (initsound()) {
printf("sound error.\n");
return 1;
}
/* start music */
Mix_PlayMusic(music, -1);
drawlevel(); drawlevel();
flip(); flip();
@ -202,6 +211,7 @@ int main (int argc, char **argv) {
addtext(318,242,32,"Level Complete!",&black,LEVELDELAY); addtext(318,242,32,"Level Complete!",&black,LEVELDELAY);
addtext(320,240,32,"Level Complete!",&yellow,LEVELDELAY); addtext(320,240,32,"Level Complete!",&yellow,LEVELDELAY);
levelcomplete = 2; levelcomplete = 2;
playfx(FX_WINLEVEL);
} else if (levelcomplete == 2) { } else if (levelcomplete == 2) {
int mcount = 0; int mcount = 0;
sprite_t *s2; sprite_t *s2;
@ -244,21 +254,21 @@ int main (int argc, char **argv) {
if ((!player->dead) && (!player->teleporting)) { if ((!player->dead) && (!player->teleporting)) {
if (keys[SDLK_RIGHT]) { if (keys[SDLK_RIGHT]) {
if ((!player->jumping) && (!player->slamming)) { if (canmove(player)) {
if (!isonladder(player) || player->falling || isonground(player)) {
movex(player, getspeed(player)); movex(player, getspeed(player));
} }
} if (canturn(player)) {
player->dir = D_RIGHT; player->dir = D_RIGHT;
} }
}
if (keys[SDLK_LEFT]) { if (keys[SDLK_LEFT]) {
if ((!player->jumping) && (!player->slamming)) { if (canmove(player)) {
if (!isonladder(player) || player->falling || isonground(player)) {
movex(player, -getspeed(player)); movex(player, -getspeed(player));
} }
} if (canturn(player)) {
player->dir = D_LEFT; player->dir = D_LEFT;
} }
}
if (keys[SDLK_UP]) { if (keys[SDLK_UP]) {
if (isonladder(player) || isladderabove(player)) { if (isonladder(player) || isladderabove(player)) {
player->y -= getspeed(player); player->y -= getspeed(player);
@ -286,6 +296,15 @@ int main (int argc, char **argv) {
if (!player->jumping) { if (!player->jumping) {
if (!player->falling) { if (!player->falling) {
if (isonground(player) || isonladder(player)) { if (isonground(player) || isonladder(player)) {
/* dropping through a bridge */
if (keys[SDLK_DOWN]) {
if (isonbridge(player) && !player->falling) {
/* drop down */
player->dropping = B_TRUE;
player->dropx = player->x / TILEW;
player->dropy = player->y / TILEH;
}
} else {
int whichway; int whichway;
player->climbing = B_FALSE; player->climbing = B_FALSE;
if (keys[SDLK_RIGHT]) { if (keys[SDLK_RIGHT]) {
@ -295,17 +314,20 @@ int main (int argc, char **argv) {
} else { } else {
whichway = 0; whichway = 0;
} }
playfx(FX_JUMP);
jump(player, whichway); jump(player, whichway);
} }
} }
} }
} }
} }
}
if (keys[SDLK_z]) { if (keys[SDLK_z]) {
if ((!player->netting) && (!player->slamming)) { if ((!player->netting) && (!player->slamming)) {
if (keys[SDLK_DOWN]) { if (keys[SDLK_DOWN]) {
/* slam */ /* slam */
if ((!player->slamming) && (isonground(player))) { if ((!player->slamming) && (isonground(player))) {
playfx(FX_SLAM);
player->slamming = B_TRUE; player->slamming = B_TRUE;
player->slamangle = 0; player->slamangle = 0;
player->netxstart = player->x - (player->img->w/2)*player->dir; player->netxstart = player->x - (player->img->w/2)*player->dir;
@ -314,6 +336,7 @@ int main (int argc, char **argv) {
} else { } else {
if (player->netcaught < player->netmax) { if (player->netcaught < player->netmax) {
/* shoot net */ /* shoot net */
playfx(FX_SHOOT);
player->netting = 1; player->netting = 1;
if (player->netbig) { if (player->netbig) {
player->netspeed = NETSPEED+3; player->netspeed = NETSPEED+3;
@ -416,7 +439,7 @@ void tick(void) {
if (gtime == curlevel->hurryuptime) { if (gtime == curlevel->hurryuptime) {
if (!levelcomplete) { if (!levelcomplete) {
for (s = sprite; s; s = s->next) { for (s = sprite; s; s = s->next) {
if (s != player) { if ((s != player) && (!isfruit(s->id))) {
s->angry = B_TRUE; s->angry = B_TRUE;
} }
} }
@ -450,6 +473,11 @@ void nextlevel(void) {
drawlevel(); drawlevel();
levelcomplete = B_FALSE; levelcomplete = B_FALSE;
levelcompletetime = -1; levelcompletetime = -1;
/* reset player stats */
player->netting = B_FALSE;
player->slamming = B_FALSE;
player->jumping = B_FALSE;
} }
void jump(sprite_t *s, int dir) { void jump(sprite_t *s, int dir) {
@ -480,6 +508,18 @@ void die(sprite_t *s) {
/* clouds can't die like this */ /* clouds can't die like this */
if (s->id == P_CLOUD) return; if (s->id == P_CLOUD) return;
/* if this is the player, hurryup time counter resets */
// We already do this in the cloud movement routine, but
// this handles cases where the cloud hasn't appeared yet.
if (s == player) {
gtime = 0;
}
if (s == player) {
/* play sound */
playfx(FX_DIE);
}
/* release anything we've caught */ /* release anything we've caught */
for (s2 = sprite->next ; s2 ; s2 = s2->next) { for (s2 = sprite->next ; s2 ; s2 = s2->next) {
if (s2->caughtby == s) { if (s2->caughtby == s) {
@ -511,6 +551,8 @@ void die(sprite_t *s) {
void cleanup(void) { void cleanup(void) {
int i; int i;
Mix_HaltMusic();
Mix_CloseAudio();
for (i = 1; i < MAXLETTERHEIGHT; i++) { for (i = 1; i < MAXLETTERHEIGHT; i++) {
TTF_CloseFont(font[i]); TTF_CloseFont(font[i]);
} }
@ -563,14 +605,18 @@ void checkcollide(sprite_t *s) {
if (isfruit(s2->id)) { if (isfruit(s2->id)) {
if (s == player) { if (s == player) {
int gotscore = s2->score; int gotscore = s2->score;
/* kill the fruit */ /* kill the fruit */
s2->dead = D_FINAL; s2->dead = D_FINAL;
/* give points to the player */ /* give points to the player */
player->score = player->score + gotscore; player->score = player->score + gotscore;
/* handle fruit effects */ /* handle fruit effects */
if (!dofruiteffect(s2)) { if (dofruiteffect(s2)) {
playfx(FX_POWERUP);
} else {
playfx(FX_FRUIT);
sprintf(tempm, "%d", gotscore); sprintf(tempm, "%d", gotscore);
addtext(s2->x,s2->y - s2->img->h/2, 16, tempm, &white,POINTSDELAY); addtext(s2->x,s2->y - s2->img->h/2, TEXTSIZE_POINTS, tempm, &white,POINTSDELAY);
} }
} }
} }
@ -892,6 +938,80 @@ void movesprite(sprite_t *s) {
} }
} }
} }
} else if (s->id == P_COKE) {
if (!s->falling) {
int move = B_FALSE;
int xdiff, absxdiff;
/* distance to player */
xdiff = player->x - s->x;
if (xdiff < 0) absxdiff = -xdiff;
else absxdiff = xdiff;
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) {
if (player->y > s->y ) {
/* if player is below, fall off */
if (xdiff <= (TILEW*12)) {
move = B_TRUE;
}
} else if (player->y == s->y) {
/* 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 {
move = B_TRUE;
}
/* either move or turn around */
if (move) {
rv = movex(s, s->dir*getspeed(s));
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 ((player->dead == 0) && (!s->jumping) && (!s->jumptimer)) {
/* if player is above us, jump */
if (player->y < s->y) {
if ((xdiff >= (TILEW*2)) && (xdiff <= (TILEW*3))) {
/* jump right */
jump(s, D_RIGHT);
} else if ((xdiff <= -(TILEW*2)) && (xdiff >= -(TILEW*3))) {
/* jump left */
jump(s, D_LEFT);
} else if (s->y - player->y <= (TILEH*6)) {
if ((xdiff >= 0) && (xdiff < (TILEW*2))) {
/* jump up */
jump(s, 0);
} else if ((xdiff <= 0) && (xdiff > -(TILEW*2))) {
/* jump up */
jump(s, 0);
}
} else {
/* jump whichever way we're facing */
/*
s->jumpdir = s->dir;
s->jumping = 1;
s->jumpspeed = 5;
*/
}
}
}
}
} else if (s->id == P_SNAKE) { } else if (s->id == P_SNAKE) {
if (!s->falling) { if (!s->falling) {
int move = B_FALSE; int move = B_FALSE;
@ -1452,7 +1572,7 @@ void drawnetting(sprite_t *s) {
int netsleft; int netsleft;
sx = s->x; sx = s->x;
s->nety = s->y - (s->img->h/2); s->nety = s->y - (s->img->h/2) + 2;
s->netxstart = s->x; s->netxstart = s->x;
s->netystart = s->nety - 3; s->netystart = s->nety - 3;
@ -1463,7 +1583,7 @@ void drawnetting(sprite_t *s) {
area.x = s->netxstart - TILEW/2 - s->netlen; area.x = s->netxstart - TILEW/2 - s->netlen;
} }
//area.y = s->netystart; //area.y = s->netystart;
area.y = s->y - s->img->h-2; area.y = s->y - s->img->h-2 + 2;
area.w = s->netlen; area.w = s->netlen;
area.h = s->img->h+2; area.h = s->img->h+2;
SDL_BlitSurface(screen, &area,s->netbg, NULL); SDL_BlitSurface(screen, &area,s->netbg, NULL);
@ -1561,6 +1681,16 @@ void removesprite(sprite_t *s) {
} }
} }
int isonbridge(sprite_t *s) {
tiletype_t *tthere;
tthere = gettileat(s->x,s->y, NULL,NULL);
if (tthere->id == T_BRIDGE) {
return B_TRUE;
}
return B_FALSE;
}
int isonladder(sprite_t *s) { int isonladder(sprite_t *s) {
tiletype_t *tthere; tiletype_t *tthere;
@ -1629,7 +1759,7 @@ int isonground(sprite_t *s) {
if (isongroundpoint(s, s->x, s->y)) { if (isongroundpoint(s, s->x, s->y)) {
return B_TRUE; return B_TRUE;
} }
if (!s->falling) { if (!s->falling && !s->dropping) {
if (isongroundpoint(s, s->x + s->img->w/2, s->y)) { if (isongroundpoint(s, s->x + s->img->w/2, s->y)) {
return B_TRUE; return B_TRUE;
} }
@ -1648,6 +1778,14 @@ int isongroundpoint(sprite_t *s, int x,int y) {
int groundy; int groundy;
tt = gettileat(x,y, &tilex, &tiley); tt = gettileat(x,y, &tilex, &tiley);
// when dropping, the tile you dropped from doesn't count
// as "ground".
if (s->dropping && (tilex == s->dropx) && (tiley == s->dropy)) {
return B_FALSE;
}
/* get offset */ /* get offset */
xoff = x - (tilex*TILEW); xoff = x - (tilex*TILEW);
@ -1669,10 +1807,21 @@ int isongroundpoint(sprite_t *s, int x,int y) {
} else if (s->falling) { } else if (s->falling) {
tiletype_t *abovetile; tiletype_t *abovetile;
/* falling, on a tile, but with tiles above you */ /* falling, on a tile, but with tiles above you */
// ie. you've jumped up through a single tile (can't
// jump through two or more tiles
abovetile = gettileat(x,y-TILEH, NULL, NULL); abovetile = gettileat(x,y-TILEH, NULL, NULL);
if (abovetile->solid) { if (abovetile->solid) {
return B_FALSE; return B_FALSE;
} }
// } else if (s->dropping) {
// tiletype_t *abovetile;
/* if the tile we're on is solid but not the one
above, then we've "dropped" and are still
travelling through the tile we dropped from. */
// abovetile = gettileat(x,y-TILEH, NULL, NULL);
// if (!abovetile->solid) {
// return B_FALSE;
// }
} }
} }
@ -1755,9 +1904,11 @@ void dogravity(sprite_t *s) {
if (s->slamming) { if (s->slamming) {
s->slamangle += (10 * (M_PI/180)); s->slamangle += (10 * (M_PI/180));
if (s->slamangle >= (180 * (M_PI/180))) { if (s->slamangle >= (180 * (M_PI/180))) {
/* finished slamming */
int xdiff,ydiff,xnet = 0,ynet = 0; int xdiff,ydiff,xnet = 0,ynet = 0;
int pointsinc = 250; int pointsinc = 250;
int psize = 6; int psize = 6;
int gotsomething = B_FALSE;
s->slamming = 0; s->slamming = 0;
@ -1783,12 +1934,19 @@ void dogravity(sprite_t *s) {
psize += 10; psize += 10;
xnet = s2->x; xnet = s2->x;
ynet = s2->y - s2->img->h/2; ynet = s2->y - s2->img->h/2;
gotsomething = B_TRUE;
} else { } else {
/* otherwise it gets angry */ /* otherwise it gets angry */
s2->angry = B_TRUE; s2->angry = B_TRUE;
} }
} }
} }
if (gotsomething) {
playfx(FX_KILL);
}
gotsomething = B_FALSE;
/* kill anything we hit */ /* kill anything we hit */
for (s2 = sprite; s2 ; s2 = s2->next) { for (s2 = sprite; s2 ; s2 = s2->next) {
@ -1808,11 +1966,16 @@ void dogravity(sprite_t *s) {
die(s2); die(s2);
pointsinc *= 2; pointsinc *= 2;
psize += 10; psize += 10;
gotsomething = B_TRUE;
} }
} }
} }
} }
if (gotsomething) {
playfx(FX_MULTIKILL);
}
/* release anything we've caught */ /* release anything we've caught */
for (s2 = sprite; s2 ; s2 = s2->next) { for (s2 = sprite; s2 ; s2 = s2->next) {
@ -1945,6 +2108,7 @@ int ismonster(int id) {
if (id == P_SPIDER) return B_TRUE; if (id == P_SPIDER) return B_TRUE;
if (id == P_SNAKE) return B_TRUE; if (id == P_SNAKE) return B_TRUE;
if (id == P_CLOUD) return B_TRUE; if (id == P_CLOUD) return B_TRUE;
if (id == P_COKE) return B_TRUE;
return B_FALSE; return B_FALSE;
} }
@ -1956,3 +2120,79 @@ void usage(void) {
printf(" -l xx Skip to level xx.\n"); printf(" -l xx Skip to level xx.\n");
printf("\n"); printf("\n");
} }
// returns B_TRUE if the given player is able to walk/fall left/right
int canmove(sprite_t *pl) {
if (!pl->jumping && !pl->slamming ) {
if (!pl->netting) {
if (!isonladder(pl) || pl->falling || isonground(pl)) {
return B_TRUE;
}
} else if (pl->netting && pl->falling) { // netting and falling
return B_TRUE;
}
}
return B_FALSE;
}
// returns B_TRUE if the given player is able to change which direction they're facing
int canturn(sprite_t *pl) {
if (!pl->slamming && !pl->netting) {
return B_TRUE;
}
return B_FALSE;
}
int loadfx(int sid , char *filename) {
char tempname[BUFLEN];
sprintf(tempname, "sounds/");
strncat(tempname, filename, BUFLEN);
sfx[sid] = Mix_LoadWAV(tempname);
if (!sfx[sid]) {
printf("error loading %s\n",tempname);
return B_TRUE;
}
return B_FALSE;
}
int initsound(void) {
int i;
/* init */
if (Mix_OpenAudio(44100, AUDIO_S16SYS, 2, 1024) < 0) {
printf("Error initialising sound: %s.\n",Mix_GetError());
return B_TRUE;
}
loadfx(FX_SHOOT, "shoot.wav");
loadfx(FX_SLAM, "slam.wav");
loadfx(FX_KILL, "kill.wav");
loadfx(FX_MULTIKILL, "multikill.wav");
loadfx(FX_JUMP, "jump.wav");
loadfx(FX_FRUIT, "fruit.wav");
loadfx(FX_POWERUP, "powerup.wav");
loadfx(FX_DIE, "die.wav");
loadfx(FX_WINLEVEL, "winlevel.wav");
// load sound effects
for (i = 0; i < MAXFX; i++) {
if (!sfx[i]) {
return B_TRUE;
}
}
// load music
music = Mix_LoadMUS("music/main.mod");
if (!music) {
printf("can't load music\n");
return B_TRUE;
}
return B_FALSE;
}
void playfx(int num) {
Mix_PlayChannel(-1, sfx[num], 0);
}

10
rc.h
View File

@ -20,6 +20,7 @@ int isroofnabove(sprite_t *s,int howfar);
int isonground(sprite_t *s); int isonground(sprite_t *s);
int isongroundpoint(sprite_t *s, int x, int y); int isongroundpoint(sprite_t *s, int x, int y);
int isonladder(sprite_t *s); int isonladder(sprite_t *s);
int isonbridge(sprite_t *s);
int isladderabove(sprite_t *s); int isladderabove(sprite_t *s);
int dofruiteffect(sprite_t *s); int dofruiteffect(sprite_t *s);
int ismonster(int id); int ismonster(int id);
@ -31,7 +32,8 @@ double getspeed(sprite_t *s );
void adjustheight(sprite_t *s); void adjustheight(sprite_t *s);
void tick(void); void tick(void);
void usage(void); void usage(void);
int canmove(sprite_t *pl);
int canturn(sprite_t *pl);
int initsound(void);
int loadfx(int sid, char *filename);
void playfx(int num);

View File

@ -32,7 +32,7 @@ int loadlevel(int wnum, int lnum) {
char *p; char *p;
int tileid; int tileid;
int i; int i;
int *ii; //int *ii;
mapping_t mapping[MAXMAPPINGS]; mapping_t mapping[MAXMAPPINGS];
int nmappings = 0; int nmappings = 0;
tiletype_t *lasttile; tiletype_t *lasttile;
@ -41,6 +41,8 @@ int loadlevel(int wnum, int lnum) {
int tempanim[LEVELW*LEVELH]; int tempanim[LEVELW*LEVELH];
printf("Loading level %d-%d...",wnum,lnum);
if (!level) level = malloc(sizeof(level_t)); if (!level) level = malloc(sizeof(level_t));
if (level->animtiles) free(level->animtiles); if (level->animtiles) free(level->animtiles);
@ -226,7 +228,7 @@ int loadlevel(int wnum, int lnum) {
} else { } else {
/* place the monster */ /* place the monster */
level->initm[level->nummonsters].startx = x*TILEW+(TILEW/2); level->initm[level->nummonsters].startx = x*TILEW+(TILEW/2);
level->initm[level->nummonsters].starty = y*TILEH+(TILEH-2); level->initm[level->nummonsters].starty = y*TILEH+(TILEH-2)+2;
level->initm[level->nummonsters].id = monid; level->initm[level->nummonsters].id = monid;
if (monid == P_HELP) { if (monid == P_HELP) {
@ -494,10 +496,12 @@ int loadlevel(int wnum, int lnum) {
return B_TRUE; return B_TRUE;
} }
#ifndef __EDITOR
if ((level->p1x == 0) || (level->p1y == 0)) { if ((level->p1x == 0) || (level->p1y == 0)) {
printf("Level is missing player 1 start position.\n"); printf("Level is missing player 1 start position.\n");
return B_TRUE; return B_TRUE;
} }
#endif
/* free help texts */ /* free help texts */
for (i = 0; i < numhelp; i++) { for (i = 0; i < numhelp; i++) {
@ -531,11 +535,13 @@ int loadlevel(int wnum, int lnum) {
gtime = 0; gtime = 0;
printf("Loaded level. Animated tiles: "); printf("Done.\n");
/*
for (ii = level->animtiles ; ii && *ii != -1; ii++) { for (ii = level->animtiles ; ii && *ii != -1; ii++) {
printf("%d ",*ii); printf("%d ",*ii);
} }
printf(".\n"); printf(".\n");
*/
return B_FALSE; return B_FALSE;
} }
@ -553,6 +559,9 @@ void setdefaults(sprite_t *s) {
s->netmax = 1; s->netmax = 1;
s->netcaught = 0; s->netcaught = 0;
s->netbig = 0; s->netbig = 0;
s->dropping = 0;
s->dropx = -1;
s->dropy = -1;
s->falling = 0; s->falling = 0;
s->fallspeed = 0; s->fallspeed = 0;
s->dir = 1; s->dir = 1;
@ -580,20 +589,26 @@ void setdefaults(sprite_t *s) {
switch (s->id) { switch (s->id) {
case P_CHEESE: case P_CHEESE:
s->score = 500; s->score = 100;
break; break;
case P_ICECREAM: case P_ICECREAM:
s->score = 1000; s->score = 200;
break; break;
case P_CHIPS: case P_CHIPS:
s->score = 2000; s->score = 300;
break; break;
case P_BURGER: case P_BURGER:
s->score = 4000; s->score = 400;
break; break;
case P_FLOWERRED: case P_FLOWERRED:
s->score = 5; s->score = 5;
break; break;
case P_FLOWERYELLOW:
s->score = 10;
break;
case P_FLOWERPURPLE:
s->score = 30;
break;
default: default:
s->score = 0; s->score = 0;
break; break;
@ -688,6 +703,8 @@ int loadtiletypes(char *filename) {
int state; int state;
FILE *f; FILE *f;
char buf[BUFLEN]; char buf[BUFLEN];
char dirname[BUFLEN];
char imagefile[BUFLEN];
char *p,*pp; char *p,*pp;
int uniq = 0 ; int uniq = 0 ;
@ -720,6 +737,8 @@ int loadtiletypes(char *filename) {
strcpy(t->name, p); strcpy(t->name, p);
/* defaults */ /* defaults */
strcpy(dirname, ".");
t->id = 0; t->id = 0;
t->animspeed = 0; // not animated t->animspeed = 0; // not animated
t->numframes = 1; // not animated t->numframes = 1; // not animated
@ -749,6 +768,13 @@ int loadtiletypes(char *filename) {
p = strtok(buf, " "); p = strtok(buf, " ");
p = strtok(NULL, " "); p = strtok(NULL, " ");
t->id = atoi(p); t->id = atoi(p);
} else if (strstr(buf, "dir") == buf) { // tile directory
/* strip newline */
buf[strlen(buf)-1] = '\0';
p = strtok(buf, " ");
p = strtok(NULL, " ");
strcpy(dirname, p);
} else if (strstr(buf, "animspeed") == buf) { } else if (strstr(buf, "animspeed") == buf) {
p = strtok(buf, " "); p = strtok(buf, " ");
p = strtok(NULL, " "); p = strtok(NULL, " ");
@ -789,9 +815,13 @@ int loadtiletypes(char *filename) {
SDL_FreeSurface(t->img[frame]); SDL_FreeSurface(t->img[frame]);
t->img[frame] = NULL; t->img[frame] = NULL;
} }
t->img[frame] = IMG_Load(p); strcpy(imagefile, dirname);
strcat(imagefile, "/");
strcat(imagefile, p);
t->img[frame] = IMG_Load(imagefile);
if (!t->img[frame]) { if (!t->img[frame]) {
printf("cannot load tile image file: '%s'\n",p); printf("cannot load tile image file: '%s'\n",imagefile);
fclose(f); fclose(f);
return B_TRUE; return B_TRUE;
} }
@ -830,7 +860,8 @@ int loadimagesets(void) {
/* next 3 are auto generated */ /* next 3 are auto generated */
loadspriteimage(P_PLAYER,F_CLIMB1, "sprites/dclimb1.png"); loadspriteimage(P_PLAYER,F_CLIMB1, "sprites/dclimb1.png");
loadspriteimage(P_PLAYER,F_CLIMB2, "sprites/dclimb2.png"); loadspriteimage(P_PLAYER,F_CLIMB2, "sprites/dclimb2.png");
imageset[P_PLAYER].numimages = 10; loadspriteimage(P_PLAYER,F_SHOOT, "sprites/dwarfshoot.png");
imageset[P_PLAYER].numimages = 11;
loadspriteimage(P_SNAKE,F_WALK1, "sprites/snake.bmp"); loadspriteimage(P_SNAKE,F_WALK1, "sprites/snake.bmp");
loadspriteimage(P_SNAKE,F_JUMP, "sprites/snakejump.bmp"); loadspriteimage(P_SNAKE,F_JUMP, "sprites/snakejump.bmp");
@ -872,6 +903,14 @@ int loadimagesets(void) {
loadspriteimage(P_CLOUD,F_DEAD, "sprites/cloud.bmp"); loadspriteimage(P_CLOUD,F_DEAD, "sprites/cloud.bmp");
imageset[P_CLOUD].numimages = 2; imageset[P_CLOUD].numimages = 2;
loadspriteimage(P_COKE,F_WALK1, "sprites/coke.png");
loadspriteimage(P_COKE,F_JUMP, "sprites/cokejump.png");
loadspriteimage(P_COKE,F_FALL, "sprites/cokejump.png");
loadspriteimage(P_COKE,F_CAUGHT, "sprites/cokecaught.png");
loadspriteimage(P_COKE,F_DEAD, "sprites/cokedead.png");
imageset[P_COKE].numimages = 8;
/* fruits / powerups */
loadspriteimage(P_CHEESE,F_WALK1, "sprites/cheese.bmp"); loadspriteimage(P_CHEESE,F_WALK1, "sprites/cheese.bmp");
imageset[P_CHEESE].numimages = 1; imageset[P_CHEESE].numimages = 1;
@ -896,9 +935,16 @@ int loadimagesets(void) {
loadspriteimage(P_HELP,F_WALK1, "sprites/help.bmp"); loadspriteimage(P_HELP,F_WALK1, "sprites/help.bmp");
imageset[P_HELP].numimages = 1; imageset[P_HELP].numimages = 1;
loadspriteimage(P_FLOWERYELLOW,F_WALK1, "sprites/flower-yellow.png");
imageset[P_FLOWERRED].numimages = 1;
loadspriteimage(P_FLOWERRED,F_WALK1, "sprites/flower-red.png"); loadspriteimage(P_FLOWERRED,F_WALK1, "sprites/flower-red.png");
imageset[P_FLOWERRED].numimages = 1; imageset[P_FLOWERRED].numimages = 1;
loadspriteimage(P_FLOWERPURPLE,F_WALK1, "sprites/flower-purple.png");
imageset[P_FLOWERPURPLE].numimages = 1;
/* bullets */ /* bullets */
loadspriteimage(P_SPIT,F_WALK1, "sprites/spit.bmp"); loadspriteimage(P_SPIT,F_WALK1, "sprites/spit.bmp");
imageset[P_SPIT].numimages = 1; imageset[P_SPIT].numimages = 1;
@ -908,6 +954,7 @@ int loadimagesets(void) {
/* generate rotated/flipped images */ /* generate rotated/flipped images */
for (p = 0; p < MAXPTYPES; p++) { for (p = 0; p < MAXPTYPES; p++) {
/* rotated */
if (!isfruit(p) && !isbullet(p)) { if (!isfruit(p) && !isbullet(p)) {
tempimg = rotozoomSurface(imageset[p].img[F_DEAD],90,1,0); tempimg = rotozoomSurface(imageset[p].img[F_DEAD],90,1,0);
imageset[p].img[F_DEAD2] = SDL_DisplayFormat(tempimg); imageset[p].img[F_DEAD2] = SDL_DisplayFormat(tempimg);
@ -1007,6 +1054,8 @@ void drawsprite(sprite_t *s) {
frame = F_CAUGHT; frame = F_CAUGHT;
} else if (s->climbing) { } else if (s->climbing) {
frame = F_CLIMB1 + ((timer/12) % 2); frame = F_CLIMB1 + ((timer/12) % 2);
} else if (s->netting) {
frame = F_SHOOT;
} else if (s->jumping) { } else if (s->jumping) {
frame = F_JUMP; frame = F_JUMP;
} else if (s->falling) { } else if (s->falling) {
@ -1155,6 +1204,8 @@ int isfruit(int id) {
case P_BIGNET: case P_BIGNET:
case P_HELP: case P_HELP:
case P_FLOWERRED: case P_FLOWERRED:
case P_FLOWERYELLOW:
case P_FLOWERPURPLE:
return B_TRUE; return B_TRUE;
} }
@ -1321,6 +1372,9 @@ int chartomonster(char ch) {
case '?': return P_HELP; case '?': return P_HELP;
case '1': return P_PLAYER; case '1': return P_PLAYER;
case '@': return P_FLOWERRED; case '@': return P_FLOWERRED;
case 'Y': return P_FLOWERYELLOW;
case 'P': return P_FLOWERPURPLE;
case 'C': return P_COKE;
} }
return -1; return -1;
@ -1335,6 +1389,9 @@ char monstertochar(int id ) {
case P_HELP: return '?'; case P_HELP: return '?';
case P_PLAYER: return '1'; case P_PLAYER: return '1';
case P_FLOWERRED: return '@'; case P_FLOWERRED: return '@';
case P_FLOWERYELLOW: return 'Y';
case P_FLOWERPURPLE: return 'P';
case P_COKE: return 'C';
} }
return '\0'; return '\0';

BIN
sounds/die.au Normal file

Binary file not shown.

BIN
sounds/die.wav Normal file

Binary file not shown.

BIN
sounds/fruit.wav Normal file

Binary file not shown.

BIN
sounds/jump.wav Normal file

Binary file not shown.

BIN
sounds/kill.au Normal file

Binary file not shown.

BIN
sounds/kill.wav Normal file

Binary file not shown.

BIN
sounds/multikill.wav Normal file

Binary file not shown.

BIN
sounds/powerup.wav Normal file

Binary file not shown.

BIN
sounds/shoot.wav Normal file

Binary file not shown.

BIN
sounds/slam.wav Normal file

Binary file not shown.

BIN
sounds/winlevel.au Normal file

Binary file not shown.

BIN
sounds/winlevel.wav Normal file

Binary file not shown.

View File

@ -8,17 +8,23 @@ Once caught, Down+Z will slam and kill a monster!
endhelp endhelp
monsters monsters
1 3 19 1 3 19
r 27 15
? 7 19 ? 7 19
? 12 19 ? 12 19
@ 16 14 @ 16 14
@ 36 14
@ 2 15
@ 1 15
@ 22 15
@ 23 15
@ 30 15 @ 30 15
@ 31 15 @ 31 15
P 21 15
@ 22 15
@ 20 15
Y 23 15
Y 19 15
P 36 14
Y 2 15
Y 1 15
Y 24 19
Y 22 19
Y 20 19
r 18 15
endmonsters endmonsters
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,
@ -36,7 +42,7 @@ endmonsters
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,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4,4, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,

View File

@ -2,42 +2,62 @@ tileset green
bg 0 bg 0
hurryup 30 hurryup 30
endmaps endmaps
help
endhelp
monsters monsters
r 10 4
1 17 8 1 17 8
r 10 4
r 11 12 r 11 12
r 33 12 r 33 12
r 25 16 r 25 16
r 12 20 r 12 20
r 25 24 r 25 24
Y 23 12
Y 25 12
@ 25 20
@ 23 20
Y 32 20
P 34 20
@ 7 16
P 5 16
@ 16 16
Y 14 16
Y 15 24
@ 16 24
@ 14 24
@ 5 24
@ 7 24
Y 6 24
P 8 4
@ 26 8
endmonsters endmonsters
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
*000000~~~~~~~~~~~~**000000000000000000* 4,0,0,0,0,0,0,1,1,1,1,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,0,0,4,
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
*000000000000~~~~~~~~~~~~~~~00000000000* 4,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,4,
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
*000~~~~~~~~~~~~~~0000~~~~~0000~~~~~000* 4,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,4,
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
*000~~~~~0000~~~~~0000~~~~~~~~~~~~~~000* 4,0,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,4,
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
*000~~~~~~~~~~~~~~0000~~~~~0000~~~~~000* 4,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,4,
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
*000~~~~~0000~~~~~0000~~~~~~~~~~~~~~000* 4,0,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,4,
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
*00000000000000000000000000000000000000* 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,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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,1,1,

View File

@ -13,13 +13,38 @@ r 12 20
r 28 20 r 28 20
r 25 24 r 25 24
r 30 28 r 30 28
P 20 12
@ 19 12
@ 21 12
Y 19 4
Y 8 4
@ 5 24
@ 7 24
Y 34 24
Y 32 24
P 26 28
P 26 28
P 26 28
P 26 28
P 27 28
P 27 28
P 27 28
P 27 28
P 27 28
P 27 28
Y 15 8
Y 26 8
@ 14 8
@ 27 8
@ 33 16
Y 7 16
endmonsters endmonsters
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,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y 12 11
Y 16 11
Y 29 11
P 20 28
P 20 28
P 20 28
P 34 28
P 34 28
P 34 28
P 34 28
P 7 28
P 7 28
P 7 28
P 7 28
endmonsters endmonsters
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,

View File

@ -2,41 +2,66 @@ tileset green
bg 0 bg 0
hurryup 30 hurryup 30
endmaps endmaps
help
endhelp
monsters monsters
1 1 2 1 1 2
r 30 5 r 30 5
r 33 7 r 33 7
r 13 10 r 13 10
r 29 16 r 29 16
S 11 28 S 12 28
S 12 28
P 30 19
@ 6 28
@ 6 28
@ 6 28
@ 6 28
@ 2 28
@ 2 28
@ 2 28
@ 2 28
@ 2 28
@ 15 28
@ 15 28
@ 15 28
@ 15 28
@ 15 28
Y 35 5
Y 28 5
@ 20 2
Y 21 2
Y 18 2
Y 6 10
Y 10 10
endmonsters endmonsters
**************************************** 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
*00000000000000000000000000000000000000* 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,
*000000000000000000000000b0000000000000* 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,
*~~~~~~~\00000000/~~~~\0000000000000000* 4,1,1,1,1,1,1,1,3,0,0,0,0,0,0,0,0,2,1,1,1,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
*********\000000/******\000000000000000* 4,4,4,4,4,4,4,4,4,3,0,0,0,0,0,0,2,4,4,4,4,4,4,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
**********\0000/********\00000000000000* 4,4,4,4,4,4,4,4,4,4,3,0,0,0,0,2,4,4,4,4,4,4,4,4,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
***********\00/**********~~~~~~~000~{{{* 4,4,4,4,4,4,4,4,4,4,4,3,0,0,2,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,0,0,0,1,16,16,16,4,
*000000000000000000********00000000*}}}* 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,4,15,15,15,4,
*000000000000000000********{{{{{~~~*}}}* 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,16,16,16,16,16,1,1,1,4,15,15,15,4,
*000000000000000000********}}}}}****}}}* 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,15,15,15,15,15,4,4,4,4,15,15,15,4,
*0000000000000000000000****}}}}}****}}}* 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,15,15,15,15,15,4,4,4,4,15,15,15,4,
*~~-~~~~~~~~~~~~~{{{{{{****}}}}}****}}}* 4,1,1,8,1,1,1,1,1,1,1,1,1,1,1,1,1,16,16,16,16,16,16,4,4,4,4,15,15,15,15,15,4,4,4,4,15,15,15,4,
***=***************}}}}****}}}}}****}}}* 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,15,15,15,15,4,4,4,4,15,15,15,15,15,4,4,4,4,15,15,15,4,
***=****************}}}}}}}}}}}}}}}}}}}* 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,4,
***=****************}}}}}}}}}}}}}}}}}}}* 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,4,
***=****************}}}}}}}}}}}}}}}}}}}* 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,4,
***=*****************}}}}}}}}0}}}}}}}}}* 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,4,
***=*****************}}}}}}*****}}}}}}}* 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,15,15,15,15,15,15,1,1,1,1,1,15,15,15,15,15,15,15,4,
***=*****************}}}}}}*000*}}}}}}}* 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,15,15,15,15,15,15,4,12,0,0,4,15,15,15,15,15,15,15,4,
***=*****************}}}}}}*.00*}}}}}}}* 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,15,15,15,15,15,15,4,13,0,0,4,15,15,15,15,15,15,15,4,
***=*****************}}}}}}*~{~*}}}}}}}* 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,15,15,15,15,15,15,4,1,16,1,4,15,15,15,15,15,15,15,4,
***=*****************}}}}}}}}}}}}}}}}}}* 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,4,
***=*****************}}}}}}}}}}}}}}}}}}* 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,4,
***=******************}}}}}}}}}}}}}}}}}* 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,4,
***=*******************}}}}}}}}}}}}}}}** 4,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,1,4,
*00=000000000000000*****}}}}}}}}}}}}}*** 4,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,1,15,15,15,15,15,15,15,15,15,15,15,15,15,1,4,4,
*00=000000000000000******}}}}}}}}}}}**** 4,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,1,15,15,15,15,15,15,15,15,15,15,15,1,4,4,4,
*00=00000000000000;*******}}}}}}}}}***** 4,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,1,15,15,15,15,15,15,15,15,15,1,4,4,4,4,
*00=00000000000000:********}}}}}}}****** 4,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,4,4,4,4,4,4,4,1,15,15,15,15,15,15,15,1,4,4,4,4,4,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,4,4,4,4,4,4,