diff --git a/edit.c b/edit.c index f2e5632..cb10955 100644 --- a/edit.c +++ b/edit.c @@ -208,30 +208,28 @@ int main (int argc, char **argv) { y = (my / TILEH); /* checks */ - if (toggletimer == 0) { - // can only have one player start pos - if (selsprite == P_PLAYER) { - /* does a player start pos already exist? */ - sprite_t *s; - for (s = sprite ; s ; s = s->next) { - if (s->id == P_PLAYER) { - // 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(); - } + // can only have one player start pos + if (selsprite == P_PLAYER) { + /* does a player start pos already exist? */ + sprite_t *s; + for (s = sprite ; s ; s = s->next) { + if (s->id == P_PLAYER) { + // 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(); } - } 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; - } + } + } 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; } } } @@ -239,16 +237,19 @@ int main (int argc, char **argv) { if (!placed) { - /* place selected sprite at mouse position - (locked to a til) */ - if (selsprite == P_HELP) { - addsprite(selsprite, x*TILEW+(TILEW/2),y*TILEH+TILEH,"FILL ME IN", B_TRUE); - } else { - addsprite(selsprite, x*TILEW+(TILEW/2),y*TILEH+TILEH,"something", B_TRUE); + 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", B_TRUE); + } else { + addsprite(selsprite, x*TILEW+(TILEW/2),y*TILEH+TILEH,"something", B_TRUE); + } + printf("added a sprite\n"); + toggletimer = 30; + modified = B_TRUE; + drawsprites(); } - toggletimer = 30; - modified = B_TRUE; - drawsprites(); } } @@ -307,6 +308,7 @@ int main (int argc, char **argv) { drawtile(screen,x,y); } } + printf("cleared level\n"); } } diff --git a/world1/level10.dat b/world1/level10.dat index 8e74b6b..625b38a 100644 --- a/world1/level10.dat +++ b/world1/level10.dat @@ -9,10 +9,29 @@ monsters C 33 7 C 11 13 r 13 5 -r 19 21 r 7 17 -S 28 24 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 endmonsters 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, 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,