From c9d5bb9d68f7824029c0249a5a2ed0e9d640c858 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 19 Feb 2015 18:01:29 +0200 Subject: [PATCH] Fix some level flags, sokoban premapping --- dat/sokoban.des | 16 ++++++++-------- include/sp_lev.h | 5 ++--- src/mkmaze.c | 4 ---- src/sp_lev.c | 9 --------- util/lev_comp.l | 1 - 5 files changed, 10 insertions(+), 25 deletions(-) diff --git a/dat/sokoban.des b/dat/sokoban.des index f5aa0bdff..6b2d2b862 100644 --- a/dat/sokoban.des +++ b/dat/sokoban.des @@ -35,7 +35,7 @@ ### Bottom (first) level of Sokoban ### MAZE:"soko4-1",' ' -FLAGS:noteleport,hardfloor +FLAGS:noteleport,hardfloor,premapped GEOMETRY:center,center #12345678901234567890123456789012345678901234567890 MAP @@ -98,7 +98,7 @@ OBJECT:'/',random MAZE:"soko4-2",' ' -FLAGS:noteleport,hardfloor +FLAGS:noteleport,hardfloor,premapped GEOMETRY:center,center #12345678901234567890123456789012345678901234567890 MAP @@ -163,7 +163,7 @@ OBJECT:'/',random ### Second level ### MAZE:"soko3-1",' ' -FLAGS:noteleport +FLAGS:noteleport,premapped GEOMETRY:center,center #12345678901234567890123456789012345678901234567890 MAP @@ -239,7 +239,7 @@ OBJECT:'/',random MAZE:"soko3-2",' ' -FLAGS:noteleport +FLAGS:noteleport,premapped GEOMETRY:center,center #12345678901234567890123456789012345678901234567890 MAP @@ -308,7 +308,7 @@ OBJECT:'/',random ### Third level ### MAZE:"soko2-1",' ' -FLAGS:noteleport +FLAGS:noteleport,premapped GEOMETRY:center,center #12345678901234567890123456789012345678901234567890 MAP @@ -373,7 +373,7 @@ OBJECT:'/',random MAZE:"soko2-2",' ' -FLAGS:noteleport +FLAGS:noteleport,premapped GEOMETRY:center,center #12345678901234567890123456789012345678901234567890 MAP @@ -440,7 +440,7 @@ OBJECT:'/',random ### Top (last) level of Sokoban ### MAZE:"soko1-1",' ' -FLAGS:noteleport +FLAGS:noteleport,premapped GEOMETRY:center,center #12345678901234567890123456789012345678901234567890 MAP @@ -534,7 +534,7 @@ ENGRAVING:$place[0],burn,"Elbereth" MAZE:"soko1-2",' ' -FLAGS:noteleport +FLAGS:noteleport,premapped GEOMETRY:center,center #12345678901234567890123456789012345678901234567890 MAP diff --git a/include/sp_lev.h b/include/sp_lev.h index f2c61625b..f5905bac5 100644 --- a/include/sp_lev.h +++ b/include/sp_lev.h @@ -25,10 +25,9 @@ #define SHORTSIGHTED 0x00000008L #define ARBOREAL 0x00000010L #define MAZELEVEL 0x00000020L -#define PREMAPPED 0x00000040L +#define PREMAPPED 0x00000040L /* premapped level & sokoban rules */ #define SHROUD 0x00000080L -#define STORMY 0x00000100L -#define GRAVEYARD 0x00000200L +#define GRAVEYARD 0x00000100L /* different level layout initializers */ diff --git a/src/mkmaze.c b/src/mkmaze.c index 4270ba783..c8ae88f99 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -406,10 +406,6 @@ fixup_special() place_lregion(0,0,0,0,0,0,0,0,LR_BRANCH,(d_level *)0); } - /* KMH -- Sokoban levels */ - if(In_sokoban(&u.uz)) - sokoban_detect(); - /* Still need to add some stuff to level file */ if (Is_medusa_level(&u.uz)) { struct obj *otmp; diff --git a/src/sp_lev.c b/src/sp_lev.c index 0650a7bd1..fa2aa8984 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -2792,17 +2792,10 @@ spo_level_flags(coder) if (flags & NOMMAP) level.flags.nommap = 1; if (flags & SHORTSIGHTED) level.flags.shortsighted = 1; if (flags & ARBOREAL) level.flags.arboreal = 1; - /* - if (flags & NOFLIPX) coder->allow_flips &= ~1; - if (flags & NOFLIPY) coder->allow_flips &= ~2; if (flags & MAZELEVEL) level.flags.is_maze_lev = 1; if (flags & PREMAPPED) coder->premapped = TRUE; if (flags & SHROUD) level.flags.hero_memory = 0; - if (flags & STORMY) level.flags.stormy = 1; if (flags & GRAVEYARD) level.flags.graveyard = 1; - if (flags & SKYMAP) level.flags.sky = 1; - if (flags & FLAG_RNDVAULT) coder->allow_flips = 0; - */ opvar_free(flagdata); } @@ -5048,8 +5041,6 @@ next_opcode: remove_boundary_syms(); wallification(1, 0, COLNO-1, ROWNO-1); - /*flip_level_rnd(coder->allow_flips);*/ - count_features(); if (coder->premapped) sokoban_detect(); diff --git a/util/lev_comp.l b/util/lev_comp.l index 02ca2d4ee..b41397030 100644 --- a/util/lev_comp.l +++ b/util/lev_comp.l @@ -292,7 +292,6 @@ shortsighted { savetoken(yytext); yylval.i=SHORTSIGHTED; return FLAG_TYPE; } mazelevel { savetoken(yytext); yylval.i=MAZELEVEL; return FLAG_TYPE; } premapped { savetoken(yytext); yylval.i=PREMAPPED; return FLAG_TYPE; } shroud { savetoken(yytext); yylval.i=SHROUD; return FLAG_TYPE; } -stormy { savetoken(yytext); yylval.i=STORMY; return FLAG_TYPE; } graveyard { savetoken(yytext); yylval.i=GRAVEYARD; return FLAG_TYPE; } [0-9]+d[0-9]+ { char *p = strchr(yytext, 'd'); savetoken(yytext);