diff --git a/defs.h b/defs.h index 5601c7d..4a97686 100644 --- a/defs.h +++ b/defs.h @@ -83,13 +83,41 @@ #define NETSPEED 9 // how fast the player's net moves #define POWERUPTIME 15 // # secs before a powerup appears + +#define CANNONSIZE 10 + #define ICESPEED 2 // how fast a level turns to ice +#define MONJUMPSPEED 5 // how high monsters jump + +#define BOMBSHAKETIME 100 // time for screen will shake after a bomb +#define RATSHAKETIME 50 // shake time when king rat is stunned + +#define BOSSFLASHTIME 15 // how long bosses flash white for when hit +#define BOSSDIETIME 150 // how long bosses flash when dead + #define BELLTIME 20 // how long the bell flash lasts #define CLOCKTIME 10 // how many seconds a clock lasts +// king rat +#define KR_WALKTIME 100 +#define KR_STUNTIME 150 +//#define KR_WALKTIME 30 +#define KR_MAXJUMP 15 // max initial jumpspeed +#define KR_NUMJUMPS 5 +#define KR_CHARGESPEED 8 +// king rat states +#define KRS_WALK 0 +#define KRS_JUMP 1 +#define KRS_WAITFORTOP 2 +#define KRS_FALL 3 +#define KRS_CHARGEWAIT 4 +#define KRS_CHARGE 5 +#define KRS_STUN 6 + + // bell states #define BELL_DONESOUND 1 #define BELL_DONEFLASH 2 @@ -124,7 +152,7 @@ /* enums */ /* sounds */ -#define MAXFX 26 +#define MAXFX 33 #define FX_SHOOT 0 #define FX_SLAM 1 #define FX_KILL 2 @@ -151,6 +179,13 @@ #define FX_ARMOR 23 #define FX_FREEZE 24 #define FX_ICEBREAK 25 +#define FX_BOSSWINDUP 26 +#define FX_BOSSCHARGE 27 +#define FX_BOSSDIE 28 +#define FX_BOSSHIT 29 +#define FX_BOSSWALL 30 +#define FX_SPRAY 31 +#define FX_CANNON 32 // Slope types #define S_NOTSOLID 0 @@ -158,7 +193,7 @@ #define S_SLOPE 2 // Sprite types -#define MAXPTYPES 44 +#define MAXPTYPES 49 #define P_PLAYER 0 #define P_RAT 1 #define P_CHEESE 2 @@ -167,7 +202,7 @@ #define P_BIGNET 5 #define P_BEE 6 #define P_SPIDER 7 -#define P_CLOUD 8 +#define P_BLACKCLOUD 8 #define P_ICECREAM 9 #define P_CHIPS 10 #define P_BURGER 11 @@ -177,9 +212,9 @@ #define P_FLOWERYELLOW 15 #define P_FLOWERRED 16 #define P_FLOWERPURPLE 17 -#define P_COKE 18 +#define P_COKE 18 #define P_GEMRED 19 -#define P_PUFF 20 +#define P_PUFF 20 #define P_GEMYELLOW 21 #define P_GEMPURPLE 22 #define P_POWERUPPOS 23 @@ -203,6 +238,11 @@ #define P_BELL 41 #define P_CLOCK 42 #define P_SNOWMAN 43 +#define P_PINKCLOUD 44 +#define P_KINGRAT 45 +#define P_SPRAY 46 +#define P_CANNONPOWERUP 47 +#define P_CANNON 48 // powerups #define PW_NONE 0 @@ -212,6 +252,12 @@ #define PW_RINGWALK 4 // points for walking #define PW_RINGJUMP 5 // points for jumping #define PW_CLOCK 6 // freeze time +#define PW_SPRAYUP 7 // fly spray +#define PW_SPRAYDOWN 8 // fly spray +#define PW_CANNON 9 // fusion cannon +#define PW_CANNONFIRE 10 // fusion cannon firing +// "virtual" powerup for bosses +#define PW_RATSHAKE 20 // shake screen horizontally // Frame names #define F_WALK1 0 @@ -240,8 +286,10 @@ #define LV_CLEAR 1 // all monsters dead #define LV_WAIT 2 // LEVEL COMPLETE displayed, delay to collect fruits #define LV_FINAL 3 // delay 5 seconds more... -#define LV_NEXTLEV 4 // end of delay, nextlevel() in 5 seconds -#define LV_GAMEOVER 6 // No lives left. +#define LV_CLOUD 4 // cloud appearing +#define LV_CLOUDLOOP 6 // cloud looping +#define LV_NEXTLEV 7 // cloud done , nextlevel() in 5 seconds +#define LV_GAMEOVER 8 // No lives left. // movement types #define MV_NONE 0 // didn't move @@ -280,6 +328,12 @@ #define D_FINAL (4) // ACTUALLY dead, remove the sprite +/// pink cloud +#define PCGROWSPEED (0.02) // how much to grow each turn (0.1 - 0.999) +#define PCSHRINKSPEED (0.06) // how much to shrink each turn (0.1 - 0.999) +#define PCTURN (5) // turn speed while looping + + // teleporting states #define TP_SHRINKING (1) // entering teleporter @@ -293,6 +347,15 @@ #define D_UP (-2) #define D_DOWN (2) +// boss health bar +#define HEALTHBARY 480-100 // y position of health bar +#define HEALTHBARGAP 2 // gap between health bars +// frames of the bar +#define HEALTHFRAMES 3 +#define HF_GREEN 0 +#define HF_YELLOW 1 +#define HF_RED 2 + /* data structures */ typedef struct mapping_s { @@ -342,7 +405,8 @@ typedef struct level_s { int id; int bgtileid; char bgfile[MIDBUFLEN]; - char name[SMALLBUFLEN]; + char name[MIDBUFLEN]; + char filename[MIDBUFLEN]; int map[LEVELW*LEVELH]; int map2[LEVELW*LEVELH]; // second map layer int tileframe[LEVELW*LEVELH]; // tracks frame numbers for tiles @@ -366,8 +430,8 @@ level_t *level; typedef struct levelentry_s { int id; - char *filename; - char *desc; + char filename[MIDBUFLEN]; + char desc[MIDBUFLEN]; } levelentry_t; typedef struct sprite_s { @@ -381,7 +445,6 @@ typedef struct sprite_s { // CURRENT STATE // player only - int lives; int recoiling; // this happens after you get hit while wearing armour int slamming; // are we slamming our net (player only) double slamangle;// are what point around is our net? @@ -412,17 +475,27 @@ typedef struct sprite_s { SDL_Surface *iceimg; // Image to blit for ice int willbecome; // what fruit this will become when dead int angry; // is this sprite in ANGRY mode for its AI? + // normally this is a bool, but for monsters we + // it for flashing them when they are hit. in this + // case it will be a number. struct sprite_s *caughtby; // who has us in their net? NULL if nobody int quickdie; // die without bouncing? int caughtstate; // are we caught by a net? being pulled in or caught? int jumptimer; // delay before we will jump + int willjumpspeed; // how fast we'll jump when jumptimer expires int flies; // can we fly? double xs,ys; // bounce direction after death struct sprite_s *bullet; // pointer to our bullet struct sprite_s *owner; // if we ARE a bullet, pointer to the sprite who made us char name[MIDBUFLEN]; // Help text for help icons, otherwise not really used outside of debugging + // pinkcloud only + double size; + double rotated; + double angle; + // player and monster + int lives; // only for player and bosses int swimming; // are we in the water? int falling; // are we falling? int dropping; // are we purposely dropping through solid ground? @@ -461,7 +534,9 @@ imageset_t imageset[MAXPTYPES]; /* external globals */ extern SDL_Color black; extern SDL_Surface *screen, *temps, *levelbg, *head, *headsmall, *icecube; -extern sprite_t *sprite, *lastsprite, *player; +extern SDL_Surface *healthbar[]; +extern SDL_Surface *greenbox; +extern sprite_t *sprite, *lastsprite, *player, *boss; extern level_t *curlevel; extern tiletype_t fakeblock; extern int gtime; @@ -485,6 +560,7 @@ extern int cheat; extern int nexthurryup; extern levelentry_t levelentry[]; extern int numlevels; +extern int maxlevid; extern char *deathtext[]; extern char *bifftext[]; diff --git a/doco/adding_a_sprite.txt b/doco/adding_a_sprite.txt index eae480c..d1e440b 100644 --- a/doco/adding_a_sprite.txt +++ b/doco/adding_a_sprite.txt @@ -2,10 +2,12 @@ - in defs.h: add P_ entry - in shared.c: add score value in setdefaults if applicable - in shared.c: add loadspriteimage() line(s) in loadimagesets() -- in shared.c: IF NOT AN EFFECT: add entry to monstertochar -- in shared.c: IF NOT AN EFFECT: add entry to chartomonster - in shared.c: update isflower(), isfruit(), isbullet(), iseffect(); +- in shared.c: update isnettable() - in shared.c: IF A GEM: update flowertogem() - in edit.c: update isplacable() -- in rc.c: update ismonster() +- in shared.c: update ismonster() - in rc.c: add monster/effect movement + +for bosses: + updated getbosshealth(),isboss() diff --git a/edit.c b/edit.c index df26b17..244297b 100644 --- a/edit.c +++ b/edit.c @@ -33,6 +33,29 @@ int curlevelnum; int skipto = -1; int layer = 1; // which layer we are editting, either 1 or 2 +int layertransparent = B_TRUE; + +SDL_Surface *whitebox; + +SDL_Color red = {255, 0, 0, 0}; +SDL_Color black = {0, 0, 0, 0}; +SDL_Color blue = {0, 0, 255, 0}; +SDL_Color cyan = {0, 255, 255, 0}; +SDL_Color white = {255, 255, 255, 0}; +SDL_Color grey = {210, 210, 210, 0}; +SDL_Color grey2 = {70, 70, 70, 0}; +SDL_Color green = {0, 255, 0, 0}; +SDL_Color yellow = {255, 255, 0, 0}; + +int state; + +char tempm[BUFLEN]; + +char statustext[BUFLEN]; +SDL_Color *statustextcol = &white; + +// for level list mode +int oldy = -1; int main (int argc, char **argv) { Uint8 *keys; @@ -88,6 +111,7 @@ int main (int argc, char **argv) { exit(1); } + atexit(cleanup); #ifdef OPENGL @@ -109,6 +133,9 @@ int main (int argc, char **argv) { return 1; } + strcpy(statustext, ""); + statustextcol = &white; + fakeblock.id = T_LAND; strcpy(fakeblock.name,"Fake"); for (i = 0; i < TILEW; i++) { @@ -119,11 +146,21 @@ int main (int argc, char **argv) { fakeblock.numframes = 1; fakeblock.next = NULL; fakeblock.prev = NULL; + + + // coloured box surface (for tiles on non-active layer) + whitebox = SDL_CreateRGBSurface(SDL_SWSURFACE, + TILEW,TILEH, + screen->format->BitsPerPixel, screen->format->Rmask, + screen->format->Gmask,screen->format->Bmask, 0); + SDL_FillRect(whitebox, NULL, SDL_MapRGB(whitebox->format, 0, 0, 255)); + SDL_SetAlpha(whitebox, SDL_SRCALPHA,100); + /* load fonts */ TTF_Init(); - sprintf(filename, "gamefont.ttf"); + sprintf(filename, "editfont.ttf"); for (i = 1; i < MAXLETTERHEIGHT; i++) { font[i] = TTF_OpenFont(filename,i); if (!font[i]) { @@ -133,6 +170,8 @@ int main (int argc, char **argv) { } + state = LS_EDIT; + if (loadlevel(curworld,curlevelnum)) { return 1; } @@ -157,145 +196,195 @@ int main (int argc, char **argv) { /* check for mouse actions */ mb = SDL_GetMouseState(&mx,&my); if (mb & SDL_BUTTON(1)) { // lmb - if ((mx >= PALX) && (my < SPALY)) { // over tile palette - tiletype_t *tt; - int x = PALX,y = PALY; - seltile = NULL; - /* get tile number */ - for (tt = tiletype; tt != NULL; tt = tt->next) { - if (isplacabletile(tt->id)) { - // is mouse over this one? - if ((mx >= x) && (my >= y) && (mx <= x+TILEW-1) && (my <= y+TILEH-1)) { - seltile = tt; - selsprite = -1; - break; - } else { - // check next one - x += TILEW; - if (x >= EDITORW) { - x = PALX; - y += TILEH; - } - } - } - } - // redraw palette with new selection - drawpalette(); - } else if ((mx >= PALX) && (my > SPALY)) { // over sprite palette - int p; - int x = SPALX, y = SPALY; - int maxh = 0; - /* get sprite id */ - selsprite = -1; - - for (p = 0; p < MAXPTYPES; p++) { - if (isplacablesprite(p)) { - SDL_Surface *firstimg; - int w,h; - - /* select images */ - firstimg = imageset[p].img[F_WALK1]; - w = firstimg->w; - h = firstimg->h; - if (h > maxh) maxh = h; - - // is mouse over it? - if ((mx >= x) && (my >= y) && (mx <= x+w-1) && (my <= y+h-1)) { - selsprite = p; - seltile = NULL; - break; - } else { - // check next one - x += w; - if (x >= EDITORW-TILEW) { - x = SPALX; - y += maxh; - maxh = 0; - } - } - } - } - // redraw palette with new selection - drawpalette(); - } else if (mx < PALX) { // over map - int x,y; - if (seltile != NULL) { - /* place selected tile at mouse pos */ - x = (mx / TILEW); - y = (my / TILEH); - if (layer == 1) { - curlevel->map[y*LEVELW+x] = seltile->uniqid; - curlevel->tileframe[y*LEVELW+x] = 0; - } else { - // if there's nothing at layer1, it goes there - //if (curlevel->map[y*LEVELW+x] == T_BLANK) { - // printf("falling to layer 1\n"); - // curlevel->map[y*LEVELW+x] = seltile->uniqid; - // curlevel->tileframe[y*LEVELW+x] = 0; - //} else { - curlevel->map2[y*LEVELW+x] = seltile->uniqid; - //} - } - // redraw tile and sprites - drawtile(screen,x,y); - drawsprites(); - - modified = B_TRUE; - } else if (selsprite >= 0) { - int placed = B_FALSE; - - x = (mx / TILEW); - y = (my / TILEH); - - /* checks */ - // can only have one player/powerup pos - if ((selsprite == P_PLAYER) || (selsprite == P_POWERUPPOS)) { - /* does a player start pos already exist? */ - sprite_t *s; - for (s = sprite ; s ; s = s->next) { - if (s->id == selsprite) { - // if so, just move it - s->x = x*TILEW+(TILEW/2); - s->y = y*TILEH+TILEH; - placed = B_TRUE; - modified = B_TRUE; - // get rid of old sprite - draweditorlevel(); - drawsprites(); - } - } - } else { // is there a monster already there? - sprite_t *s; - for (s = sprite ; s ; s = s->next) { - if (s->id == selsprite) { - if ((s->x == x*TILEW+(TILEW/2)) && (s->y == y*TILEH+TILEH)) { - /* don't place it */ - placed = B_TRUE; + if (state == LS_EDIT) { + if ((mx >= PALX) && (my < SPALY)) { // over tile palette + tiletype_t *tt; + int x = PALX,y = PALY; + seltile = NULL; + /* get tile number */ + for (tt = tiletype; tt != NULL; tt = tt->next) { + if (isplacabletile(tt->id)) { + // is mouse over this one? + if ((mx >= x) && (my >= y) && (mx <= x+TILEW-1) && (my <= y+TILEH-1)) { + seltile = tt; + selsprite = -1; + break; + } else { + // check next one + x += TILEW; + if (x >= EDITORW) { + x = PALX; + y += TILEH; } } } } - + // redraw palette with new selection + drawpalette(); + setstatustext("", &white); + } else if ((mx >= PALX) && (my > SPALY)) { // over sprite palette + int p; + int x = SPALX, y = SPALY; + int maxh = 0; + /* get sprite id */ + selsprite = -1; - if (!placed) { - if (toggletimer == 0) { - /* place selected sprite at mouse position - (locked to a tile) */ - if (selsprite == P_HELP) { - addsprite(selsprite, x*TILEW+(TILEW/2),y*TILEH+TILEH,"FILL ME IN" ); + for (p = 0; p < MAXPTYPES; p++) { + if (isplacablesprite(p)) { + SDL_Surface *firstimg; + int w,h; + + /* select images */ + firstimg = imageset[p].img[F_WALK1]; + w = firstimg->w; + h = firstimg->h; + if (h > maxh) maxh = h; + + // is mouse over it? + if ((mx >= x) && (my >= y) && (mx <= x+w-1) && (my <= y+h-1)) { + selsprite = p; + seltile = NULL; + break; } else { - addsprite(selsprite, x*TILEW+(TILEW/2),y*TILEH+TILEH,"something" ); + // check next one + x += w; + if (x >= EDITORW-TILEW) { + x = SPALX; + y += maxh; + maxh = 0; + } } - printf("added a sprite\n"); - toggletimer = 30; - modified = B_TRUE; - drawsprites(); } } + // redraw palette with new selection + drawpalette(); + setstatustext("", &white); + } else if (mx < PALX) { // over map + int x,y; + if (seltile != NULL) { + /* place selected tile at mouse pos */ + x = (mx / TILEW); + y = (my / TILEH); + if (layer == 1) { + curlevel->map[y*LEVELW+x] = seltile->uniqid; + curlevel->tileframe[y*LEVELW+x] = 0; + } else { + // if there's nothing at layer1, it goes there + //if (curlevel->map[y*LEVELW+x] == T_BLANK) { + // printf("falling to layer 1\n"); + // curlevel->map[y*LEVELW+x] = seltile->uniqid; + // curlevel->tileframe[y*LEVELW+x] = 0; + //} else { + curlevel->map2[y*LEVELW+x] = seltile->uniqid; + //} + } + // redraw tile and sprites + draweditortile(screen,x,y); + drawsprites(); + setmod(B_TRUE); + setstatustext("", &white); + } else if (selsprite >= 0) { + int placed = B_FALSE; + + x = (mx / TILEW); + y = (my / TILEH); + + /* checks */ + // can only have one player/powerup pos + if ((selsprite == P_PLAYER) || (selsprite == P_POWERUPPOS)) { + /* does a player start pos already exist? */ + sprite_t *s; + for (s = sprite ; s ; s = s->next) { + if (s->id == selsprite) { + // if so, just move it + s->x = x*TILEW+(TILEW/2); + s->y = y*TILEH+TILEH; + placed = B_TRUE; + setmod(B_TRUE); + // get rid of old sprite + draweditorlevel(); + drawsprites(); + } + } + } else { // is there a monster already there? + sprite_t *s; + for (s = sprite ; s ; s = s->next) { + if (s->id == selsprite) { + if ((s->x == x*TILEW+(TILEW/2)) && (s->y == y*TILEH+TILEH)) { + /* don't place it */ + placed = B_TRUE; + } + } + } + } + + + if (!placed) { + if (toggletimer == 0) { + /* place selected sprite at mouse position + (locked to a tile) */ + if (selsprite == P_HELP) { + addsprite(selsprite, x*TILEW+(TILEW/2),y*TILEH+TILEH,"FILL ME IN" ); + } else { + addsprite(selsprite, x*TILEW+(TILEW/2),y*TILEH+TILEH,"something" ); + } + toggletimer = 30; + setmod(B_TRUE); + drawsprites(); + sprintf(tempm, "Sprite added at %d,%d",x,y); + setstatustext(tempm, &white); + } + } + + } } - } - } + } else if (state == LS_SAVE) { + // get pos + int i; + int lev; + // get level # at mouse posj + lev = (my / (EDITTEXT + LLISTPADY)); + + if (curlevelnum != lev) { + + // REMOVE CURRENT LEVEL FROM LIST + for (i = curlevelnum; i < (numlevels-1); i++) { + levelentry[i] = levelentry[i+1]; + } + numlevels--; + if (lev > curlevelnum) { + lev--; + } + + // shuffle + for (i = numlevels; i > lev+1; i--) { + levelentry[i] = levelentry[i-1]; + } + + // insert current level at correct position (after where we clicked) + levelentry[lev+1].id = curlevel->id; + + strncpy(levelentry[lev+1].desc, curlevel->name, MIDBUFLEN); + strncpy(levelentry[lev+1].filename, curlevel->filename, MIDBUFLEN); + + numlevels++; + + curlevelnum = lev + 1; + + + /* save out level list */ + savelevellist(); + + // redraw + drawlevellist(); + + sprintf(tempm, "Level moved to position %d",curlevelnum); + setstatustext(tempm, &white); + } + }// end if LS_EDIT/LS_SAVE etc + } // end if LMB + /* check for keys */ SDL_PumpEvents(); @@ -303,130 +392,199 @@ int main (int argc, char **argv) { - if (keys[SDLK_1] || keys[SDLK_2]) { // toggle layer - if (toggletimer == 0) { - layer = 3 - layer; - printf("Now editting layer %d\n",layer); - toggletimer = 30; - } - } - - if (keys[SDLK_x]) { // delete monster - int donesomething = B_FALSE; - sprite_t *s, *nextone; - - for (s = sprite ; s ; s = nextone) { - nextone = s->next; - - /* if mouse is over this sprite */ - if ( (mx >= s->x - (s->img->w/2)) && - (mx <= s->x + (s->img->w/2)) && - (my >= s->y - s->img->h) && - (my <= s->y )) { - // kill it - killsprite(s); - donesomething = B_TRUE; - } - } - if (donesomething) { - draweditorlevel(); - drawsprites(); - modified = B_TRUE; - } - } - if (keys[SDLK_c]) { - if (toggletimer == 0) { - clearlevel(); - toggletimer = 30; - } - } - - - - /* exit direction */ - if (toggletimer == 0) { - if (keys[SDLK_h]) { - printf("Exit direction set to LEFT.\n"); - curlevel->exitdir = D_LEFT; - toggletimer = 30; - modified = B_TRUE; - } - if (keys[SDLK_j]) { - printf("Exit direction set to DOWN.\n"); - curlevel->exitdir = D_DOWN; - toggletimer = 30; - modified = B_TRUE; - } - if (keys[SDLK_k]) { - printf("Exit direction set to UP.\n"); - curlevel->exitdir = D_UP; - toggletimer = 30; - modified = B_TRUE; - } - if (keys[SDLK_l]) { - printf("Exit direction set to RIGHT.\n"); - curlevel->exitdir = D_RIGHT; - toggletimer = 30; - modified = B_TRUE; - } - } - - /* next level */ - if (keys[SDLK_RIGHT]) { - if (toggletimer == 0) { - printf("Skipping to next level.\n"); - curlevelnum++; - if ((curlevelnum >= numlevels) || loadlevel(curworld,curlevelnum)) { - char tempbuf[BUFLEN]; - clearlevel(); - numlevels++; - sprintf(tempbuf,"new_level%d.dat",curlevelnum); - levelentry[curlevelnum].filename = strdup(tempbuf); - sprintf(tempbuf,"NEW LEVEL"); - levelentry[curlevelnum].desc = strdup(tempbuf); - printf("created new level '%s'\n",levelentry[curlevelnum].filename); - } - draweditorlevel(); - drawsprites(); - toggletimer = 30; - } - } - /* prev level */ - if (keys[SDLK_LEFT]) { - if (toggletimer == 0) { - if (curlevelnum > 1) { - printf("Skipping to previous level.\n"); - curlevelnum--; - if (loadlevel(curworld,curlevelnum)) { - printf("creating new level\n"); - clearlevel(); - } + if (state == LS_EDIT) { + if (keys[SDLK_1] || keys[SDLK_2]) { // toggle layer + if (toggletimer == 0) { + layer = 3 - layer; draweditorlevel(); drawsprites(); + sprintf(tempm, "Now editting layer %d",layer); + setstatustext(tempm, &green); toggletimer = 30; } } - } - - if (keys[SDLK_RETURN]) { - if (toggletimer == 0) { - SDL_WM_ToggleFullScreen(screen); - toggletimer = 50; + if (keys[SDLK_t]) { + if (toggletimer == 0) { + if (layertransparent) layertransparent = B_FALSE; + else layertransparent = B_TRUE; + draweditorlevel(); + drawsprites(); + sprintf(tempm, "Transparent layers now %s",layertransparent ? "ON" : "OFF"); + setstatustext(tempm, &green); + toggletimer = 15; + } } - } - if (keys[SDLK_ESCAPE]) { - return 1; + + if (keys[SDLK_x]) { // delete monster + int donesomething = B_FALSE; + sprite_t *s, *nextone; + + for (s = sprite ; s ; s = nextone) { + nextone = s->next; + + /* if mouse is over this sprite */ + if ( (mx >= s->x - (s->img->w/2)) && + (mx <= s->x + (s->img->w/2)) && + (my >= s->y - s->img->h) && + (my <= s->y )) { + // kill it + killsprite(s); + donesomething = B_TRUE; + } + } + if (donesomething) { + draweditorlevel(); + drawsprites(); + setmod(B_TRUE); + } + } + if (keys[SDLK_c]) { + if (toggletimer == 0) { + clearlevel(); + toggletimer = 30; + } + } + + + + /* exit direction */ + if (toggletimer == 0) { + if (keys[SDLK_h]) { + curlevel->exitdir = D_LEFT; + toggletimer = 30; + setmod(B_TRUE); + sprintf(tempm, "Exit direction set to DOWN"); + setstatustext(tempm, &white); + } + if (keys[SDLK_j]) { + curlevel->exitdir = D_DOWN; + toggletimer = 30; + setmod(B_TRUE); + sprintf(tempm, "Exit direction set to DOWN"); + setstatustext(tempm, &white); + } + if (keys[SDLK_k]) { + curlevel->exitdir = D_UP; + toggletimer = 30; + setmod(B_TRUE); + sprintf(tempm, "Exit direction set to DOWN"); + setstatustext(tempm, &white); + } + if (keys[SDLK_l]) { + curlevel->exitdir = D_RIGHT; + toggletimer = 30; + setmod(B_TRUE); + sprintf(tempm, "Exit direction set to DOWN"); + setstatustext(tempm, &white); + } + } + + /* new level */ + if (keys[SDLK_n]) { + if (toggletimer == 0) { + newlevel(); + draweditorlevel(); + drawsprites(); + toggletimer = 30; + setmod(B_FALSE); + setstatustext("Created new level.", &white); + } + } + + /* next level */ + if (keys[SDLK_RIGHT]) { + if (toggletimer == 0) { + if (curlevelnum < (numlevels-1)) { + curlevelnum++; + loadlevel(curworld, curlevelnum); + draweditorlevel(); + drawsprites(); + toggletimer = 30; + setmod(B_FALSE); + setstatustext("Skipping to next level.", &white); + } + } + } + /* prev level */ + if (keys[SDLK_LEFT]) { + if (toggletimer == 0) { + if (curlevelnum > 1) { + curlevelnum--; + loadlevel(curworld, curlevelnum); + draweditorlevel(); + drawsprites(); + toggletimer = 30; + setmod(B_FALSE); + setstatustext("Skipping to previous level.", &white); + } + } + } + + if (keys[SDLK_RETURN]) { + if (toggletimer == 0) { + SDL_WM_ToggleFullScreen(screen); + toggletimer = 50; + } + } + if (keys[SDLK_q]) { + return 1; + } + } else if (state == LS_SAVE) { + if (keys[SDLK_ESCAPE]) { + state = LS_EDIT; + draweditorlevel(); + drawsprites(); + } + } + + + /* levellist */ + if (keys[SDLK_z]) { + state = LS_SAVE; + drawlevellist(); } /* SAVE LEVEL */ if (keys[SDLK_s]) { if (modified) { savelevel(curworld,curlevelnum); - modified = B_FALSE; + setmod(B_FALSE); } } + // line to selected position + if (state == LS_SAVE) { + char temps[MIDBUFLEN]; + int lev, ypos; + // get level # at mouse posj + lev = my / (EDITTEXT + LLISTPADY); + ypos = lev * (EDITTEXT + LLISTPADY); + + if (oldy != ypos) { + int textx = EDITMAPW - 200; + + sprintf(temps, "Insert level here"); + + // clear old line + if (oldy != -1) { + drawline16(screen, LLISTX, oldy, EDITMAPW-LLISTX, oldy, black ); + } + + // clear old text + writetext(screen, textx, oldy-EDITTEXT, temps, EDITTEXT, &black); + + // draw new line + drawline16(screen, LLISTX, ypos, EDITMAPW-LLISTX, ypos, green ); + oldy = ypos; + + // draw new text + writetext(screen, textx, ypos-EDITTEXT, temps, EDITTEXT, &green); + + } + + } + flip(); if (++timer == 100) timer = 0; @@ -448,6 +606,94 @@ void cleanup(void) { SDL_Quit(); } +void drawstatus(void) { + char temps[MIDBUFLEN]; + SDL_Rect area; + int wid; + SDL_Color *col; + + // clear status + area.x = STATUSX; + area.y = STATUSY; + area.w = EDITORW; + area.h = EDITORH-STATUSY; + SDL_FillRect(screen, &area, SDL_MapRGB(screen->format, 0, 0, 0)); + + // show level num + sprintf(temps, "Level %d",curlevelnum); + wid = writetext(screen, area.x, area.y, temps, EDITTEXT, &white); + area.x += (wid + STATUSPAD); + // show level name + sprintf(temps, "%s",curlevel->filename); + wid = writetext(screen, area.x, area.y, temps, EDITTEXT, &white); + area.x += (wid + STATUSPAD); + // show level desc + sprintf(temps, "\"%s\"",curlevel->name); + wid = writetext(screen, area.x, area.y, temps, EDITTEXT, &blue); + area.x += (wid + STATUSPAD); + // show bg file + sprintf(temps, "bgfile: %s",curlevel->bgfile); + wid = writetext(screen, area.x, area.y, temps, EDITTEXT, &white); + area.x += (wid + STATUSPAD); + // show exit dir + sprintf(temps, "Exit dir: "); + switch (curlevel->exitdir) { + case D_RIGHT: strcat(temps, "RIGHT"); break; + case D_LEFT: strcat(temps, "LEFT"); break; + case D_UP: strcat(temps, "UP"); break; + case D_DOWN: strcat(temps, "DOWN"); break; + default: strcat(temps, "???"); break; + } + wid = writetext(screen, area.x, area.y, temps, EDITTEXT, &white); + area.x += (wid + STATUSPAD); + + // show layer + ///area.x = (EDITMAPW/4)*3; // 3/4 across + area.x = 0; + area.y += (EDITTEXT ); + + if (layer == 1) { + col = &green; + } else { + if (layertransparent) { + col = &grey2; + } else { + col = &white; + } + } + sprintf(temps, "Layer 1"); + wid = writetext(screen, area.x, area.y, temps, EDITTEXT, col); + + if (layer == 2) { + col = &green; + } else { + if (layertransparent) { + col = &grey2; + } else { + col = &white; + } + } + area.x += (wid + STATUSPAD); + sprintf(temps, "Layer 2"); + wid = writetext(screen, area.x, area.y, temps, EDITTEXT, col); + + // show modified status + area.x = EDITMAPW - 50; + sprintf(temps, "MODIFIED"); + if (modified) { + col = &red; + } else { + col = &grey2; + } + wid = writetext(screen, area.x, area.y, temps, EDITTEXT, col); + + // Move down + area.y += (EDITTEXT); + area.x = 0; + + // status text + wid = writetext(screen, area.x, area.y, statustext, EDITTEXT, statustextcol); +} void draweditorlevel(void) { @@ -458,17 +704,19 @@ void draweditorlevel(void) { temps = NULL; } temps = SDL_CreateRGBSurface(SDL_SWSURFACE, - 640, 480, + 640, 480 + EDITTEXT*4, screen->format->BitsPerPixel, screen->format->Rmask, screen->format->Gmask,screen->format->Bmask, screen->format->Amask); for (x = 0; x < LEVELW; x++) { for (y = 0; y < LEVELH; y++) { - drawtile(screen,x,y); + draweditortile(screen,x,y); } } + drawstatus(); + SDL_UpdateRect(screen, 0, 0, EDITORW, EDITORH); } @@ -615,7 +863,7 @@ int savelevel(int wnum, int lnum) { fprintf(f, "hurryup %d\n",level->hurryuptime); /* no mappings */ - fprintf(f, "endmaps\n"); + //fprintf(f, "endmaps\n"); /* help text */ fprintf(f, "help\n"); @@ -631,10 +879,11 @@ int savelevel(int wnum, int lnum) { for (s = sprite; s ; s = s->next) { int mx,my; char mid; - mid = monstertochar(s->id); + //mid = monstertochar(s->id); + mid = s->id; mx = (s->x - (TILEW/2)) / TILEW; my = (s->y - TILEH/2) / TILEH; - fprintf(f,"%c %d %d\n",mid,mx,my); + fprintf(f,"%d %d %d\n",mid,mx,my); } fprintf(f, "endmonsters\n"); @@ -662,7 +911,8 @@ int savelevel(int wnum, int lnum) { fclose(f); - printf("Level saved to '%s'\n",filename); + sprintf(tempm,"Level saved to '%s'",filename); + setstatustext(tempm, &green); return 0; } @@ -688,10 +938,11 @@ void clearlevel(void) { curlevel->map[offset] = T_BLANK; } curlevel->map2[offset] = T_BLANK; - drawtile(screen,x,y); + draweditortile(screen,x,y); } } + modified = B_TRUE; } @@ -708,7 +959,8 @@ int isplacablesprite(int sid) { case P_SPEED: case P_NUMNETS: case P_BIGNET: - case P_CLOUD: + case P_BLACKCLOUD: + case P_PINKCLOUD: case P_SPIT: case P_PUFF: case P_SMASH: @@ -724,7 +976,195 @@ int isplacablesprite(int sid) { case P_GEMRED: case P_GEMYELLOW: case P_GEMPURPLE: + case P_SPRAY: + case P_CANNONPOWERUP: + case P_CANNON: return B_FALSE; } return B_TRUE; } + +// like drawtile but adjusts transparncy based on current layer +void draweditortile(SDL_Surface *where, int x, int y) { + SDL_Rect area; + tiletype_t *tt; + int frame; + int offset; + SDL_Surface *greyim, *temps; + + if ((x < 0) || (y < 0) || (x >= LEVELW) || (y >= LEVELH)) { + return; + } + + area.x = x * TILEW; + area.y = y * TILEH; + area.w = TILEW; + area.h = TILEH; + + + + + + + + /* draw blank tile first */ + tt = gettile(curlevel->bgtileid); + SDL_BlitSurface(levelbg, &area, where, &area); + + /* figure out what the layer1 tile is */ + offset = y*LEVELW+x; + tt = gettile(curlevel->map[offset]); + frame = curlevel->tileframe[offset]; + + + // get greyimnal layer1 image + temps = rotozoomSurfaceXY(tt->img[frame], 0, 1, 1, 0); + // paste grey one on top + //SDL_BlitSurface(whitebox, NULL, greyim, NULL); + SDL_SetAlpha(temps, SDL_SRCALPHA, 50); + greyim = SDL_DisplayFormat(temps); + SDL_FreeSurface(temps); + + + + /* now draw real one */ + if (tt->id != curlevel->bgtileid) { + if (layertransparent && (layer == 2)) { // greyed one + SDL_BlitSurface(greyim, NULL, where, &area); + } else { + SDL_BlitSurface(tt->img[frame], NULL, where, &area); + } + } + + SDL_FreeSurface(greyim); + + /* now draw layer2 if it exists */ + if (curlevel->map2[offset] != T_BLANK) { + tt = gettile(curlevel->map2[offset]); + if (tt->id != curlevel->bgtileid) { + + // there is a second layer. + // generate greyed version... + // get greyimnal layer2 image + temps = rotozoomSurfaceXY(tt->img[frame], 0, 1, 1, 0); + // paste grey one on top + //SDL_BlitSurface(whitebox, NULL, greyim, NULL); + SDL_SetAlpha(temps, SDL_SRCALPHA, 50); + greyim = SDL_DisplayFormat(temps); + SDL_FreeSurface(temps); + + if (layertransparent && (layer == 1)) { // greyed one + SDL_BlitSurface(greyim, NULL, where, &area); + } else { + SDL_BlitSurface(tt->img[frame], NULL, where, &area); + } + + } + + SDL_FreeSurface(greyim); + } + +} + +int writetext(SDL_Surface *where, int x, int y, char *text, int size, SDL_Color *col) { + SDL_Surface *temps; + SDL_Rect area; + int wid; + + if (strlen(text) <= 0) { + return 0; + } + + temps = TTF_RenderText_Solid(font[size], text, *col); + area.x = x; + area.y = y; + area.w = 0; + area.h = 0; + + SDL_BlitSurface(temps, NULL, where, &area); + + wid = temps->w; + + SDL_FreeSurface(temps); + return wid; + +} + +void setmod(int yesno) { + int oldmod; + + oldmod = modified; + if (yesno) { + modified = B_TRUE; + } else { + modified = B_FALSE; + } + // update status bar + if (oldmod != modified) { + drawstatus(); + } +} + +void drawlevellist(void) { + int i; + char temps[MIDBUFLEN]; + SDL_Rect area; + SDL_Color *col; + + // clear map + area.x = 0; + area.y = 0; + area.w = EDITMAPW; + area.h = EDITMAPH; + SDL_FillRect(screen, &area, SDL_MapRGB(screen->format, 0, 0, 0)); + + // draw level list + area.x = LLISTX; + area.y = 0; + area.w = 0; + area.h = 0; + for (i =1; i < numlevels; i++) { + if (i == curlevelnum) { + col = &green; + } else { + col = &white; + } + sprintf(temps, "%d. %s (%s)",levelentry[i].id, levelentry[i].desc, levelentry[i].filename); + writetext(screen, area.x, area.y, temps, EDITTEXT, col); + area.y += (EDITTEXT + LLISTPADY); + } +} + + +void newlevel(void) { + char tempbuf[BUFLEN]; + + curlevelnum = numlevels; + + clearlevel(); + + maxlevid++; + sprintf(tempbuf,"level%d.dat",maxlevid); + sprintf(curlevel->filename, tempbuf); + strncpy(levelentry[curlevelnum].filename, tempbuf, MIDBUFLEN); + sprintf(tempbuf,"NEW LEVEL"); + sprintf(curlevel->name, tempbuf); + strncpy(levelentry[curlevelnum].desc, tempbuf, MIDBUFLEN); + curlevel->id = maxlevid; + levelentry[curlevelnum].id = maxlevid; + + + sprintf(tempm,"Made new level '%s'\n",levelentry[curlevelnum].filename); + setstatustext(tempm, &green); + + numlevels++; + + // save list + savelevellist(); +} + +void setstatustext(char *text, SDL_Color *col) { + strncpy(statustext, text, BUFLEN); + statustextcol = col; + drawstatus(); +} diff --git a/edit.h b/edit.h index 968ddbc..9c70993 100644 --- a/edit.h +++ b/edit.h @@ -1,21 +1,45 @@ -// Editor specific macros -#define EDITORW 800 -#define EDITORH 480 - // location of tile palette in editor #define PALX 640 #define PALY 0 -#define PALW (EDITORW-PALX) -#define PALH (EDITORH/2)-1 +#define PALW (EDITMAPW-PALX) +#define PALH (EDITMAPH/2)-1 + +#define EDITTEXT 12 +#define EDITLINE (EDITTEXT + 1) + + +// MAP +#define EDITMAPW 640 // TODO: fix +#define EDITMAPH 480 + +// +#define EDITORW 800 +#define EDITORH EDITMAPH + (EDITTEXT*4) // location of sprite palette in editor #define SPALX 640 -#define SPALY (EDITORH/2) +#define SPALY PALH #define SPALW (EDITORW-PALX) #define SPALH (EDITORH/2)-1 + +#define STATUSX 0 +#define STATUSY EDITMAPH + +#define STATUSPAD 10 + +#define LLISTPADY 2 +#define LLISTX 50 + + +// level states +#define LS_EDIT 0 +#define LS_SAVE 1 + + // Editor specific functions void draweditorlevel(void); +void draweditortile(SDL_Surface *where, int x, int y); void drawpalette(void); void drawsprites(void); int savelevel(int wnum, int lnum); @@ -25,3 +49,9 @@ void clearlevel(void); int isplacabletile(int tid); int isplacablesprite(int sid); +int writetext(SDL_Surface *where, int x, int y, char *text, int size, SDL_Color *col); +void drawstatus(void); +void setmod(int yesno); +void drawlevellist(void); +void newlevel(void); +void setstatustext(char *text, SDL_Color *col); diff --git a/editfont.ttf b/editfont.ttf new file mode 100644 index 0000000..754a9b7 Binary files /dev/null and b/editfont.ttf differ diff --git a/globals.h b/globals.h index 6fb8ba0..11fd91b 100644 --- a/globals.h +++ b/globals.h @@ -7,14 +7,20 @@ int musicplaying; levelentry_t levelentry[MAXLEVELS]; // level filenames etc int numlevels; +int maxlevid; + + SDL_Surface *levelbg; // level background image SDL_Surface *temps; // temporary surface SDL_Surface *screen; // the actual video screen SDL_Surface *head,*headsmall; // img in corner showing number of lives SDL_Surface *icecube; // overlaid on frozen monsters +SDL_Surface *greenbox; // for fly spray effect +SDL_Surface *healthbar[HEALTHFRAMES]; // for boss health sprite_t *sprite; // head of sprite linked list sprite_t *lastsprite; // tail of sprite linked list sprite_t *player; // pointer to the player's sprite +sprite_t *boss; // point to current boss on level (normally NULL) Mix_Music *music, *fastmusic, *normalmusic; Mix_Chunk *sfx[MAXFX]; diff --git a/levels.dat b/levels.dat index 7147635..43905c1 100644 --- a/levels.dat +++ b/levels.dat @@ -17,4 +17,5 @@ 16,level14.dat,The Chimney 19,level21.dat,Island 18,level8.5.dat,Look out above... +20,level20.dat,King Rat 99,level99.dat,TEST LEVEL diff --git a/rc.c b/rc.c index 3434d62..d7c41b6 100644 --- a/rc.c +++ b/rc.c @@ -31,6 +31,8 @@ char tempm[BUFLEN]; int playedbell; int clocktime; +int sprayalpha; // for spray effect + SDL_Surface *pausedtext, *pausedshadow; int paused; @@ -189,7 +191,7 @@ int main (int argc, char **argv) { fakeblock.numframes = 1; fakeblock.next = NULL; fakeblock.prev = NULL; - + /* load fonts */ TTF_Init(); @@ -280,7 +282,7 @@ int main (int argc, char **argv) { } else { killsprite(s); // check for level completion - countmonsters(); + checklevelend(); } } @@ -303,7 +305,7 @@ int main (int argc, char **argv) { /* when all monsters have become fruits */ for (s2 = sprite->next ; s2 ; s2 = s2->next) { if (ismonster(s2->id)) { - if (s2->id != P_CLOUD) { + if (s2->id != P_BLACKCLOUD) { mcount++; break; } @@ -321,6 +323,24 @@ int main (int argc, char **argv) { SDL_PumpEvents(); keys = SDL_GetKeyState(NULL); + if (keys[SDLK_d]) { + if (boss) { + boss->angry = BOSSFLASHTIME; + printf("hit!\n"); + } + } + if (keys[SDLK_c]) { // cheat + if (toggletimer == 0) { + // all powerups + playfx(FX_POWERUP); + player->netmax = 4; // all nets + player->netbig = B_TRUE; // big net + player->speed = 2; // fast + sprintf(tempm, "Full power!"); + addoutlinetext(player->x,player->y - player->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY); + toggletimer = 80; + } + } if (keys[SDLK_p]) { if (toggletimer == 0) { @@ -349,7 +369,7 @@ int main (int argc, char **argv) { } if (keys[SDLK_n]) { if (toggletimer == 0) { - nextlevel(); + // nextlevel(); toggletimer = 50; } } @@ -498,16 +518,24 @@ int main (int argc, char **argv) { } } else { if ((player->netcaught < player->netmax) && (player->climbing == B_FALSE)) { - /* shoot net */ - playfx(FX_SHOOT); - player->netting = 1; - if (player->netbig) { - player->netspeed = NETSPEED+3; + // handle cannon + if (player->powerup == PW_CANNON) { + playfx(FX_CANNON); + player->powerup = PW_CANNONFIRE; + player->timer3 = CANNONSIZE+5; // use this for size } else { - player->netspeed = NETSPEED; + /* shoot net */ + playfx(FX_SHOOT); + player->netting = 1; + if (player->netbig) { + player->netspeed = NETSPEED+3; + } else { + player->netspeed = NETSPEED; + } + player->netlen = 0; + player->netdir = player->dir; } - player->netlen = 0; - player->netdir = player->dir; + /* handle boxing glove */ if (player->powerup == PW_BOXING) { @@ -581,16 +609,21 @@ int main (int argc, char **argv) { dogravity(player); dotileeffects(player); } else { - if (levelcomplete != LV_NEXTLEV) { - /* gravity */ - for (s = sprite ; s ; s = s->next) { - dogravity(s); - } + switch (levelcomplete) { + case LV_INPROGRESS: + case LV_CLEAR: + case LV_WAIT: + case LV_FINAL: + /* gravity */ + for (s = sprite ; s ; s = s->next) { + dogravity(s); + } - /* tile effects */ - for (s = sprite ; s ; s = s->next) { - dotileeffects(s); - } + /* tile effects */ + for (s = sprite ; s ; s = s->next) { + dotileeffects(s); + } + break; } } @@ -630,10 +663,80 @@ int main (int argc, char **argv) { } - drawscore(); drawnetting(player); + if (player->powerup == PW_CANNONFIRE) { // cannon firing + if (timer % 2 == 0) { + int found; + sprite_t *s; + // find cannon + found = B_FALSE; + for (s = sprite; s ; s = s->next) { + if (s->id == P_CANNON) { + found = B_TRUE; + break; + } + } + if (!found) { + printf("weird error - no cannon!!\n"); + player->powerup = B_FALSE; + } else { + int initx,inity; + int i; + int initsize; + int xx,yy; + sprite_t *s3; + + initsize = player->timer3; + if (initsize > CANNONSIZE) initsize = CANNONSIZE; + + // calc init positions + inity = s->y - (s->img->h/2) - (initsize/2); + initx = s->x - (initsize/2); + yy = inity; + xx = initx; + + // horiz lines + for (i = 0; i < initsize ; i++) { + drawline16(screen,0,yy,640,yy,white); + for (s3 = sprite; s3 ; s3 = s3->next) { + if (ismonster(s3->id) && !s3->dead) { + if ((yy >= s3->y - s3->img->h) && (yy <= s3->y)) { + s3->willbecome = P_DIAMOND; + die(s3); + } + } + } + yy++; + } + // vert lines + for (i = 0; i < initsize ; i++) { + drawline16(screen,xx,0,xx,480,white); + for (s3 = sprite; s3 ; s3 = s3->next) { + if (ismonster(s3->id) && !s3->dead) { + if ((xx >= s3->x - (s3->img->w/2)) && (xx <= s3->x + (s3->img->w/2))) { + s3->willbecome = P_DIAMOND; + die(s3); + } + } + } + xx++; + } + // dec size + if (timer % 8 == 0) { + player->timer3--; + if (player->timer3 <= 0) { + player->powerup = B_FALSE; + s->dead = D_FINAL; + } + } + } + } + + } + + /* draw non-puff sprites */ for (s = sprite ; s ; s = s->next) { if (s->id != P_PUFF) drawsprite(s); @@ -645,6 +748,12 @@ int main (int argc, char **argv) { /* draw text */ drawtext(); + drawscore(); + + if (boss) { + drawbosshealth(); + } + if (paused) { SDL_Rect area; // show that we are paused @@ -684,7 +793,52 @@ int main (int argc, char **argv) { if (--player->timer1 == 0) { player->powerup = B_FALSE; } + } else if (player->powerup == PW_SPRAYUP) { // green overlay for fly spray + SDL_SetAlpha(greenbox, SDL_SRCALPHA, sprayalpha); + sprayalpha += 5; + if (sprayalpha >= 100) { + player->powerup = PW_SPRAYDOWN; + } + SDL_BlitSurface(greenbox,NULL,screen,NULL); + } else if (player->powerup == PW_SPRAYDOWN) { // green overlay for fly spray + SDL_SetAlpha(greenbox, SDL_SRCALPHA, sprayalpha); + sprayalpha -= 5; + if (sprayalpha <= 0) { + player->powerup = PW_SPRAYUP; + } + SDL_BlitSurface(greenbox,NULL,screen,NULL); + } else if (player->powerup == PW_RATSHAKE) { // horizontal shake due to rat + // shake screen + if (timer % 5 == 0) { + int amt; + SDL_Rect area; + amt = (rand() % 20)+1; + area.x = amt; + area.y = 0; + area.w = 640-amt; + area.h = 480; + + SDL_BlitSurface(screen, &area, screen, NULL); + + area.x = 640-amt; + area.y = 0; + area.w = amt; + area.h = 480; + SDL_FillRect(screen, &area, SDL_MapRGB(screen->format,black.r,black.g,black.b)); + } + + + // create rat + if (timer % 10 == 0) { + if (countmonsters() < 8) { // max 7 rats + king rat + puffin(P_RAT, rand() % (640-(TILEW*8))+(TILEW*4), TILEH, "gen_rat",0); + } + } + + if (--player->timer1 == 0) { + player->powerup = B_FALSE; + } } } @@ -743,26 +897,28 @@ void tick(void) { /* check for hurryup*/ - if (gtime == nexthurryup) { - if (!levelcomplete) { - for (s = sprite; s; s = s->next) { - if ((s != player) && (ismonster(s->id))) { - s->angry = B_TRUE; - s->iced = B_FALSE; + if (!isbosslevel(curlevelnum)) { + if (gtime == nexthurryup) { + if (!levelcomplete) { + for (s = sprite; s; s = s->next) { + if ((s != player) && (ismonster(s->id))) { + s->angry = B_TRUE; + s->iced = B_FALSE; + } } - } - addoutlinetext(320,240,TEXTSIZE_HURRY, "Hurry up!", &yellow,&black,HURRYDELAY); + addoutlinetext(320,240,TEXTSIZE_HURRY, "Hurry up!", &yellow,&black,HURRYDELAY); - stopmusic(); - Mix_PlayChannel(CH_HURRYUP, sfx[FX_HURRYUP], 0); - } - } else if (gtime == nexthurryup + 15) { // 15 secs after hurryup - if (!levelcomplete) { - addsprite(P_CLOUD, 320,240,"cloud"); - addoutlinetext(320,240,TEXTSIZE_HURRY, "Too slow!", &red,&black,HURRYDELAY); - playfx(FX_TOOSLOW); - } - } + stopmusic(); + Mix_PlayChannel(CH_HURRYUP, sfx[FX_HURRYUP], 0); + } + } else if (gtime == nexthurryup + 15) { // 15 secs after hurryup + if (!levelcomplete) { + addsprite(P_BLACKCLOUD, 320,240,"cloud"); + addoutlinetext(320,240,TEXTSIZE_HURRY, "Too slow!", &red,&black,HURRYDELAY); + playfx(FX_TOOSLOW); + } + } + } /* check for random power up */ if ((curlevel->powerupx != -1) && (curlevel->powerupy != -1)) { @@ -789,8 +945,30 @@ void tick(void) { if (levelcomplete == LV_FINAL) { if (gtime - levelcompletetime >= 5) { if (!player->dead) { - levelcomplete = LV_NEXTLEV; - nextlevel(); + int x,y; + levelcomplete = LV_CLOUD; + switch (curlevel->exitdir) { + case D_RIGHT: + default: + x = TILEW/2; + y = rand() % 480; + break; + case D_LEFT: + x = 640-(TILEW/2); + y = rand() % 480; + break; + case D_UP: + x = rand() % 640; + y = 480-(TILEW/2); + break; + case D_DOWN: + x = rand() % 640; + y = TILEW/2; + break; + } + + puffin(P_PINKCLOUD, x, y, "pinkcloud", 0); + } } } @@ -801,6 +979,7 @@ void tick(void) { void nextlevel(void) { char msg[SMALLBUFLEN]; + sprite_t *cloudp; // remove the player removesprite(player); @@ -819,6 +998,8 @@ void nextlevel(void) { // these two handle the scroll effect to the next level loadlevel(curworld,curlevelnum); + + // do the moving to next level animation drawlevel(); // now the player gets invincibility @@ -844,7 +1025,7 @@ void nextlevel(void) { addoutlinetext(320,240-18,TEXTSIZE_LEVEL,msg,&white,&black,LEVELDELAY); - sprintf(msg, "%s", curlevel->name); + sprintf(msg, "\"%s\"", curlevel->name); addoutlinetext(320,240+18,TEXTSIZE_LEVEL2,msg,&cyan,&black,LEVELDELAY); /* reset player stats */ @@ -852,8 +1033,18 @@ void nextlevel(void) { player->slamming = B_FALSE; player->jumping = B_FALSE; player->powerup = B_FALSE; + player->netcaught = 0; + // add initial fading cloud + cloudp = addsprite(P_PINKCLOUD, player->x,player->y + (imageset[P_PINKCLOUD].img[F_WALK1]->h / 2),"initial_pinkcloud"); + cloudp->size = 1.0; + + // TODO: add boss every 20 levles + //if (curlevel % 20 == 0) { + + //} + if (cheat) { player->speed = 2; @@ -882,7 +1073,14 @@ void jump(sprite_t *s, int dir) { if (s->jumpdir != 0) { s->dir = s->jumpdir; } - s->jumptimer = 60; + // special case + if ((s->id == P_KINGRAT) && (s->timer1 == KRS_CHARGEWAIT)) { + s->jumpspeed = MONJUMPSPEED; // will be changed later + s->jumping = 1; + } else { + s->jumptimer = 60; + s->willjumpspeed = MONJUMPSPEED; + } } else { s->jumpdir = dir; if (s->jumpdir != 0) { @@ -918,7 +1116,8 @@ void jump(sprite_t *s, int dir) { void die(sprite_t *s) { sprite_t *s2; /* clouds can't die like this */ - if (s->id == P_CLOUD) return; + if (s->id == P_BLACKCLOUD) return; + if (s->id == P_PINKCLOUD) return; /* if this is the player, hurryup time counter resets */ // We already do this in the cloud movement routine, but @@ -982,39 +1181,68 @@ void die(sprite_t *s) { } } + // boss effects + if (s == boss) { + // stop screen shaking + if (player->powerup == PW_RATSHAKE) { + player->powerup = B_FALSE; + } + // reset timers + s->timer1 = 0; + s->timer2 = 0; + // death timer + s->timer3 = BOSSDIETIME; + } + /* set death attribute */ s->dead = D_INITIAL; s->netting = 0; s->slamming = 0; s->iced = 0; + s->angry = 0; // check for level clear - countmonsters(); + checklevelend(); } -// check whether the level has been won -void countmonsters(void) { +void checklevelend(void) { sprite_t *s2; int mcount; - mcount = 0; - /* any monsters left? */ + if (!levelcomplete) { + mcount = 0; + /* any monsters left? */ for (s2 = sprite->next ; s2 ; s2 = s2->next) { if (ismonster(s2->id) && !s2->dead) { - if (s2->id != P_CLOUD) { + if (s2->id != P_BLACKCLOUD) { mcount++; - break; } } } - if (mcount == 0) { levelcomplete = LV_CLEAR; } } } +// count monsters on level +int countmonsters(void) { + sprite_t *s2; + int mcount; + mcount = 0; + /* any monsters left? */ + for (s2 = sprite->next ; s2 ; s2 = s2->next) { + if (ismonster(s2->id) && !s2->dead) { + if (s2->id != P_BLACKCLOUD) { + mcount++; + } + } + } + + return mcount; +} + void cleanup(void) { int i; SDL_FreeSurface(pausedtext); @@ -1049,7 +1277,7 @@ void checkcollide(sprite_t *s) { /* check for colission with our net */ if (s->netting ) { - if (ismonster(s2->id) && s2->id != P_CLOUD) { + if (isnettable(s2->id)) { xdiff = (s->x + s->netlen*s->netdir) - s2->x; if (xdiff < 0) xdiff = -xdiff; ydiff = s->netystart - (s2->y - s2->img->h/2); @@ -1270,19 +1498,26 @@ void movesprite(sprite_t *s) { } return; } else if (s->dead == D_INITIAL) { /* just set to dead */ + if (s == boss) { + // flash + s->timer3--; + if (s->timer3 == 0) { + s->dead = D_FINAL; + } + } else { + // 0 through 5 + s->xs = 0.5 + ((rand() % 50) / 10); // 0.5 through 5.5 + if (rand() % 2) { // 50% change of going left + s->xs = s->xs * -1; + } + s->ys = -1 * (4 + ((rand() % 30) / 10)); // -4 through -7 - // 0 through 5 - s->xs = 0.5 + ((rand() % 50) / 10); // 0.5 through 5.5 - if (rand() % 2) { // 50% change of going left - s->xs = s->xs * -1; - } - s->ys = -1 * (4 + ((rand() % 30) / 10)); // -4 through -7 - - s->dead = D_BOUNCING; - s->bounces = 0; - if (s == player) { - s->jumpspeed = 8; - s->jumping = 1; + s->dead = D_BOUNCING; + s->bounces = 0; + if (s == player) { + s->jumpspeed = 8; + s->jumping = 1; + } } return; } else if (s->dead == D_BOUNCING) { /* dying */ @@ -1400,7 +1635,7 @@ void movesprite(sprite_t *s) { } if (!iseffect(s->id)) { - if (isonground(s)) { + if (isonground(s) || ((s->id == P_KINGRAT) && (s->timer1 == KRS_WALK))) { if ((!s->falling) && (!s->jumping)) { if (!s->climbing && !s->dropping) { if (!isonladder(s)) { @@ -1416,7 +1651,7 @@ void movesprite(sprite_t *s) { s->jumptimer--; if (s->jumptimer == 0) { s->jumping = 1; - s->jumpspeed = 5; + s->jumpspeed = s->willjumpspeed; if (s->jumpdir != 0) s->dir = s->jumpdir; return; } else if (s->jumptimer % 20 == 0) { @@ -1453,7 +1688,13 @@ void movesprite(sprite_t *s) { // create a gem/fruit/etc if (s->id == P_PUFF) { if (s->timer3 >= 0) { - addsprite(s->timer3, s->x,s->y,s->name ); + sprite_t *newsp; + newsp = addsprite(s->timer3, s->x,s->y,s->name ); + // is it a boss? if so update boss pointer + switch (s->timer3) { + case P_KINGRAT: + boss = newsp; + } } } } else if (s->timer1 >= PUFFFRAMES) { @@ -1462,6 +1703,33 @@ void movesprite(sprite_t *s) { } } + } else if (s->id == P_CANNON) { // cannon effect + // die if player dies + if (player->dead) { + s->dead = D_FINAL; + } else if (player->powerup == PW_CANNON) { + int targx,targy; + // try to stay behind player + targx = player->x - (player->dir * 32); + targy = player->y; + if (s->x < targx) { + s->x += 2; + if (s->x > targx) s->x = targx; + } + if (s->y < targy) { + s->y += 2; + if (s->y > targy) s->y = targy; + } + if (s->x > targx) { + s->x -= 2; + if (s->x < targx) s->x = targx; + } + if (s->y > targy) { + s->y -= 2; + if (s->y < targy) s->y = targy; + } + } + } else if (s->id == P_GLOVE) { // boxing glove effect // dies when the player finshes netting if (!player->netting) { @@ -1496,16 +1764,16 @@ void movesprite(sprite_t *s) { if (xdiff < 0) absxdiff = -xdiff; else absxdiff = xdiff; - tt = gettileat(s->x + s->dir+getspeed(s),s->y,NULL,NULL); + tt = gettileat(s->x + s->dir+getspeed(s) + (s->dir * (s->img->w/2)),s->y,NULL,NULL); /* if there's a hole in front of us */ if (tt->solid == S_NOTSOLID) { - if ((player->y > s->y) && (s->angry)) { + if ((player->y > s->y) && (s->angry || boss)) { /* if player is below, fall off */ if (xdiff <= (TILEW*8)) { move = B_TRUE; } } else if (player->y == s->y) { - if (s->angry) { + if ((s->angry) || boss) { /* if player is at same level and close, jump */ if ((s->dir == D_RIGHT) && (xdiff > 0) && (xdiff <= (TILEW*7))) { jump(s,D_RIGHT); @@ -1529,7 +1797,7 @@ void movesprite(sprite_t *s) { s->dir = -s->dir; } - if (s->angry) { + if ((s->angry) || (boss)) { if ((player->dead == 0) && (!s->jumping) && (!s->jumptimer)) { /* if player is above us, jump */ if (player->y < s->y) { @@ -1559,6 +1827,145 @@ void movesprite(sprite_t *s) { } } } + } else if (s->id == P_KINGRAT) { + /* timer1 is state + + 0 == walk back and forth + + + timer2 counts down, at zero we change state + */ + if (s->timer1 == KRS_WALK) { + int canseeplayer = B_TRUE; + int ydis; + // move + rv = movex(s, s->dir*getspeed(s)); + if (rv) { + /* if we couldn't move (hit a wall), turn */ + s->dir = -s->dir; + } + + // if player is in front, charge! + if (player->dead) { + canseeplayer = B_FALSE; + } else { + ydis = abs(s->y - player->y); + if (ydis > 2) { + canseeplayer = B_FALSE; + } else if ((s->dir < 0) && (player->x > s->x)) { + canseeplayer = B_FALSE; + } else if ((s->dir > 0) && (player->x < s->x)) { + canseeplayer = B_FALSE; + } + } + + if (canseeplayer) { + // CHARGE! + playfx(FX_BOSSWINDUP); + s->timer1 = KRS_CHARGEWAIT; + s->timer2 = KR_NUMJUMPS; + } else { + // dec timer + s->timer2--; + if (s->timer2 == 0) { + if (player->dead) { + // reset timer + s->timer2 = KR_WALKTIME; + } else { + // jump to player's height + s->timer1 = KRS_JUMP; + } + } + } + } else if (s->timer1 == KRS_CHARGEWAIT) { + // jump timer2 times. + + if (timer % 2 == 0) { + // add puffs + puffin(-1, s->x + (rand() % (s->img->w)) - (s->img->w/2), s->y, "nothing", rand() % 5); + } + + if (!s->jumping && !s->falling) { + s->timer2--; + if ((s->timer2 <= 0) && (!s->jumping)){ + //CHARGE + s->timer1 = KRS_CHARGE; + s->flies = B_TRUE; + playfx(FX_BOSSCHARGE); + } else { + // bounce + jump(s,0); + s->jumpspeed = 1; + } + } + } else if (s->timer1 == KRS_CHARGE) { + int rv; + // move fast forwards + rv = movex(s, s->dir*KR_CHARGESPEED); + if (rv) { + // hit a wall - get stunned + s->timer1 = KRS_STUN; + s->timer2 = KR_STUNTIME; + s->flies = B_FALSE; + + playfx(FX_BOSSWALL); + + // shake the screen via a fake player powerup + player->powerup = PW_RATSHAKE; + player->timer1 = RATSHAKETIME; + } + } else if (s->timer1 == KRS_STUN) { + s->timer2--; + if (s->timer2 == 0) { + s->timer1 = KRS_WALK; + s->timer2 = KR_WALKTIME; + } + } else if (s->timer1 == KRS_JUMP) { + // jump to player height + if (!s->jumping) { + int ydis; + int try; + int tot; + int n; + + if ((player->dead) || (player->y > s->y)) { // player below or dead + try = 2; + } else { + // get distance + ydis = abs(s->y - player->y); + // figure out how much we need to jump + for (try = 2; try < (KR_MAXJUMP-1); try++) { + tot = 0; + for (n = try; n >= 1; n--) { + tot = tot + (5*n); + } + if (tot >= ydis) { + break; + } + } + } + jump(s, 0); + // manually adjust speed + try++; // one more just to be sure + s->willjumpspeed = try; + + // next state + s->timer1 = KRS_WAITFORTOP; + } + } else if (s->timer1 == KRS_WAITFORTOP) { + if (!s->jumping) { + s->timer1 = KRS_FALL; + } + } else if (s->timer1 == KRS_FALL) { + // fall to player height + if (!s->jumping && (s->y >= player->y)) { + // back to normal state but lower timer + s->timer1 = KRS_WALK; + s->timer2 = KR_WALKTIME; // low delay + } + } + + } else if (s->id == P_COKE) { if (!s->falling) { @@ -1871,7 +2278,151 @@ void movesprite(sprite_t *s) { if (movex(s, s->xs)) { s->dead = D_FINAL; } - } else if (s->id == P_CLOUD) { + } else if (s->id == P_PINKCLOUD) { + if (levelcomplete == LV_CLOUD) { + SDL_Surface *ts; + double targx,targy; + double amtleft; + double xdis,ydis,dis; + int turnsleft; + /* + If small, grow and move towards player's feet (at a speed + which will get us there when we are fully grown. + */ + targx = player->x; + targy = player->y + (imageset[P_PINKCLOUD].img[F_WALK1]->h / 2); + + if (s->img->w < imageset[P_PINKCLOUD].img[F_WALK1]->w) { + // grow + s->size += ((double)PCGROWSPEED); + ts = rotozoomSurfaceXY(imageset[P_PINKCLOUD].img[F_WALK1],0, s->size, s->size,0); + SDL_FreeSurface(s->img); + s->img = ts; + } + + + // calculate number of turns left + amtleft = 1.0 - s->size; // amount left + turnsleft = (int) (amtleft / (double)PCGROWSPEED); + + if (turnsleft < 1) { + // make sure we're in the right place + s->x = targx; + s->y = targy; + s->rotated = 0; + if (levelcomplete == LV_CLOUD) { + levelcomplete = LV_CLOUDLOOP; + } + +printf("init angle = %0.2f\n", s->angle / (M_PI/180)); + } else { + + // calculate distance to player + xdis = abs(targx - s->x); + ydis = abs(targy - s->y); + dis = sqrt((xdis*xdis) + (ydis*ydis)); + // calculate speed needed to reach player x/y in time + s->speed = dis / turnsleft; + // figure out angle to player + s->angle = atan2(targy - s->y, targx - s->x); + + // keep between 0 and 360 + if (s->angle > (360*(M_PI/180))) { + s->angle -= (360*(M_PI/180)); + } + if (s->angle < 0) { + s->angle += (360*(M_PI/180)); + } + + + // figure out x/y speed + s->xs = (cos(s->angle) * s->speed); + s->ys = (sin(s->angle) * s->speed); + +//printf("cloud: amtleft = %0.2f (1.0 - ssize=%0.2f)",amtleft,s->size); +// printf("cloud: speed = %0.2f, xdis=%0.2f,ydis=%0.2f,dis=%0.2f, turnsleft=%d,xs=%0.2f,ys=%0.2f\n",speed,xdis,ydis,dis,turnsleft,s->xs,s->ys); + // move + s->x += s->xs; + s->y += s->ys; + } + } else if (levelcomplete == LV_CLOUDLOOP) { + // stick player to us + player->x = s->x; + player->y = s->y - (imageset[P_PINKCLOUD].img[F_WALK1]->h / 2); + + // keep turning towards exit (2 degrees at a time) + s->angle += (PCTURN * (M_PI/180)); + + // keep between 0 and 360 + if (s->angle > (360*(M_PI/180))) { + s->angle -= (360*(M_PI/180)); + } + if (s->angle < 0) { + s->angle += (360*(M_PI/180)); + } + // track total rotation + s->rotated += (PCTURN * (M_PI/180)); + + if (s->angle < (270 * (M_PI/180))) { + // decellerate + if (s->speed > 5) { + s->speed -= 1; + } + } else { + // accellerate + if (s->speed < 10) { + s->speed += 0.5; + } + } + // figure out x/y speed + s->xs = (cos(s->angle) * s->speed); + s->ys = (sin(s->angle) * s->speed); + // move + s->x += s->xs; + s->y += s->ys; + + // keep on screen + if (s->x > 640-(s->img->w/2)) { + s->x = 640 - (s->img->w/2); + } + if (s->y > 480-(s->img->h/2)) { + s->y = 480 - (s->img->h/2); + } + if (s->x < s->img->w/2) { + s->x = s->img->w/2; + } + if (s->y < player->img->h/2) { + s->y = player->img->h/2; + } + + + // if we've done at least one revolution and moving right... + if (s->rotated >= 360 * (M_PI/180)) { + if (s->xs > abs(s->ys)) { + // level clear! + levelcomplete = LV_NEXTLEV; + nextlevel(); + // kill ourselves + s->dead = D_FINAL; + } + } + } else { + SDL_Surface *ts; + // shrink + s->size -= ((double)PCSHRINKSPEED); + + if (s->size <= 0.1) { + s->dead = D_FINAL; + } else { + ts = rotozoomSurfaceXY(imageset[P_PINKCLOUD].img[F_WALK1],0, s->size, s->size,0); + SDL_FreeSurface(s->img); + s->img = ts; + } + + // move up slightly + s->y -= PCSHRINKSPEED; + } + } else if (s->id == P_BLACKCLOUD) { if ((player->dead) || (levelcomplete)) { if ((s->img->h <= 3) || (s->img->w <= 3)) { s->dead = D_FINAL; @@ -1935,6 +2486,10 @@ void dotileeffects(sprite_t *s) { int state = 0; int tilex,tiley; + if (iseffect(s->id) || isbullet(s->id)) { + return; + } + if (s->jumping || s->dead || s->caughtby) { return; } @@ -1945,7 +2500,7 @@ void dotileeffects(sprite_t *s) { // teleporters if ((tt->id == T_TELEPORT) || (tt->id == T_TELEPORT2)) { if (s == player || ismonster(s->id)) { - if (s->id != P_CLOUD) { + if (s->id != P_BLACKCLOUD) { if (!s->teleporting) { playfx(FX_TELEPORT); s->teleporting = 1; @@ -1960,8 +2515,6 @@ void dotileeffects(sprite_t *s) { // CHECKS WHICH COUlD APPLY TO TILES UNDER AND SLIGHTLY LEFT/RIGHT OF US while (!finished) { - - if (tt->id == T_RIGHT) { if (!ismonster(s->id) && !isfruit(s->id)) { if (player->powerup != PW_CLOCK) { @@ -1987,9 +2540,9 @@ void dotileeffects(sprite_t *s) { } finished = B_TRUE; } else if (tt->spikes) { - if (!isfruit(s->id) && !iseffect(s->id) && !isbullet(s->id)) { + if (!isfruit(s->id) ) { if (!s->invuln) { - if (s->id != P_CLOUD) { + if (s->id != P_BLACKCLOUD) { die(s); } } @@ -2047,6 +2600,11 @@ void drawlevel(void) { SDL_Rect area,dst; int speed = 16; SDL_Surface *playerbg; + SDL_Surface *cloudbg; + + sprite_t tempcloud; + sprite_t *cloud; + /* TODO: chekc for memory leak here with temps - need to free it at the end? */ @@ -2062,6 +2620,16 @@ void drawlevel(void) { SDL_DisplayFormat(temps); + + // init cloud + cloud = &tempcloud; + cloud->id = P_PINKCLOUD; + cloud->iceimg = NULL; + setdefaults(cloud); + // redo image + cloud->img =rotozoomSurfaceXY(imageset[P_PINKCLOUD].img[F_WALK1],0,1,1,0); + + // change player to floating image player->img = imageset[player->id].img[F_SHOOT]; @@ -2072,6 +2640,13 @@ void drawlevel(void) { screen->format->Gmask,screen->format->Bmask, screen->format->Amask); SDL_DisplayFormat(playerbg); + // create buffer for cloud background + cloudbg = SDL_CreateRGBSurface(SDL_SWSURFACE, + cloud->img->w, cloud->img->h, + screen->format->BitsPerPixel, screen->format->Rmask, + screen->format->Gmask,screen->format->Bmask, + screen->format->Amask); + SDL_DisplayFormat(cloudbg); // draw the full level onto the temporary surface @@ -2119,6 +2694,9 @@ void drawlevel(void) { for (x = 0; x < 640; x += speed) { // move player movetostart(player,dstx,dsty,pxspeed,pyspeed); + // set cloud location + cloud->x = player->x; + cloud->y = player->y + (cloud->img->h / 2); // shuffle real screen area.x = 0; @@ -2146,9 +2724,11 @@ void drawlevel(void) { // remember area behind player grabbehind(player, playerbg); + grabbehind(cloud, cloudbg); // draw player drawsprite(player); + drawsprite(cloud); // update screen SDL_GL_SwapBuffers(); @@ -2161,6 +2741,11 @@ void drawlevel(void) { area.w = 0; area.h = 0; SDL_BlitSurface(playerbg, NULL, screen, &area ); + area.x = cloud->x - cloud->img->w/2; + area.y = cloud->y - cloud->img->h; + area.w = 0; + area.h = 0; + SDL_BlitSurface(cloudbg, NULL, screen, &area ); } } else if (oldexitdir == D_UP) { // blit a row at a time to the real screen, shuffling @@ -2168,6 +2753,9 @@ void drawlevel(void) { for (y = 0; y < 480; y += speed) { // move player movetostart(player,dstx,dsty,pxspeed,pyspeed); + // set cloud location + cloud->x = player->x; + cloud->y = player->y + (cloud->img->h / 2); // shuffle real screen area.x = 0; @@ -2195,10 +2783,11 @@ void drawlevel(void) { // remember area behind player grabbehind(player, playerbg); + grabbehind(cloud, cloudbg); // draw player drawsprite(player); - + drawsprite(cloud); // update screen SDL_GL_SwapBuffers(); SDL_UpdateRect(screen, 0,0,640,480); @@ -2210,6 +2799,11 @@ void drawlevel(void) { area.w = 0; area.h = 0; SDL_BlitSurface(playerbg, NULL, screen, &area ); + area.x = cloud->x - cloud->img->w/2; + area.y = cloud->y - cloud->img->h; + area.w = 0; + area.h = 0; + SDL_BlitSurface(cloudbg, NULL, screen, &area ); } } else if (oldexitdir == D_DOWN) { // blit a row at a time to the real screen, shuffling @@ -2217,6 +2811,9 @@ void drawlevel(void) { for (y = 0; y < 480; y += speed) { // move player movetostart(player,dstx,dsty,pxspeed,pyspeed); + // set cloud location + cloud->x = player->x; + cloud->y = player->y + (cloud->img->h / 2); // shuffle real screen area.x = 0; @@ -2244,9 +2841,11 @@ void drawlevel(void) { // remember area behind player grabbehind(player, playerbg); + grabbehind(cloud, cloudbg); // draw player drawsprite(player); + drawsprite(cloud); // update screen SDL_GL_SwapBuffers(); @@ -2259,6 +2858,11 @@ void drawlevel(void) { area.w = 0; area.h = 0; SDL_BlitSurface(playerbg, NULL, screen, &area ); + area.x = cloud->x - cloud->img->w/2; + area.y = cloud->y - cloud->img->h; + area.w = 0; + area.h = 0; + SDL_BlitSurface(cloudbg, NULL, screen, &area ); } } else { // RIGHT right, or default // blit a column at a time to the real screen, shuffling @@ -2266,6 +2870,9 @@ void drawlevel(void) { for (x = 0; x < 640; x += speed) { // move player movetostart(player,dstx,dsty,pxspeed,pyspeed); + // set cloud location + cloud->x = player->x; + cloud->y = player->y + (cloud->img->h / 2); // shuffle real screen area.x = speed; @@ -2293,9 +2900,11 @@ void drawlevel(void) { // remember area behind player grabbehind(player, playerbg); + grabbehind(cloud, cloudbg); // draw player drawsprite(player); + drawsprite(cloud); // update screen SDL_GL_SwapBuffers(); @@ -2308,10 +2917,17 @@ void drawlevel(void) { area.w = 0; area.h = 0; SDL_BlitSurface(playerbg, NULL, screen, &area ); + area.x = cloud->x - cloud->img->w/2; + area.y = cloud->y - cloud->img->h; + area.w = 0; + area.h = 0; + SDL_BlitSurface(cloudbg, NULL, screen, &area ); } } SDL_FreeSurface(playerbg); + SDL_FreeSurface(cloudbg); + SDL_FreeSurface(cloud->img); levelcomplete = B_FALSE; } @@ -2335,11 +2951,16 @@ double getspeed(sprite_t *s ) { } else if (id == P_SPIDER) { if (s->angry) speed = 2; else speed = 1.5; - } else if (id == P_CHEESE) { - speed = 0; + } else if (id == P_KINGRAT) { + speed = 1.5; } if (isinwater(s)) speed /= 2; + if ((player->powerup == PW_SPRAYUP) || (player->powerup == PW_SPRAYDOWN)) { + if (s != player) { + speed /= 2; + } + } return speed; } @@ -2412,6 +3033,38 @@ void movetext(void) { } } +void drawbosshealth(void) { + int i; + SDL_Rect area; + int healthframe; + int maxhealth; + + maxhealth = getbosshealth(boss->id); + + area.x = (640/2) - maxhealth*(healthbar[0]->w+HEALTHBARGAP); + area.y = HEALTHBARY; + area.w = 0; + area.h = 0; + + + + // for each health point, draw two bars + for (i = 0; i < boss->lives; i++) { + if (i < (maxhealth/8)) { + healthframe = HF_RED; + } else if (i <= (maxhealth/3)) { + healthframe = HF_YELLOW; + } else { + healthframe = HF_GREEN; + } + + SDL_BlitSurface(healthbar[healthframe], NULL, screen, &area); + area.x += (healthbar[healthframe]->w + HEALTHBARGAP); + SDL_BlitSurface(healthbar[healthframe], NULL, screen, &area); + area.x += (healthbar[healthframe]->w + HEALTHBARGAP); + } +} + void drawscore(void) { SDL_Surface *score; SDL_Rect area; @@ -2754,6 +3407,16 @@ int isonground(sprite_t *s) { } } + //if (s->falling && s->id == P_KINGRAT) { + if (s->id == P_KINGRAT) { + if (isongroundpoint(s, s->x + s->img->w/2, s->y)) { + return B_TRUE; + } + if (isongroundpoint(s, s->x - s->img->w/2, s->y)) { + return B_TRUE; + } + } + return B_FALSE; } @@ -2826,6 +3489,8 @@ void dogravity(sprite_t *s) { tiletype_t *tt; int tilex,tiley; + if (s->id == P_PINKCLOUD) return; + // only player can move if you have a clock if (player->powerup == PW_CLOCK) { if (!iseffect(s->id) && (s != player) && !s->caughtby && !s->dead) { @@ -2850,9 +3515,8 @@ void dogravity(sprite_t *s) { if (s->dead) return; - if (s->flies && !s->iced) return; // ice cancels flying + if (s->flies && !s->iced) return; // no gravity if you fly, but ice cancels flying if (iseffect(s->id)) return; - if (isbullet(s->id)) return; //if (isonladder(s) && !s->falling && !s->jumping) { @@ -2863,13 +3527,19 @@ void dogravity(sprite_t *s) { } */ + + // update flashing bosses + if ((s == boss) && (s->angry)) { + s->angry--; + } + // iced sprites can't jump if (s->iced) { s->jumping = B_FALSE; } // update water stats - if (s == player || ismonster(s)) { + if (s == player || ismonster(s->id)) { if (isinwater(s)) { if (!s->swimming) { s->swimming = B_TRUE; @@ -2942,36 +3612,57 @@ void dogravity(sprite_t *s) { /* have we hit a roof ? */ /* can jump through one tile, but not two or more */ if (isroofabove(s) && isroofnabove(s,2)) { - /* stop jumping */ - s->jumping = B_FALSE; - s->falling = B_TRUE; - s->fallspeed = 0; + if (s->id != P_KINGRAT) { // king rat can't hit roof + /* stop jumping */ + s->jumping = B_FALSE; + s->falling = B_TRUE; + s->fallspeed = 0; + } } } else { // not jumping - if (isonground(s) ) { + int ontheground; + ontheground = isonground(s); + if (ontheground) { if (s->falling && s->iced) { // when an iced monster hits the ground, it smashes s->willbecome = P_DIAMOND; playfx(FX_ICEBREAK); die(s); } - s->dropping = B_FALSE; - s->falling = B_FALSE; - s->climbing = B_FALSE; - } else { - if (s->falling == B_FALSE) { - s->fallspeed = 1; - } - s->falling = B_TRUE; - if (isinwater(s) && !s->iced) { - s->y += (s->fallspeed/2); - } else { - s->y += s->fallspeed; - } - if ((timer % 10 == 0) && (s->fallspeed < FALLSPEED)) { - s->fallspeed++; + if ((s->id == P_KINGRAT) && (s->timer1 == KRS_FALL)) { // special case + // king rat drops until he is at player height + if ((player->dead) || (s->y < player->y)) { // above player + ontheground = B_FALSE; + } else { // above player + s->dropping = B_FALSE; + s->falling = B_FALSE; + s->climbing = B_FALSE; + } + } else { // everyone else + s->dropping = B_FALSE; + s->falling = B_FALSE; + s->climbing = B_FALSE; } + } + // don't use an ELSE here because king rat needs to fall through + if (!ontheground) { + //if ((s->id == P_KINGRAT) && ((s->timer1 == KRS_CHARGE) || (s->timer1 == KRS_WALK))) { + // do nothing + //} else { + if (s->falling == B_FALSE) { + s->fallspeed = 1; + } + s->falling = B_TRUE; + if (isinwater(s) && !s->iced) { + s->y += (s->fallspeed/2); + } else { + s->y += s->fallspeed; + } + if ((timer % 10 == 0) && (s->fallspeed < FALLSPEED)) { + s->fallspeed++; + } + //} } } @@ -2992,7 +3683,7 @@ void dogravity(sprite_t *s) { } } } else if (s->slamming) { - int netx; + int netx,nety; double dist; int hitwall = B_FALSE; @@ -3001,17 +3692,29 @@ void dogravity(sprite_t *s) { dist = (s->slamangle * (180/M_PI))/2; netx = s->x + cos(s->slamangle-(180*(M_PI/180)))*dist*s->dir; + nety = s->y + sin(s->slamangle-(180*(M_PI/180)))*dist; if ((netx >= (640-TILEW)) || (netx <= TILEW)) { hitwall = B_TRUE; } + // hit a boss? + if (boss) { + if ( (netx >= boss->x-(boss->img->w/2)) && (netx <= boss->x+(boss->img->w/2))) { + if ((nety >= boss->y - boss->img->h) && (nety <= boss->y)) { + hitwall = B_TRUE; + } + } + } + if (s->slamangle >= (180 * (M_PI/180)) || hitwall) { /* finished slamming */ int xdiff,ydiff,xnet = 0,ynet = 0; int pointsinc = 250; int psize = 6; int gotsomething = B_FALSE; + int hitboss = B_FALSE; int macex,macey; + int numcaught = 0; s->slamming = 0; @@ -3066,14 +3769,23 @@ void dogravity(sprite_t *s) { /* kill anything we have caught */ if (s2->caughtby == s) { tiletype_t *tt; + + numcaught++; // used later in slam code + tt = gettileat(s2->x,s2->y+2,NULL,NULL); + + /* if on ground or hitting a wall, monster dies */ if ((hitwall) || (tt == NULL) || (tt->solid)) { /* will become a fruit when it finishes dying */ - s2->willbecome = fruittypes[curfruittype]; - /* increment fruit type */ - if (fruittypes[++curfruittype] == -1) { - curfruittype = 0; + if (boss) { + s2->willbecome = -1; + } else { + s2->willbecome = fruittypes[curfruittype]; + /* increment fruit type */ + if (fruittypes[++curfruittype] == -1) { + curfruittype = 0; + } } die(s2); pointsinc *= 2; @@ -3120,18 +3832,69 @@ void dogravity(sprite_t *s) { //} if ((xdiff <= xthresh) && (ydiff <= ythresh)) { - if (s2->id != P_CLOUD) { + if (s2 == boss) { + int n; + // flash white, longer for each monster we were + // holding + s2->angry = BOSSFLASHTIME*numcaught; + // lose health + s2->lives -= numcaught; + + // if no health left < 0, it dies + if (s2->lives <= 0) { + sprite_t *s3; + // todo: change to big fruit! + s2->willbecome = P_DIAMOND; + + // add puffs + for (n = 0; n < 30; n++) { + puffin(-1, s2->x - (s2->img->w/2) + (rand() % s2->img->w), s2->y - (rand() % s2->img->h), "nothing", rand() % 80); + } + + playfx(FX_BOSSDIE); + die(s2); + + + pointsinc *= 2; + pointsinc += 32000; // change? + psize += 10; + + gotsomething++; + + // kill everything else too + for (s3 = sprite; s3 ; s3=s3->next) { + if (ismonster(s3->id) && !s3->dead) { + s3->willbecome = P_DIAMOND; + + if (s3->caughtby) { + s3->caughtby = NULL; + player->netcaught--; + } + die(s3); + } + } + hitboss = B_TRUE; + } else { // remaining health + playfx(FX_BOSSHIT); + hitboss = B_TRUE; + } + } else if (s2->id != P_BLACKCLOUD) { // non bosses /* dies and becomes a powerup */ // if we were holding something, we can get a powerup // if we used a mace, it becomes a diamon. if (gotsomething) { - s2->willbecome = poweruptypes[curpoweruptype]; - if (poweruptypes[++curpoweruptype] == -1) { - curpoweruptype = 0; + if (boss) { // no fruits on boss levels + s2->willbecome = -1; + } else { + s2->willbecome = poweruptypes[curpoweruptype]; + if (poweruptypes[++curpoweruptype] == -1) { + curpoweruptype = 0; + } } } else if (player->powerup == PW_MACE) { s2->willbecome = P_DIAMOND; } else { // should never happen + /* will become a fruit when it finishes dying */ s2->willbecome = fruittypes[curfruittype]; /* increment fruit type */ @@ -3150,11 +3913,14 @@ void dogravity(sprite_t *s) { } } } - if (gotsomething >= 1) { - playfx(FX_KILL); - } - if (gotsomething > 1) { - playfx(FX_MULTIKILL); + + if (!hitboss) { + if (gotsomething >= 1) { + playfx(FX_KILL); + } + if (gotsomething > 1) { + playfx(FX_MULTIKILL); + } } @@ -3479,12 +4245,28 @@ int dofruiteffect(sprite_t *s) { curlevel->icey = 0; } return B_TRUE; + } else if (s->id == P_SPRAY) { + // flyspray + playfx(FX_SPRAY); + sprintf(tempm, "Fly Spray!"); + addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY); + player->powerup = PW_SPRAYUP; + sprayalpha = 0; + return B_TRUE; + } else if (s->id == P_CANNONPOWERUP) { + // flyspray + playfx(FX_POWERUP); + sprintf(tempm, "Fusion Cannon"); + addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY); + player->powerup = PW_CANNON; + puffin(P_CANNON, player->x, player->y,"cannon", 0); + return B_TRUE; } else if (s->id == P_BOMB) { sprite_t *s2, *nexts; // make the screen shake player->powerup = PW_BOMB; - player->timer1 = 100; + player->timer1 = BOMBSHAKETIME; // kill all monsters playfx(FX_BOOM); @@ -3497,7 +4279,10 @@ int dofruiteffect(sprite_t *s) { } else if (ismonster(s2->id)) { s2->willbecome = P_DIAMOND; - s2->caughtby = NULL; + if (s2->caughtby) { + s2->caughtby = NULL; + player->netcaught--; + } die(s2); } } @@ -3647,6 +4432,13 @@ int initsound(void) { loadfx(FX_ARMOR, "armor.wav"); loadfx(FX_FREEZE, "freeze.wav"); loadfx(FX_ICEBREAK, "icebreak.wav"); + loadfx(FX_BOSSWINDUP, "chargewait.wav"); + loadfx(FX_BOSSCHARGE, "bosscharge.wav"); + loadfx(FX_BOSSDIE, "bossdie.wav"); + loadfx(FX_BOSSHIT, "bosshit.wav"); + loadfx(FX_BOSSWALL, "bosswall.wav"); + loadfx(FX_SPRAY, "spray.wav"); + loadfx(FX_CANNON, "fusion.wav"); // load sound effects @@ -3828,6 +4620,7 @@ void addscore(sprite_t *s, int amt) { void doice(void) { int yy,xx,changed; sprite_t *s; + int l2id; // just in case if (!curlevel->iced) { @@ -3844,11 +4637,16 @@ void doice(void) { } // make sure tile is valid if ((yy >= 0) && (yy < LEVELH) && (xx >= 0) && (xx < LEVELW)) { + tiletype_t *tt; changed = B_FALSE; // if not already a second layer here... - if (curlevel->map2[yy*LEVELW+xx] == T_BLANK) { + //l2id = curlevel->map2[yy*LEVELW+xx]; + tt = gettile(curlevel->map2[yy*LEVELW+xx]); + l2id = tt->id; + if (l2id == T_BLANK) { // add ice layer - switch (curlevel->map[yy*LEVELW+xx] ) { + tt = gettile(curlevel->map[yy*LEVELW+xx]); + switch (tt->id) { case T_FULL: curlevel->map2[yy*LEVELW+xx] = getuniq(T_ICE); changed = B_TRUE; @@ -3858,10 +4656,22 @@ void doice(void) { changed = B_TRUE; break; } - if (changed) { - drawtile(temps, xx, yy); + } else { // certain l2 ids can still be replaced + switch (l2id) { + case T_FULL: + curlevel->map2[yy*LEVELW+xx] = getuniq(T_ICE); + changed = B_TRUE; + break; + case T_LAND: +printf("bb\n"); + curlevel->map2[yy*LEVELW+xx] = getuniq(T_ICETOP); + changed = B_TRUE; + break; } } + if (changed) { + drawtile(temps, xx, yy); + } } xx++; if (xx >= LEVELW) break; diff --git a/rc.h b/rc.h index 33ba472..763f6cf 100644 --- a/rc.h +++ b/rc.h @@ -2,6 +2,7 @@ void cleanup(void); int addtext(int x, int y, int size, char *string, SDL_Color *c, int delay); void addoutlinetext(int x, int y, int size, char *msg, SDL_Color *col, SDL_Color *bgcol, int delay); void drawscore(void); +void drawbosshealth(void); void drawtext(void); void movetext(void); void removeall(void); @@ -44,10 +45,11 @@ void channeldone(int channel); void movetostart(sprite_t *p, int dstx, int dsty, double xspeed,double yspeed); SDL_Surface *grabbehind(sprite_t *s, SDL_Surface *surf); void dumpsprites(void); -void countmonsters(void); +int countmonsters(void); int getpoints(int id); int isladder(int tid); char *addcommas(char *buffer, int num); void addscore(sprite_t *s, int amt); void doice(void); +void checklevelend(void); diff --git a/shared.c b/shared.c index b831c60..fbc3715 100644 --- a/shared.c +++ b/shared.c @@ -34,9 +34,9 @@ int loadlevel(int wnum, int lnum) { int tileid; int i; //int *ii; - mapping_t mapping[MAXMAPPINGS]; - int nmappings = 0; - tiletype_t *lasttile; + //mapping_t mapping[MAXMAPPINGS]; + //int nmappings = 0; + //tiletype_t *lasttile; int newversion; int numanim = 0; int leveldone; @@ -69,6 +69,8 @@ int loadlevel(int wnum, int lnum) { if (!level) level = malloc(sizeof(level_t)); + sprintf(level->filename, levelentry[lnum].filename); + /* set current level pointer */ curlevel = level; @@ -76,7 +78,7 @@ int loadlevel(int wnum, int lnum) { level->id = levelentry[lnum].id; //sprintf(level->name, "Level %d-%d",wnum,lnum); - sprintf(level->name, "\"%s\"",levelentry[lnum].desc); + sprintf(level->name, "%s",levelentry[lnum].desc); level->prev = NULL; level->next = NULL; @@ -195,6 +197,7 @@ int loadlevel(int wnum, int lnum) { /* read tile defs */ // TODO: remove all of this, don't need it with new level format + /* nmappings = 0; fgets(buf, BUFLEN, f); while (!strstr(buf, "endmaps")) { @@ -216,6 +219,7 @@ int loadlevel(int wnum, int lnum) { fgets(buf, BUFLEN, f); } + */ fgets(buf, BUFLEN, f); /* read help messages if present */ if (strstr(buf, "help")) { @@ -237,7 +241,7 @@ int loadlevel(int wnum, int lnum) { if (strstr(buf, "monsters")) { fgets(buf, BUFLEN, f); while (!strstr(buf, "endmonsters")) { - char ch; + //char ch; int monid; int x,y; // strip newline @@ -249,8 +253,10 @@ int loadlevel(int wnum, int lnum) { printf("invalid monster definition (missing type): '%s'\n",buf); return B_TRUE; } - ch = p[0]; // type of monster - monid = chartomonster(ch); + //ch = p[0]; // type of monster + //monid = chartomonster(ch); + // type of monster + monid = atoi(p); if (monid < 0) { printf("invalid monster definition (invalid type): '%s'\n",buf); return B_TRUE; @@ -393,10 +399,10 @@ int loadlevel(int wnum, int lnum) { p = strtok(NULL, ","); } - } else { /* old level data version */ + } /*else { // old level data version for (p = buf; *p; p++) { int n,found = 0; - /* search mappings */ + // search mappings for (n = 0; n < nmappings; n++) { if (mapping[n].ch == *p) { tileid = mapping[n].tnum; @@ -428,10 +434,10 @@ int loadlevel(int wnum, int lnum) { tileid = level->bgtileid; level->initm[level->nummonsters].startx = x*TILEW+(TILEW/2); level->initm[level->nummonsters].starty = y*TILEH+(TILEH-2); - level->initm[level->nummonsters].id = P_CLOUD; + level->initm[level->nummonsters].id = P_BLACKCLOUD; level->nummonsters++; } else if (*p == 'r') { - /* figure out background type */ + // figure out background type if (lasttile->solid) { tileid = level->map[(y-1)*LEVELW+x]; } else { @@ -445,7 +451,7 @@ int loadlevel(int wnum, int lnum) { level->nummonsters++; } else if (*p == 'S') { - /* figure out background type */ + // figure out background type if (lasttile->solid) { tileid = level->map[(y-1)*LEVELW+x]; } else { @@ -458,7 +464,7 @@ int loadlevel(int wnum, int lnum) { level->initm[level->nummonsters].id = P_SNAKE; level->nummonsters++; } else if (*p == 'a') { - /* figure out background type */ + // figure out background type if (lasttile->solid) { tileid = level->map[(y-1)*LEVELW+x]; } else { @@ -470,7 +476,7 @@ int loadlevel(int wnum, int lnum) { level->initm[level->nummonsters].id = P_BEE; level->nummonsters++; } else if (*p == 's') { - /* figure out background type */ + // figure out background type if (lasttile->solid) { tileid = level->map[(y-1)*LEVELW+x]; } else { @@ -482,7 +488,7 @@ int loadlevel(int wnum, int lnum) { level->initm[level->nummonsters].id = P_SPIDER; level->nummonsters++; } else if (*p == '?') { - /* figure out background type */ + // figure out background type if (lasttile->solid) { tileid = level->map[(y-1)*LEVELW+x]; } else { @@ -516,7 +522,7 @@ int loadlevel(int wnum, int lnum) { } else if (*p == '\\') { tileid = T_SLOPEDOWN; } else if (*p == '1') { - /* figure out background type */ + // figure out background type if (lasttile->solid) { tileid = level->map[(y-1)*LEVELW+x]; } else { @@ -548,7 +554,8 @@ int loadlevel(int wnum, int lnum) { lasttile = gettile(tileid); x++; } - } /* if newversion */ + } // if newversion + */ /* make sure enough data was found */ if (x < LEVELW+1) { @@ -664,6 +671,7 @@ int loadlevel(int wnum, int lnum) { } else { delay = 0; } + #ifdef __EDITOR addsprite(level->initm[i].id, level->initm[i].startx, level->initm[i].starty, name ); @@ -675,6 +683,8 @@ int loadlevel(int wnum, int lnum) { gtime = 0; nexthurryup = level->hurryuptime; + boss = NULL; + printf("Done.\n"); /* for (ii = level->animtiles ; ii && *ii != -1; ii++) { @@ -725,6 +735,7 @@ void setdefaults(sprite_t *s) { s->dead = 0; s->angry = 0; s->jumptimer = 0; + s->willjumpspeed = 0; s->iced = B_FALSE; if (s->iceimg) { SDL_FreeSurface(s->iceimg); @@ -736,9 +747,29 @@ void setdefaults(sprite_t *s) { s->willbecome = P_CHEESE; + // special + if (s->id == P_PINKCLOUD) { + s->size = 0.1; + } else { + // not used + s->size = -1; + } + + // special for bosses + if (s->id == P_KINGRAT) { + s->timer1 = 0; + s->timer2 = KR_WALKTIME; + s->timer3 = 0; + } + if (isboss(s->id)) { + s->lives = getbosshealth(s->id); // health + } + + + // flying switch (s->id) { case P_BEE: - case P_CLOUD: + case P_BLACKCLOUD: case P_SPIDER: s->flies = B_TRUE; break; @@ -781,8 +812,10 @@ sprite_t *addsprite(int id, int x, int y, char *name ) { s->id = id; s->x = x; s->y = y; - if (s->id == P_CLOUD) { + if (s->id == P_BLACKCLOUD) { s->img = rotozoomSurfaceXY(imageset[id].img[F_WALK1],0,1,1,0); + } else if (s->id == P_PINKCLOUD) { + s->img = rotozoomSurfaceXY(imageset[id].img[F_WALK1],0,(double)PCGROWSPEED,(double)PCGROWSPEED,0); } else { s->img = imageset[id].img[F_WALK1]; } @@ -1020,9 +1053,24 @@ int loadimagesets(void) { SDL_Surface *tempimg; SDL_Surface *reds; + head = IMG_Load("sprites/dwarfhead.png"); headsmall = IMG_Load("sprites/dwarfhead-small.png"); icecube = IMG_Load("sprites/icecube.png"); + healthbar[HF_GREEN] = IMG_Load("sprites/health.png"); + healthbar[HF_YELLOW] = IMG_Load("sprites/healthyellow.png"); + healthbar[HF_RED] = IMG_Load("sprites/healthred.png"); + + // green square for flyspray effect + + greenbox = SDL_CreateRGBSurface(SDL_SWSURFACE, + screen->w, + screen->h, + screen->format->BitsPerPixel, screen->format->Rmask, + screen->format->Gmask,screen->format->Bmask, 0); + SDL_FillRect(greenbox, NULL, SDL_MapRGB(greenbox->format, 0, 150, 0)); + SDL_SetAlpha(greenbox, SDL_SRCALPHA,80); + loadspriteimage(P_PLAYER,F_WALK1, "sprites/pdwarf.png"); loadspriteimage(P_PLAYER,F_JUMP, "sprites/pdwarfjump.png"); @@ -1094,12 +1142,16 @@ int loadimagesets(void) { /* next 3 are auto generated */ imageset[P_SPIDER].numimages = 8; - loadspriteimage(P_CLOUD,F_WALK1, "sprites/cloud.png"); - loadspriteimage(P_CLOUD,F_JUMP, "sprites/cloud.png"); - loadspriteimage(P_CLOUD,F_FALL, "sprites/cloud.png"); - loadspriteimage(P_CLOUD,F_CAUGHT, "sprites/cloud.png"); - loadspriteimage(P_CLOUD,F_DEAD, "sprites/cloud.png"); - imageset[P_CLOUD].numimages = 2; + loadspriteimage(P_BLACKCLOUD,F_WALK1, "sprites/cloud.png"); + loadspriteimage(P_BLACKCLOUD,F_JUMP, "sprites/cloud.png"); + loadspriteimage(P_BLACKCLOUD,F_FALL, "sprites/cloud.png"); + loadspriteimage(P_BLACKCLOUD,F_CAUGHT, "sprites/cloud.png"); + loadspriteimage(P_BLACKCLOUD,F_DEAD, "sprites/cloud.png"); + imageset[P_BLACKCLOUD].numimages = 2; + + loadspriteimage(P_PINKCLOUD,F_WALK1, "sprites/pinkcloud.png"); + imageset[P_PINKCLOUD].numimages = 1; + loadspriteimage(P_COKE,F_WALK1, "sprites/coke.png"); loadspriteimage(P_COKE,F_JUMP, "sprites/cokejump.png"); @@ -1108,6 +1160,14 @@ int loadimagesets(void) { loadspriteimage(P_COKE,F_DEAD, "sprites/cokedead.png"); imageset[P_COKE].numimages = 8; + loadspriteimage(P_KINGRAT,F_WALK1, "sprites/kingrat.png"); + loadspriteimage(P_KINGRAT,F_JUMP, "sprites/kingratjump.png"); + loadspriteimage(P_KINGRAT,F_FALL, "sprites/kingratjump.png"); + loadspriteimage(P_KINGRAT,F_CAUGHT, "sprites/kingratcaught.png"); + loadspriteimage(P_KINGRAT,F_DEAD, "sprites/kingratdead.png"); + /* next 3 are auto generated */ + imageset[P_KINGRAT].numimages = 8; + /* fruits / powerups */ loadspriteimage(P_CHEESE,F_WALK1, "sprites/cheese.png"); imageset[P_CHEESE].numimages = 1; @@ -1207,6 +1267,15 @@ int loadimagesets(void) { loadspriteimage(P_SNOWMAN,F_WALK1, "sprites/snowman.png"); imageset[P_SNOWMAN].numimages = 1; + loadspriteimage(P_SPRAY,F_WALK1, "sprites/spray.png"); + imageset[P_SPRAY].numimages = 1; + + loadspriteimage(P_CANNONPOWERUP,F_WALK1, "sprites/cannonpowerup.png"); + imageset[P_CANNONPOWERUP].numimages = 1; + + loadspriteimage(P_CANNON,F_WALK1, "sprites/cannon.png"); + imageset[P_CANNON].numimages = 1; + // puffs and mace smashes for (i = 0; i < PUFFFRAMES; i++) { char name[SMALLBUFLEN]; @@ -1269,14 +1338,24 @@ int loadimagesets(void) { /* angry image */ - // create semi-transparent red square - reds = SDL_CreateRGBSurface(SDL_SWSURFACE, - origi->w, - origi->h, - origi->format->BitsPerPixel, origi->format->Rmask, - origi->format->Gmask,origi->format->Bmask, 0); - SDL_FillRect(reds, NULL, SDL_MapRGB(reds->format, 255, 0, 0)); - SDL_SetAlpha(reds, SDL_SRCALPHA,100); + // create semi-transparent red square (white for bosses) + if (isboss(p)) { + reds = SDL_CreateRGBSurface(SDL_SWSURFACE, + origi->w, + origi->h, + origi->format->BitsPerPixel, origi->format->Rmask, + origi->format->Gmask,origi->format->Bmask, 0); + SDL_FillRect(reds, NULL, SDL_MapRGB(reds->format, 255, 255, 255)); + SDL_SetAlpha(reds, SDL_SRCALPHA,100); + } else { + reds = SDL_CreateRGBSurface(SDL_SWSURFACE, + origi->w, + origi->h, + origi->format->BitsPerPixel, origi->format->Rmask, + origi->format->Gmask,origi->format->Bmask, 0); + SDL_FillRect(reds, NULL, SDL_MapRGB(reds->format, 255, 0, 0)); + SDL_SetAlpha(reds, SDL_SRCALPHA,100); + } // take a copy of the original image imageset[p].img[MAXFRAMES*2+i] = rotozoomSurfaceXY(origi, 0, 1,1,0); @@ -1292,8 +1371,16 @@ int loadimagesets(void) { imageset[p].img[MAXFRAMES*2+i] = temps; // Make the background red bits completely transparent - SDL_SetColorKey(imageset[p].img[MAXFRAMES*2+i], - SDL_SRCCOLORKEY, SDL_MapRGB(imageset[p].img[MAXFRAMES*2+i]->format, 101, 0, 0)); + if (isboss(p)) { + SDL_SetColorKey(imageset[p].img[MAXFRAMES*2+i], + SDL_SRCCOLORKEY, SDL_MapRGB(imageset[p].img[MAXFRAMES*2+i]->format, 99, 97, 99)); + } else { + ///SDL_Color tempcol; + ///getpixelrgb(imageset[p].img[MAXFRAMES*2+i], 0, 0, &tempcol); +//printf("for spriteid %d, rgb is %d,%d,%d\n",p,tempcol.r,tempcol.g,tempcol.b); + SDL_SetColorKey(imageset[p].img[MAXFRAMES*2+i], + SDL_SRCCOLORKEY, SDL_MapRGB(imageset[p].img[MAXFRAMES*2+i]->format, 99, 0, 0)); + } /* flipped angry image */ @@ -1336,6 +1423,11 @@ void drawsprite(sprite_t *s) { if ((s == player) && (levelcomplete == LV_NEXTLEV)) { frame = F_SHOOT; + if (curlevel->exitdir == D_RIGHT) { + player->dir = 1; + } else if (curlevel->exitdir == D_LEFT) { + player->dir = -1; + } } else { /* select frame */ if (isfruit(s->id)) { @@ -1356,10 +1448,14 @@ void drawsprite(sprite_t *s) { frame = F_WALK1; } else if (s->id == P_MACE) { frame = F_WALK1; + } else if (s->id == P_CANNON) { + frame = F_WALK1; } } else if (s->dead) { if (s == player) { frame = F_DEAD; + } else if (s == boss) { + frame = F_DEAD; } else { frame = F_DEAD + ((timer/2) % 4); } @@ -1435,7 +1531,7 @@ void drawsprite(sprite_t *s) { frame += (MAXFRAMES*2); } - if ((s->id != P_CLOUD) && (!s->teleporting)) { + if ((s->id != P_BLACKCLOUD) && (s->id != P_PINKCLOUD) && (!s->teleporting)) { s->img = imageset[s->id].img[frame]; } @@ -1468,6 +1564,10 @@ void drawsprite(sprite_t *s) { if (timer % 2 == 0) { SDL_BlitSurface(s->img, NULL, screen, &area); } + } else if (s == boss && s->dead) { + if ((timer / 10) % 2 == 0) { + SDL_BlitSurface(s->img, NULL, screen, &area); + } } else { // draw the sprite SDL_BlitSurface(s->img, NULL, screen, &area); @@ -1510,6 +1610,11 @@ void killsprite(sprite_t *s) { sprite_t *nextone, *lastone; sprite_t *s2; + // remove boss pointer + if (boss == s) { + boss = NULL; + } + /* remove references to this sprite before removing it */ for (s2 = sprite ; s2 ; s2 = s2->next) { if (s2->owner == s) { @@ -1618,6 +1723,8 @@ int isfruit(int id) { case P_RINGGOLD: case P_CLOCK: case P_SNOWMAN: + case P_SPRAY: + case P_CANNONPOWERUP: /* flowers */ case P_FLOWERYELLOW: case P_FLOWERRED: @@ -1648,6 +1755,8 @@ int iseffect(int id) { if (id == P_POWERUPPOS) return B_TRUE; if (id == P_GLOVE) return B_TRUE; if (id == P_MACE) return B_TRUE; + if (id == P_PINKCLOUD) return B_TRUE; + if (id == P_CANNON) return B_TRUE; return B_FALSE; } @@ -1823,9 +1932,10 @@ int getcolor(SDL_Surface *dest, int x, int y, SDL_Color *col) { } +/* int chartomonster(char ch) { switch (ch) { - case 'c': return P_CLOUD; + case 'c': return P_BLACKCLOUD; case 'r': return P_RAT; case 'S': return P_SNAKE; case 'a': return P_BEE; @@ -1844,7 +1954,7 @@ int chartomonster(char ch) { } char monstertochar(int id ) { switch (id) { - case P_CLOUD: return 'c'; + case P_BLACKCLOUD: return 'c'; case P_RAT: return 'r'; case P_SNAKE: return 'S'; case P_BEE: return 'a'; @@ -1861,6 +1971,7 @@ char monstertochar(int id ) { return '\0'; } +*/ tiletype_t *gettile(int uniqid) { tiletype_t *t; @@ -1898,7 +2009,6 @@ void drawtile(SDL_Surface *where, int x, int y) { area.h = TILEH; /* draw blank tile first */ tt = gettile(curlevel->bgtileid); - //SDL_BlitSurface(tt->img[0], NULL, where, &area); SDL_BlitSurface(levelbg, &area, where, &area); /* now draw real one */ @@ -1966,8 +2076,9 @@ int ismonster(int id) { if (id == P_BEE) return B_TRUE; if (id == P_SPIDER) return B_TRUE; if (id == P_SNAKE) return B_TRUE; - if (id == P_CLOUD) return B_TRUE; + if (id == P_BLACKCLOUD) return B_TRUE; if (id == P_COKE) return B_TRUE; + if (id == P_KINGRAT) return B_TRUE; return B_FALSE; } @@ -2084,6 +2195,24 @@ int getpoints(int id) { } +int savelevellist(void) { + FILE *f; + int i; + f = fopen("levels.dat","w"); + if (!f) { + printf("error writing to levels.dat\n"); + return B_FALSE; + } + + for (i = 1; i < numlevels; i++) { + fprintf(f, "%d,%s,%s\n",levelentry[i].id, levelentry[i].filename, levelentry[i].desc); + } + + fclose(f); + + return B_FALSE; +} + int loadlevellist(void) { int lev; FILE *f; @@ -2095,6 +2224,7 @@ int loadlevellist(void) { // // id,filename,description, lev = 1; + maxlevid = -99; fgets(buf, BUFLEN, f); while (!feof(f)) { p = strtok(buf, ","); @@ -2103,19 +2233,27 @@ int loadlevellist(void) { return B_TRUE; } levelentry[lev].id = atoi(p); + + // track max levelid + if (levelentry[lev].id > maxlevid) { + maxlevid = levelentry[lev].id; + } + + p = strtok(NULL, ","); if (!p) { printf("invalid level filename - line %d\n",lev); return B_TRUE; } - levelentry[lev].filename = strdup(p); + strncpy(levelentry[lev].filename, p, MIDBUFLEN); p = strtok(NULL, ","); if (!p) { printf("invalid level description - line %d\n",lev); return B_TRUE; } p[strlen(p)-1] = '\0'; // strip newline - levelentry[lev].desc = strdup(p); + //LEVELENTry[lev].desc = strdup(p); + strncpy(levelentry[lev].desc, p, MIDBUFLEN); lev++; fgets(buf, BUFLEN, f); } @@ -2129,7 +2267,7 @@ int loadlevellist(void) { int randompowerup(void) { int num; - num = rand() % 17; + num = rand() % 19; switch (num) { case 0: @@ -2167,6 +2305,10 @@ int randompowerup(void) { return P_CLOCK; case 16: return P_SNOWMAN; + case 17: + return P_SPRAY; + case 18: + return P_CANNONPOWERUP; } } @@ -2185,3 +2327,65 @@ int ispermenant(int pid) { } return B_FALSE; } + + +int isbosslevel(int lev) { + if (lev % 20 == 0) { + return B_TRUE; + } + return B_FALSE; +} + +int isboss(int monid) { + switch (monid) { + case P_KINGRAT: + return B_TRUE; + default: + return B_FALSE; + } +} + +int isnettable(int monid) { + if (ismonster(monid)) { + switch (monid) { + case P_BLACKCLOUD: + case P_KINGRAT: + return B_FALSE; + default: + return B_TRUE; + } + } + + return B_FALSE; +} + +// return starting health for a given boss type +int getbosshealth(int mid) { + switch (mid) { + case P_KINGRAT: + return 10; + } + return 0; +} + +void getpixelrgb(SDL_Surface *where, int x, int y, SDL_Color *clr) { + Uint32 col; + + //determine position + char* pPosition = ( char* ) where->pixels ; + + //offset by y + pPosition += ( where->pitch * y ) ; + + //offset by x + pPosition += ( where->format->BytesPerPixel * x ) ; + + //copy pixel data + memcpy ( &col , pPosition , where->format->BytesPerPixel ) ; + + //convert color + SDL_GetRGB ( col , where->format , &clr->r , &clr->g , &clr->b ) ; + //*r = color.r; + //*g = color.g; + //*b = color.b; +} diff --git a/shared.h b/shared.h index 6888aad..da7134d 100644 --- a/shared.h +++ b/shared.h @@ -27,8 +27,10 @@ inline void drawpixel32(SDL_Surface *screen, int x, int y, SDL_Color c); inline void drawbox16(SDL_Surface *screen, int x1,int y1,int x2,int y2,SDL_Color *c,SDL_Color *fc); void drawline16(SDL_Surface *screen, int x1, int y1, int x2, int y2, SDL_Color c); int getcolor(SDL_Surface *dest, int x, int y, SDL_Color *col); +/* int chartomonster(char ch); char monstertochar(int id); +*/ tiletype_t *gettile(int uniqid); int getuniq(int tileid); void drawtile(SDL_Surface *s, int x, int y); @@ -40,6 +42,12 @@ SDL_Surface *loadspriteimage(int spriteid, int frame, char *filename); int getpoints(int id); int randompowerup(void); int loadlevellist(void); +int savelevellist(void); int ispermenant(int pid); +int isbosslevel(int lev); +int isnettable(int monid); +int isboss(int monid); +int getbosshealth(int mid); +void getpixelrgb(SDL_Surface *where, int x, int y, SDL_Color *clr); #endif diff --git a/sounds/OLDPOWERUP.wav b/sounds/OLDPOWERUP.wav new file mode 100644 index 0000000..2df4637 Binary files /dev/null and b/sounds/OLDPOWERUP.wav differ diff --git a/sounds/bosscharge.wav b/sounds/bosscharge.wav new file mode 100644 index 0000000..629e86c Binary files /dev/null and b/sounds/bosscharge.wav differ diff --git a/sounds/bossdie.wav b/sounds/bossdie.wav new file mode 100644 index 0000000..c56f350 Binary files /dev/null and b/sounds/bossdie.wav differ diff --git a/sounds/bosshit.wav b/sounds/bosshit.wav new file mode 100644 index 0000000..52bbdd2 Binary files /dev/null and b/sounds/bosshit.wav differ diff --git a/sounds/bosswall.wav b/sounds/bosswall.wav new file mode 100644 index 0000000..0e5d60f Binary files /dev/null and b/sounds/bosswall.wav differ diff --git a/sounds/chargewait.wav b/sounds/chargewait.wav new file mode 100644 index 0000000..e2c35c6 Binary files /dev/null and b/sounds/chargewait.wav differ diff --git a/sounds/fusion.wav b/sounds/fusion.wav new file mode 100644 index 0000000..c56f350 Binary files /dev/null and b/sounds/fusion.wav differ diff --git a/sounds/powerup.wav b/sounds/powerup.wav index 2df4637..0f0ea23 100644 Binary files a/sounds/powerup.wav and b/sounds/powerup.wav differ diff --git a/sounds/spray-old1.wav b/sounds/spray-old1.wav new file mode 100644 index 0000000..be54c19 Binary files /dev/null and b/sounds/spray-old1.wav differ diff --git a/sounds/spray.wav b/sounds/spray.wav new file mode 100644 index 0000000..d114361 Binary files /dev/null and b/sounds/spray.wav differ diff --git a/sprites/OLDrat.bmp b/sprites/OLDrat.bmp new file mode 100644 index 0000000..0ee5d24 Binary files /dev/null and b/sprites/OLDrat.bmp differ diff --git a/sprites/OLDratjump.bmp b/sprites/OLDratjump.bmp new file mode 100644 index 0000000..eed4f54 Binary files /dev/null and b/sprites/OLDratjump.bmp differ diff --git a/sprites/cannon.png b/sprites/cannon.png new file mode 100644 index 0000000..b28358f Binary files /dev/null and b/sprites/cannon.png differ diff --git a/sprites/cannonpowerup.png b/sprites/cannonpowerup.png new file mode 100644 index 0000000..9dc6390 Binary files /dev/null and b/sprites/cannonpowerup.png differ diff --git a/sprites/goldring.gif b/sprites/goldring.gif new file mode 100644 index 0000000..f6596fc Binary files /dev/null and b/sprites/goldring.gif differ diff --git a/sprites/health.png b/sprites/health.png new file mode 100644 index 0000000..903c6dc Binary files /dev/null and b/sprites/health.png differ diff --git a/sprites/healthred.png b/sprites/healthred.png new file mode 100644 index 0000000..c78458a Binary files /dev/null and b/sprites/healthred.png differ diff --git a/sprites/healthyellow.png b/sprites/healthyellow.png new file mode 100644 index 0000000..c948480 Binary files /dev/null and b/sprites/healthyellow.png differ diff --git a/sprites/kingrat.png b/sprites/kingrat.png new file mode 100644 index 0000000..ecc6883 Binary files /dev/null and b/sprites/kingrat.png differ diff --git a/sprites/kingratcaught.png b/sprites/kingratcaught.png new file mode 100644 index 0000000..c6fc2c3 Binary files /dev/null and b/sprites/kingratcaught.png differ diff --git a/sprites/kingratdead.png b/sprites/kingratdead.png new file mode 100644 index 0000000..9bfff73 Binary files /dev/null and b/sprites/kingratdead.png differ diff --git a/sprites/kingratjump.png b/sprites/kingratjump.png new file mode 100644 index 0000000..7909e24 Binary files /dev/null and b/sprites/kingratjump.png differ diff --git a/sprites/pinkcloud.png b/sprites/pinkcloud.png new file mode 100644 index 0000000..b9fc72b Binary files /dev/null and b/sprites/pinkcloud.png differ diff --git a/sprites/spray.png b/sprites/spray.png new file mode 100644 index 0000000..b989b88 Binary files /dev/null and b/sprites/spray.png differ diff --git a/world1/blank.dat b/world1/blank.dat index 2fc80f7..e79fb9c 100644 --- a/world1/blank.dat +++ b/world1/blank.dat @@ -1,7 +1,6 @@ tileset green bg 0 hurryup 30 -endmaps help endhelp monsters diff --git a/world1/level1.dat b/world1/level1.dat index b6966dc..4b139e1 100644 --- a/world1/level1.dat +++ b/world1/level1.dat @@ -1,32 +1,31 @@ bgfile backgrounds/forest.png bg 0 hurryup 30 -endmaps help Use X to jump, Z to catch the rat. Then use Down+Z to slam and kill a monster! endhelp monsters -1 3 19 -? 7 19 -? 12 19 -@ 30 15 -@ 31 15 -P 21 15 -@ 22 15 -@ 20 15 -Y 23 15 -Y 19 15 -Y 2 15 -Y 1 15 -Y 24 19 -Y 22 19 -Y 20 19 -r 27 15 -P 36 14 -Y 34 19 -@ 35 19 -P 36 19 +0 3 19 +14 7 19 +14 12 19 +16 30 15 +16 31 15 +17 21 15 +16 22 15 +16 20 15 +15 23 15 +15 19 15 +15 2 15 +15 1 15 +15 24 19 +15 22 19 +15 20 19 +1 27 15 +17 36 14 +15 34 19 +16 35 19 +17 36 19 endmonsters exitdir 1 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, diff --git a/world1/level10.dat b/world1/level10.dat index bcde705..5ee694e 100644 --- a/world1/level10.dat +++ b/world1/level10.dat @@ -1,39 +1,38 @@ bgfile backgrounds/forest2.png bg 0 hurryup 60 -endmaps help endhelp monsters -1 3 28 -! 37 15 -C 33 7 -C 11 13 -r 13 5 -r 7 17 -s 23 1 -@ 7 5 -@ 25 9 -P 25 5 -P 7 9 -Y 2 7 -Y 1 7 -Y 2 12 -Y 1 12 -Y 38 7 -Y 30 7 -Y 35 15 -Y 38 15 -Y 32 18 -Y 9 21 -Y 7 21 -@ 18 17 -@ 4 17 -P 36 24 -P 38 24 -S 31 24 -r 20 21 -s 37 9 +0 3 28 +23 37 15 +18 33 7 +18 11 13 +1 13 5 +1 7 17 +7 23 1 +16 7 5 +16 25 9 +17 25 5 +17 7 9 +15 2 7 +15 1 7 +15 2 12 +15 1 12 +15 38 7 +15 30 7 +15 35 15 +15 38 15 +15 32 18 +15 9 21 +15 7 21 +16 18 17 +16 4 17 +17 36 24 +17 38 24 +12 31 24 +1 20 21 +7 37 9 endmonsters exitdir 1 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, @@ -88,19 +87,8 @@ layer2 23,6,28 24,6,28 26,6,34 -15,7,27 -16,7,27 -17,7,27 -18,7,27 -19,7,27 29,8,35 1,9,19 -15,9,27 -16,9,27 -17,9,27 -18,9,27 -19,9,27 -20,9,27 38,9,18 6,10,35 8,10,28 @@ -143,13 +131,6 @@ layer2 25,14,28 26,14,28 30,14,34 -13,15,27 -15,15,27 -17,15,27 -18,15,27 -19,15,27 -22,15,27 -23,15,27 35,16,35 38,17,18 4,18,35 @@ -167,10 +148,6 @@ layer2 16,18,28 17,18,28 18,18,34 -13,19,27 -14,19,27 -15,19,27 -16,19,27 7,22,35 10,22,28 11,22,28 @@ -217,9 +194,4 @@ layer2 34,25,28 35,25,28 1,26,19 -26,26,27 -27,26,27 -28,26,27 -29,26,27 -30,26,27 38,26,18 diff --git a/world1/level11.5.dat b/world1/level11.5.dat index ad143c2..644d088 100644 --- a/world1/level11.5.dat +++ b/world1/level11.5.dat @@ -1,55 +1,54 @@ bgfile backgrounds/forest2.png bg 0 hurryup 136 -endmaps help endhelp monsters -1 1 2 -! 19 2 -r 33 7 -r 13 10 -@ 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 -r 11 18 -C 9 28 -S 30 5 -S 30 5 -S 30 5 -P 30 28 -P 31 28 -@ 28 14 -@ 31 14 -Y 20 15 -@ 19 12 -P 11 18 -P 7 18 -@ 9 18 -@ 13 18 -Y 4 2 -Y 6 2 -P 8 10 -P 12 10 -Y 14 10 +0 1 2 +23 19 2 +1 33 7 +1 13 10 +16 6 28 +16 6 28 +16 6 28 +16 6 28 +16 2 28 +16 2 28 +16 2 28 +16 2 28 +16 2 28 +16 15 28 +16 15 28 +16 15 28 +16 15 28 +16 15 28 +15 35 5 +15 28 5 +16 20 2 +15 21 2 +15 18 2 +15 6 10 +15 10 10 +1 11 18 +18 9 28 +12 30 5 +12 30 5 +12 30 5 +17 30 28 +17 31 28 +16 28 14 +16 31 14 +15 20 15 +16 19 12 +17 11 18 +17 7 18 +16 9 18 +16 13 18 +15 4 2 +15 6 2 +17 8 10 +17 12 10 +15 14 10 endmonsters exitdir 1 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, diff --git a/world1/level11.dat b/world1/level11.dat index 7cd23d5..4bff2e3 100644 --- a/world1/level11.dat +++ b/world1/level11.dat @@ -1,59 +1,58 @@ -tileset green +bgfile backgrounds/forest2.png bg 0 -hurryup 56 -endmaps +hurryup 328 help Jump onto trampolines to bounce high... endhelp monsters -1 17 28 -! 19 19 -a 23 18 -a 14 10 -a 21 7 -r 36 12 -r 2 16 -r 2 8 -r 38 4 -r 35 20 -C 23 1 -C 7 1 -P 24 28 -P 23 28 -P 25 28 -P 25 19 -@ 16 19 -@ 18 19 -@ 20 19 -@ 22 19 -Y 36 16 -Y 37 16 -Y 3 12 -Y 2 12 -Y 3 20 -Y 2 20 -Y 36 8 -Y 37 8 -@ 37 20 -@ 36 20 -@ 2 16 -@ 3 16 -@ 37 12 -@ 36 12 -@ 3 8 -@ 2 4 -@ 2 8 -@ 3 4 -@ 36 4 -@ 37 4 -@ 17 1 -@ 23 1 -P 20 1 -P 19 1 -P 21 1 -? 15 28 +0 17 28 +23 19 19 +6 23 18 +6 14 10 +6 21 7 +1 36 12 +1 2 16 +1 2 8 +1 38 4 +1 35 20 +18 23 1 +18 7 1 +17 24 28 +17 23 28 +17 25 28 +17 25 19 +16 16 19 +16 18 19 +16 20 19 +16 22 19 +15 36 16 +15 37 16 +15 3 12 +15 2 12 +15 3 20 +15 2 20 +15 36 8 +15 37 8 +16 37 20 +16 36 20 +16 2 16 +16 3 16 +16 37 12 +16 36 12 +16 3 8 +16 2 4 +16 2 8 +16 3 4 +16 36 4 +16 37 4 +16 17 1 +16 23 1 +17 20 1 +17 19 1 +17 21 1 +14 15 28 endmonsters -exitdir 2 +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,20,20,20,20,20,20,20,20,20,20,20,25,25,25,25,25,25,25,25,25,25,25,20,20,20,20,20,20,20,20,20,20,0,0,0,4, diff --git a/world1/level12.dat b/world1/level12.dat index 8e96f53..fc06d6e 100644 --- a/world1/level12.dat +++ b/world1/level12.dat @@ -1,38 +1,37 @@ -tileset green +bgfile backgrounds/forest2.png bg 0 hurryup 60 -endmaps help endhelp monsters -1 19 18 -! 19 21 -a 13 9 -a 23 9 -a 27 17 -a 8 18 -a 13 24 -a 23 23 -a 32 24 -a 3 23 -C 22 11 -C 12 11 -P 26 7 -P 10 7 -@ 31 14 -@ 6 14 -Y 2 21 -Y 34 21 -Y 7 21 -Y 29 21 -@ 25 21 -@ 20 21 -@ 11 21 -@ 16 21 -Y 25 14 -Y 12 14 -P 21 14 -P 16 14 +0 19 18 +23 19 21 +6 13 9 +6 23 9 +6 27 17 +6 8 18 +6 13 24 +6 23 23 +6 32 24 +6 3 23 +18 22 11 +18 12 11 +17 26 7 +17 10 7 +16 31 14 +16 6 14 +15 2 21 +15 34 21 +15 7 21 +15 29 21 +16 25 21 +16 20 21 +16 11 21 +16 16 21 +15 25 14 +15 12 14 +17 21 14 +17 16 14 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, diff --git a/world1/level13.dat b/world1/level13.dat index e9ef1ab..4031a22 100644 --- a/world1/level13.dat +++ b/world1/level13.dat @@ -1,58 +1,57 @@ bgfile bg 0 hurryup 232 -endmaps help endhelp monsters -1 2 24 -! 28 6 -a 11 12 -a 28 24 -a 29 18 -a 6 11 -C 9 5 -C 31 23 -S 24 28 -a 21 2 -a 37 10 -P 8 5 -P 9 5 -P 10 5 -P 11 5 -P 27 15 -P 28 15 -P 30 15 -P 29 15 -@ 35 27 -@ 37 25 -Y 36 26 -Y 34 28 -Y 4 26 -@ 3 25 -Y 9 25 -@ 10 25 -Y 7 14 -Y 12 14 -P 14 12 -P 5 12 -@ 13 13 -@ 6 13 -@ 28 11 -@ 28 7 -@ 5 7 -@ 3 9 -Y 6 6 -Y 4 8 -Y 13 6 -Y 15 8 -@ 16 8 -@ 14 7 -@ 30 11 -@ 30 7 -Y 29 11 -Y 29 7 -S 32 7 +0 2 24 +23 28 6 +6 11 12 +6 28 24 +6 29 18 +6 6 11 +18 9 5 +18 31 23 +12 24 28 +6 21 2 +6 37 10 +17 8 5 +17 9 5 +17 10 5 +17 11 5 +17 27 15 +17 28 15 +17 30 15 +17 29 15 +16 35 27 +16 37 25 +15 36 26 +15 34 28 +15 4 26 +16 3 25 +15 9 25 +16 10 25 +15 7 14 +15 12 14 +17 14 12 +17 5 12 +16 13 13 +16 6 13 +16 28 11 +16 28 7 +16 5 7 +16 3 9 +15 6 6 +15 4 8 +15 13 6 +15 15 8 +16 16 8 +16 14 7 +16 30 11 +16 30 7 +15 29 11 +15 29 7 +12 32 7 endmonsters exitdir 1 24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24, diff --git a/world1/level14.dat b/world1/level14.dat index cbfa548..bc62cef 100644 --- a/world1/level14.dat +++ b/world1/level14.dat @@ -1,43 +1,42 @@ bgfile bg 0 hurryup 232 -endmaps help endhelp monsters -1 20 28 -! 16 4 -a 22 22 -a 17 19 -a 21 17 -a 19 20 -a 24 20 -C 4 13 -C 37 13 -a 17 23 -Y 26 13 -Y 14 13 -Y 12 13 -Y 28 13 -Y 31 13 -Y 9 13 -@ 36 13 -@ 3 13 -@ 7 13 -@ 33 13 -P 30 20 -P 10 20 -P 24 4 -P 17 4 -P 16 4 -P 23 4 -@ 25 5 -@ 15 5 -@ 18 8 -@ 22 8 -P 20 23 -P 23 23 -P 17 23 +0 20 28 +23 16 4 +6 22 22 +6 17 19 +6 21 17 +6 19 20 +6 24 20 +18 4 13 +18 37 13 +6 17 23 +15 26 13 +15 14 13 +15 12 13 +15 28 13 +15 31 13 +15 9 13 +16 36 13 +16 3 13 +16 7 13 +16 33 13 +17 30 20 +17 10 20 +17 24 4 +17 17 4 +17 16 4 +17 23 4 +16 25 5 +16 15 5 +16 18 8 +16 22 8 +17 20 23 +17 23 23 +17 17 23 endmonsters exitdir 1 24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24, diff --git a/world1/level2.dat b/world1/level2.dat index 3f2f626..7daab6c 100644 --- a/world1/level2.dat +++ b/world1/level2.dat @@ -1,7 +1,6 @@ bgfile xx bg 0 hurryup 80 -endmaps help Slam a monster onto another for a powerup. Grab this monster, but don't kill it yet... @@ -9,20 +8,19 @@ Stand on this ledge then slam! Collect all flowers for a bonus! endhelp monsters -1 4 10 -? 6 10 -? 12 10 -? 25 10 -r 34 9 -r 17 10 -Y 15 8 -Y 19 8 -Y 32 8 -Y 36 8 -Y 28 9 -r 9 4 -? 27 4 -Y 20 4 +0 4 10 +14 6 10 +14 12 10 +14 25 10 +1 34 9 +1 17 10 +15 15 8 +15 19 8 +15 32 8 +15 28 9 +1 9 4 +14 27 4 +15 20 4 endmonsters exitdir 1 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,0,0,0,0,0,0,0,0,0,4, @@ -30,13 +28,13 @@ exitdir 1 4,4,4,4,4,4,4,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,0,0,0,0,0,0,0,0,0,0,0,4, 4,4,4,4,4,4,4,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,0,0,0,0,0,0,0,0,0,0,0,4, 4,4,4,4,4,4,4,27,27,27,27,27,27,35,34,27,27,27,27,27,27,27,27,27,27,27,27,27,0,0,0,0,0,0,0,0,0,0,0,4, -4,4,4,4,4,4,39,1,1,1,1,1,1,38,39,1,1,1,1,1,1,1,1,1,1,1,1,1,3,0,0,0,0,0,0,0,0,0,0,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,37,3,0,0,0,0,0,0,0,0,0,4, +4,4,4,4,4,4,39,1,1,1,1,1,1,38,39,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, +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,1,1,1,1,1,1,1,1,34,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,41,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,41,0,0,0,41,0,0,4, -4,0,0,0,0,0,0,0,0,5,0,0,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,5,41,6,0,0,39,1,1,1,38,0,0,4, -39,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,38,4,39,1,1,38,4,4,4,39,1,1,38, +4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,41,0,0,0,1,1,1,38, +4,0,0,0,0,0,0,0,0,5,0,0,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,5,41,6,0,0,39,1,1,1,4,4,4,4, +39,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,38,4,39,1,1,38,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,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,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,4, diff --git a/world1/level20.dat b/world1/level20.dat index 7452135..4c8fe26 100644 --- a/world1/level20.dat +++ b/world1/level20.dat @@ -1,46 +1,43 @@ -tileset green +bgfile backgrounds/forest.png bg 0 hurryup 30 -endmaps +help +Slam monsters into King Rat to damage it! +endhelp monsters -a 19 5 -a 7 6 -r 27 7 -s 10 9 -s 23 9 -r 19 13 -s 4 15 -s 20 15 -s 28 15 -1 2 28 +0 6 8 +14 11 8 +45 16 20 endmonsters -*00000000000000000000000000000000000000* -*00000000000000000000000000000000000000* -*00000000000000000000000000000000000000* -*00000000000000000000000000000000000000* -*00000000000000000000000000000000000000* -*00000000000000000000000000000000000000* -*00000000000000000000000000000000000000* -*00000000000000000000000000000000000000* -***********000*******************000000* -*00000000000000000000000000000000000000* -*00000000000000000000000000000000000000* -*0000000000000000000000000000000000~~~~* -*00000000000000000000000000000000000000* -*00000000000000000000000000000000000000* -**-********000*******************000000* -*0=00000*000000*0000000*0000000*0000000* -*0=000000000000000000000000000000000000* -*0=000000000000000000000000000000000000* -*0=000000000000000000000000000000000000* -*0=000000000000000000000000000000000000* -*0=000000000000000000000000000000000000* -*0=000000000000000000000000000000000000* -*0=000000000000000000000000000000^^^000* -*~~~~~~~~~0000~~~~~~~~~~000~~00~~~~~~-~* -*000000000000000000000000000000000000=0* -*000000000000000000000000000000000000=0* -*000000000000000000000000000000000000=0* -*000000000000000000000000000000000000=0* -*0000000^^^^^^^^000000000000000000000=0* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +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,23,23,23,23,23,23,23,23,23,0,0,0,23,23,23,23,23,23,23,23,23,23,23,23,23,23,0,0,0,0,23,23,23,23,23,23,23,23,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,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,0,0,0,23,23,23,23,23,23,23,23,23,23,23,23,23,23,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,23,23,23,23,23,23,23,23,23,0,0,0,23,23,23,23,23,23,23,23,23,23,23,23,23,23,0,0,0,23,23,23,23,23,23,23,23,23,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,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,0,0,0,23,23,23,23,23,23,23,23,23,23,23,23,23,23,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,23,23,23,23,23,23,23,23,23,0,0,0,23,23,23,23,23,23,23,23,23,23,23,23,23,23,0,0,0,23,23,23,23,23,23,23,23,23,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,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,0,0,0,23,23,23,23,23,23,23,23,23,23,23,23,23,23,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,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 diff --git a/world1/level21.dat b/world1/level21.dat index 4aa12fa..52eca81 100644 --- a/world1/level21.dat +++ b/world1/level21.dat @@ -1,50 +1,49 @@ bgfile bg 0 hurryup 90 -endmaps help endhelp monsters -1 32 7 -r 33 23 -r 4 23 -P 34 23 -P 33 23 -P 6 23 -P 5 23 -Y 35 23 -Y 32 23 -Y 7 23 -Y 4 23 -@ 24 18 -@ 16 18 -@ 15 18 -@ 23 18 -P 27 16 -P 12 16 -Y 26 17 -Y 25 17 -Y 14 17 -Y 13 17 -a 23 17 -a 25 14 -a 12 15 -a 17 13 -r 35 28 -r 7 28 -r 10 7 -P 20 6 -P 19 6 -@ 22 6 -@ 17 6 -Y 27 7 -Y 12 7 -Y 28 7 -Y 11 7 -s 29 22 -s 12 22 -S 10 20 -S 30 20 +0 32 7 +1 33 23 +1 4 23 +17 34 23 +17 33 23 +17 6 23 +17 5 23 +15 35 23 +15 32 23 +15 7 23 +15 4 23 +16 24 18 +16 16 18 +16 15 18 +16 23 18 +17 27 16 +17 12 16 +15 26 17 +15 25 17 +15 14 17 +15 13 17 +6 23 17 +6 25 14 +6 12 15 +6 17 13 +1 35 28 +1 7 28 +1 10 7 +17 20 6 +17 19 6 +16 22 6 +16 17 6 +15 27 7 +15 12 7 +15 28 7 +15 11 7 +7 29 22 +7 12 22 +12 10 20 +12 30 20 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, diff --git a/world1/level3.dat b/world1/level3.dat index 5b2f607..8ce885b 100644 --- a/world1/level3.dat +++ b/world1/level3.dat @@ -1,39 +1,38 @@ bgfile backgrounds/forest2.png bg 0 hurryup 40 -endmaps help You can walk through spikes safely. But don't fall on them! endhelp monsters -1 4 27 -! 20 15 -r 19 15 -r 5 7 -r 35 7 -r 35 23 -r 4 23 -@ 26 11 -@ 27 11 -@ 28 11 -@ 28 19 -@ 27 19 -@ 26 19 -@ 12 11 -@ 13 11 -@ 14 11 -@ 14 19 -@ 13 19 -@ 12 19 -@ 2 7 -@ 37 7 -@ 37 23 -@ 2 23 -? 10 19 -? 16 19 +0 4 27 +23 20 15 +1 19 15 +1 5 7 +1 35 7 +1 35 23 +16 26 11 +16 27 11 +16 28 11 +16 28 19 +16 27 19 +16 26 19 +16 12 11 +16 13 11 +16 14 11 +16 14 19 +16 13 19 +16 12 19 +16 2 7 +16 37 7 +16 37 23 +16 2 23 +14 10 19 +14 16 19 +1 8 23 endmonsters -exitdir -2 +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, diff --git a/world1/level4.dat b/world1/level4.dat index 724efe8..61f50e1 100644 --- a/world1/level4.dat +++ b/world1/level4.dat @@ -1,38 +1,37 @@ bgfile backgrounds/forest2.png bg 0 hurryup 120 -endmaps help Drop through bridges with Down+X endhelp monsters -1 24 8 -! 20 8 -r 10 4 -r 11 12 -r 33 12 -r 25 16 -r 12 20 -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 -? 21 8 +0 24 8 +23 20 8 +1 10 4 +1 11 12 +1 33 12 +1 25 16 +1 12 20 +1 25 24 +15 23 12 +15 25 12 +16 25 20 +16 23 20 +15 32 20 +17 34 20 +16 7 16 +17 5 16 +16 16 16 +15 14 16 +15 15 24 +16 16 24 +16 14 24 +16 5 24 +16 7 24 +15 6 24 +17 8 4 +16 26 8 +14 21 8 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, @@ -52,7 +51,7 @@ 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,35,1,1,1,34,0,0,0,0,35,1,1,1,34,0,0,0,0,35,20,20,20,20,20,20,20,20,20,20,20,20,34,0,0,0,4, +4,0,0,0,35,1,1,1,34,0,0,0,0,35,1,1,1,34,0,0,0,0,35,20,20,21,21,21,21,21,21,21,21,20,20,34,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, diff --git a/world1/level5.5.dat b/world1/level5.5.dat index 86e4916..329a653 100644 --- a/world1/level5.5.dat +++ b/world1/level5.5.dat @@ -1,34 +1,33 @@ bgfile backgrounds/forest2.png bg 0 hurryup 30 -endmaps help endhelp monsters -1 1 17 -! 20 15 -Y 36 9 -s 29 1 -r 17 16 -r 21 20 -Y 15 16 -Y 24 16 -@ 23 20 -@ 16 20 -P 25 12 -P 14 12 -@ 23 6 -@ 16 6 -r 21 12 -C 33 9 -C 26 9 -C 4 9 -s 13 1 -P 27 9 -@ 32 9 -@ 7 9 -Y 3 9 -P 12 9 +0 1 17 +23 20 15 +15 36 9 +7 29 1 +1 17 16 +1 21 20 +15 15 16 +15 24 16 +16 23 20 +16 16 20 +17 25 12 +17 14 12 +16 23 6 +16 16 6 +1 21 12 +18 33 9 +18 26 9 +18 4 9 +7 13 1 +17 27 9 +16 32 9 +16 7 9 +15 3 9 +17 12 9 endmonsters exitdir 1 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, @@ -59,10 +58,18 @@ exitdir 1 4,4,4,4,4,4,4,4,4,4,4,39,1,40,40,34,0,0,0,0,0,0,0,0,35,1,1,1,38,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,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,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,0,11,11,11,11,11,11,11,11,0,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,0,0,0,0,0,0,0,0,0,0,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,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, layer2 1,10,8 38,10,8 15,28,11 +16,28,11 +17,28,11 +18,28,11 +19,28,11 +20,28,11 +21,28,11 +22,28,11 +23,28,11 24,28,11 diff --git a/world1/level5.dat b/world1/level5.dat index a86bf34..105ee77 100644 --- a/world1/level5.dat +++ b/world1/level5.dat @@ -1,46 +1,45 @@ bgfile bg 0 hurryup 30 -endmaps help endhelp monsters -1 4 27 -! 18 16 -r 10 4 -r 23 8 -r 23 16 -r 12 20 -r 28 20 -r 25 24 -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 +0 4 27 +23 18 16 +1 10 4 +1 23 8 +1 23 16 +1 12 20 +1 28 20 +1 25 24 +1 30 28 +17 20 12 +16 19 12 +16 21 12 +15 19 4 +15 8 4 +16 5 24 +16 7 24 +15 34 24 +15 32 24 +17 26 28 +17 26 28 +17 26 28 +17 26 28 +17 27 28 +17 27 28 +17 27 28 +17 27 28 +17 27 28 +17 27 28 +15 15 8 +15 26 8 +16 14 8 +16 27 8 +16 33 16 +15 7 16 endmonsters -exitdir -2 +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, diff --git a/world1/level6.dat b/world1/level6.dat index 85733d6..bd9101d 100644 --- a/world1/level6.dat +++ b/world1/level6.dat @@ -1,50 +1,49 @@ bgfile bg 0 hurryup 248 -endmaps help Rolling logs will push you along. endhelp monsters -1 5 25 -! 19 1 -P 21 1 -Y 8 21 -Y 31 21 -Y 29 21 -Y 27 21 -Y 10 21 -Y 12 21 -P 18 1 -P 16 5 -P 23 5 -? 6 21 -r 11 21 -r 19 5 -Y 13 17 -Y 14 17 -Y 15 17 -Y 26 17 -Y 25 17 -Y 24 17 -@ 19 17 -@ 20 17 -@ 13 13 -@ 15 13 -@ 24 13 -@ 27 13 -@ 19 9 -@ 20 9 -Y 23 9 -Y 24 9 -Y 15 9 -Y 16 9 -C 20 1 -r 22 9 -r 26 13 -r 16 17 +0 5 25 +23 19 1 +17 21 1 +15 8 21 +15 31 21 +15 29 21 +15 27 21 +15 10 21 +15 12 21 +17 18 1 +17 16 5 +17 23 5 +14 6 21 +1 11 21 +1 19 5 +15 13 17 +15 14 17 +15 15 17 +15 26 17 +15 25 17 +15 24 17 +16 19 17 +16 20 17 +16 13 13 +16 15 13 +16 24 13 +16 27 13 +16 19 9 +16 20 9 +15 23 9 +15 24 9 +15 15 9 +15 16 9 +18 20 1 +1 22 9 +1 26 13 +1 16 17 endmonsters -exitdir -2 +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,35,1,1,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, diff --git a/world1/level7.5.dat b/world1/level7.5.dat index b0a334d..4ebf040 100644 --- a/world1/level7.5.dat +++ b/world1/level7.5.dat @@ -1,52 +1,51 @@ bgfile backgrounds/forest2.png bg 0 hurryup 30 -endmaps help endhelp monsters -1 4 28 -! 33 28 -S 9 3 -S 34 3 -r 3 8 -r 37 8 -r 9 13 -S 30 13 -S 3 18 -r 11 23 -S 35 23 -Y 28 23 -Y 11 23 -Y 30 23 -Y 9 23 -Y 7 23 -Y 5 23 -Y 3 23 -Y 32 23 -Y 34 23 -Y 36 23 -@ 30 18 -@ 32 18 -@ 36 18 -@ 34 18 -r 37 18 -@ 3 18 -@ 5 18 -@ 7 18 -@ 9 18 -P 32 13 -P 34 13 -P 36 13 -P 7 13 -P 5 13 -P 3 13 -@ 34 8 -@ 36 8 -@ 3 8 -@ 5 8 -P 36 3 -P 3 3 +0 4 28 +23 33 28 +12 9 3 +12 34 3 +1 3 8 +1 37 8 +1 9 13 +12 30 13 +12 3 18 +1 11 23 +12 35 23 +15 28 23 +15 11 23 +15 30 23 +15 9 23 +15 7 23 +15 5 23 +15 3 23 +15 32 23 +15 34 23 +15 36 23 +16 30 18 +16 32 18 +16 36 18 +16 34 18 +1 37 18 +16 3 18 +16 5 18 +16 7 18 +16 9 18 +17 32 13 +17 34 13 +17 36 13 +17 7 13 +17 5 13 +17 3 13 +16 34 8 +16 36 8 +16 3 8 +16 5 8 +17 36 3 +17 3 3 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, diff --git a/world1/level7.dat b/world1/level7.dat index f07f0a8..6a319bf 100644 --- a/world1/level7.dat +++ b/world1/level7.dat @@ -1,31 +1,30 @@ bgfile backgrounds/forest2.png bg 0 hurryup 30 -endmaps help endhelp monsters -1 2 28 -! 27 10 -a 21 4 -r 7 8 -r 32 13 -r 17 18 -r 28 22 -P 17 10 -P 18 10 -@ 19 10 -@ 16 10 -Y 20 10 -Y 15 10 -Y 10 18 -Y 23 22 -Y 30 22 -Y 30 13 -Y 38 13 -Y 9 8 -Y 2 8 -a 4 8 +0 2 28 +23 27 10 +6 21 4 +1 7 8 +1 32 13 +1 17 18 +1 28 22 +17 17 10 +17 18 10 +16 19 10 +16 16 10 +15 20 10 +15 15 10 +15 10 18 +15 23 22 +15 30 22 +15 30 13 +15 38 13 +15 9 8 +15 2 8 +6 4 8 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, diff --git a/world1/level8.5.dat b/world1/level8.5.dat index e6c9730..9b444ed 100644 --- a/world1/level8.5.dat +++ b/world1/level8.5.dat @@ -1,18 +1,17 @@ bgfile bg 0 hurryup 30 -endmaps help endhelp monsters -1 1 23 -! 21 23 -a 36 7 -a 2 9 -a 21 15 -a 12 23 -a 29 23 -s 28 1 +6 36 7 +6 2 9 +6 21 15 +7 28 1 +23 37 20 +0 1 20 +6 30 19 +6 8 20 endmonsters exitdir 1 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, @@ -36,12 +35,12 @@ 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,1,1,0,0,0,9,9,9,9,9,9,0,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,0,0,10,9,9,9,9,0,0,1,1,4, +4,23,23,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,23,23,4, 4,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,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,20,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,20,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,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,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, diff --git a/world1/level8.dat b/world1/level8.dat index 2c50054..eb6ca85 100644 --- a/world1/level8.dat +++ b/world1/level8.dat @@ -1,52 +1,51 @@ bgfile backgrounds/forest2.png bg 0 hurryup 60 -endmaps help endhelp monsters -1 20 12 -! 20 12 -@ 11 5 -@ 12 9 -@ 27 9 -@ 28 5 -@ 31 28 -@ 32 15 -@ 34 15 -@ 5 15 -@ 5 28 -@ 7 15 -P 10 19 -P 11 15 -P 19 5 -P 20 5 -P 21 5 -P 28 15 -P 29 19 -P 30 15 -P 9 15 -S 7 5 -Y 11 9 -Y 13 9 -Y 26 9 -Y 28 9 -Y 3 15 -Y 30 28 -Y 32 28 -Y 36 15 -Y 4 28 -Y 6 28 -a 31 3 -a 7 19 -r 27 5 -r 16 5 -r 10 12 -r 29 12 -r 6 15 -r 31 15 +0 20 12 +23 20 12 +16 11 5 +16 12 9 +16 27 9 +16 28 5 +16 31 28 +16 32 15 +16 34 15 +16 5 15 +16 5 28 +16 7 15 +17 10 19 +17 11 15 +17 19 5 +17 20 5 +17 21 5 +17 28 15 +17 29 19 +17 30 15 +17 9 15 +12 7 5 +15 11 9 +15 13 9 +15 26 9 +15 28 9 +15 3 15 +15 30 28 +15 32 28 +15 36 15 +15 4 28 +15 6 28 +6 31 3 +6 7 19 +1 27 5 +1 16 5 +1 10 12 +1 29 12 +1 6 15 +1 31 15 endmonsters -exitdir 2 +exitdir 1 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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, @@ -60,7 +59,7 @@ exitdir 2 4,0,0,0,7,0,0,0,0,22,20,20,20,20,20,22,0,0,0,0,0,0,0,0,22,20,20,20,20,20,22,0,0,0,0,7,0,0,0,4, 4,0,0,0,7,0,0,0,0,0,0,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,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,35,1,1,1,34,0,0,0,0,20,20,20,0,0,0,35,1,1,1,34,0,0,0,0,0,0,0,0,0,4, +4,0,0,0,0,0,0,0,0,0,35,1,40,40,34,0,0,0,0,20,20,20,0,0,0,35,1,40,40,34,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,14,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,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,25,25,25,25,25,0,0,0,0,0,10,10,10,10,10,10,10,10,10,0,0,4, @@ -76,14 +75,10 @@ exitdir 2 4,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,4, 4,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,12,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,4, 4,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,13,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,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, +0,1,1,1,1,1,1,1,1,1,1,40,40,40,40,1,1,1,40,40,40,40,1,40,40,40,1,1,1,1,40,40,40,40,40,1,40,40,1,4, layer2 4,6,8 35,6,8 -12,13,40 -13,13,40 -27,13,40 -28,13,40 10,20,41 29,20,41 10,21,42 @@ -93,25 +88,4 @@ layer2 15,23,42 24,23,43 0,29,39 -3,29,40 -4,29,40 -5,29,40 -6,29,40 -7,29,40 -11,29,40 -12,29,40 -13,29,40 -18,29,40 -19,29,40 -20,29,40 -23,29,40 -24,29,40 -25,29,40 -30,29,40 -31,29,40 -32,29,40 -33,29,40 -34,29,40 -36,29,40 -37,29,40 39,29,38 diff --git a/world1/level80.dat b/world1/level80.dat index c3a8d1a..3efd7e1 100644 --- a/world1/level80.dat +++ b/world1/level80.dat @@ -1,7 +1,6 @@ tileset green bg 0 hurryup 60 -endmaps help endhelp monsters diff --git a/world1/level9.5.dat b/world1/level9.5.dat index b3c59c7..85cb06d 100644 --- a/world1/level9.5.dat +++ b/world1/level9.5.dat @@ -1,7 +1,6 @@ tileset green bg 0 hurryup 90 -endmaps help endhelp monsters diff --git a/world1/level9.dat b/world1/level9.dat index 9f6897a..4769bef 100644 --- a/world1/level9.dat +++ b/world1/level9.dat @@ -1,59 +1,58 @@ bgfile backgrounds/forest2.png bg 0 hurryup 616 -endmaps help endhelp monsters -1 5 26 -! 27 6 -C 28 26 -C 35 3 -C 16 14 -r 36 9 -S 17 22 -Y 11 18 -Y 12 18 -Y 15 18 -Y 13 18 -Y 14 18 -Y 28 18 -Y 26 18 -Y 25 18 -Y 27 18 -Y 24 18 -@ 16 18 -@ 17 18 -@ 19 18 -@ 23 18 -@ 22 18 -@ 20 18 -Y 21 18 -Y 18 18 -P 3 3 -P 1 3 -@ 25 6 -@ 22 6 -@ 21 13 -@ 20 13 -@ 33 9 -@ 32 3 -Y 20 6 -Y 15 9 -Y 11 9 -Y 23 26 -Y 15 26 -Y 24 22 -@ 21 22 -@ 11 22 -@ 20 26 -@ 38 9 -a 28 14 -a 10 2 -Y 3 12 -r 2 3 +0 5 26 +23 27 6 +18 28 26 +18 35 3 +18 16 14 +1 36 9 +12 17 22 +15 11 18 +15 12 18 +15 15 18 +15 13 18 +15 14 18 +15 28 18 +15 26 18 +15 25 18 +15 27 18 +15 24 18 +16 16 18 +16 17 18 +16 19 18 +16 23 18 +16 22 18 +16 20 18 +15 21 18 +15 18 18 +17 3 3 +17 1 3 +16 25 6 +16 22 6 +16 21 13 +16 20 13 +16 33 9 +16 32 3 +15 20 6 +15 15 9 +15 11 9 +15 23 26 +15 15 26 +15 24 22 +16 21 22 +16 11 22 +16 20 26 +16 38 9 +6 28 14 +6 10 2 +15 3 12 +1 2 3 endmonsters -exitdir 2 +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, @@ -132,7 +131,7 @@ layer2 28,23,28 29,23,28 34,23,37 -37,23,7 +37,23,8 30,24,42 36,24,43 37,24,7 diff --git a/world1/level99.dat b/world1/level99.dat index 8742e1a..3cd12d4 100644 --- a/world1/level99.dat +++ b/world1/level99.dat @@ -1,16 +1,15 @@ bgfile backgrounds/snow1.png bg 0 hurryup 30 -endmaps help endhelp monsters -1 26 13 -P 1 13 -P 7 13 -r 17 13 -r 37 12 -! 31 13 +0 26 13 +23 31 13 +17 1 13 +17 7 13 +1 17 13 +1 37 12 endmonsters exitdir 1 1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4, @@ -27,17 +26,17 @@ exitdir 1 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,4, 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,4, 4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,4, -4,1,1,1,1,1,1,1,16,16,16,16,16,16,16,1,1,1,1,1,1,16,16,16,16,1,1,1,1,1,1,1,1,1,1,1,0,0,0,4, -4,4,4,4,4,4,4,4,15,15,15,15,15,15,15,15,15,15,15,15,1,15,15,15,15,4,4,4,4,4,4,4,4,4,4,4,0,0,0,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,4,4,4,4,4,4,4,4,4,4,4,1,1,1,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,4,4,4,4,4,4,4,4,4,4,4,0,0,0,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,4,4,4,4,4,4,4,4,4,4,4,0,0,0,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,4,4,4,4,4,4,4,4,4,4,4,1,1,1,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,4,4,4,4,4,4,4,4,4,4,4,0,0,0,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,4,4,4,4,4,4,4,4,4,4,4,0,0,0,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,4,4,4,4,4,4,4,4,4,4,4,1,1,1,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,4,4,4,4,4,4,4,4,4,4,4,0,0,0,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,4,4,4,4,4,4,4,4,4,4,4,0,0,0,4, +4,1,1,1,1,1,1,1,16,16,16,16,16,16,16,1,1,1,1,1,1,16,16,16,16,23,23,23,23,23,23,23,23,23,23,23,0,0,0,4, +4,4,4,4,4,4,4,4,15,15,15,15,15,15,15,15,15,15,15,15,1,15,15,15,15,4,4,0,0,0,0,0,4,4,4,4,0,0,0,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,4,4,0,0,0,0,0,4,4,4,4,1,1,1,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,4,4,0,0,0,0,0,4,4,4,4,0,0,0,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,4,4,0,0,0,0,0,4,4,4,4,0,0,0,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,4,4,0,0,0,0,0,4,4,4,4,1,1,1,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,4,4,0,0,0,0,0,4,4,4,4,0,0,0,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,4,4,0,0,0,0,0,4,4,4,4,0,0,0,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,4,4,0,0,0,0,0,4,4,4,4,1,1,1,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,4,4,0,0,0,0,0,4,4,4,4,0,0,0,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,4,4,11,11,11,11,11,4,4,4,4,0,0,0,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,1,1,1,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,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, diff --git a/world1/levelxxx.dat b/world1/levelxxx.dat index 79a5331..c8ed835 100644 --- a/world1/levelxxx.dat +++ b/world1/levelxxx.dat @@ -1,7 +1,6 @@ tileset green bg 0 hurryup 30 -endmaps ~~00000000000000000000000000000000000000 ~~00000000000000000000000000000000000000 ~~00000000000000000000000000000000000000