1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 06:27:17 +00:00

nilrider:: define layers

This commit is contained in:
Zeno Rogue 2024-08-20 11:05:43 +02:00
parent 74f6937b64
commit ae4520d410
2 changed files with 8 additions and 4 deletions

View File

@ -631,10 +631,10 @@ void load_level(const string& fname) {
};
}
else if(cmd == "LAYER") {
auto n = new level(lev);
n->name = param;
lev.sublevels.push_back(n);
n->map_tiles = {};
csub = new level(lev);
csub->name = param;
lev.sublevels.push_back(csub);
csub->map_tiles = {};
}
}
if(lev.startx < 0 || lev.starty < 0 || lev.starty >= isize(lev.map_tiles) || lev.startx >= isize(lev.map_tiles[0]))

View File

@ -60,3 +60,7 @@ FUNCTION exp(-x*x-y*y)
# if you need more layers: enter 'LAYER <name>' then describe the layer, using the same format, except DESC and START are irrelevant.
# MAP is necessary. FUNCTION and BOUNDS will be copied from the main layer if not provided.
LAYER below
MAP F
FUNCTION -1