(x 5996)
(y 205)
(sprite "images/powerups/potions/red-potion.sprite")
- (script "levelflip();")
+ (script "Level.flip_vertically();")
)
(powerup
(x 6423)
(y 427)
(sprite "images/powerups/potions/red-potion.sprite")
- (script "levelflip();")
+ (script "Level.flip_vertically();")
)
)
)
#include "lisp/lisp.hpp"
#include "lisp/parser.hpp"
#include "resources.hpp"
-#include "worldmap.hpp"
#include "misc.hpp"
#include "statistics.hpp"
#include "timer.hpp"
void
MainLoop::exit_screen()
{
+ if (screen_stack.size() < 1)
+ {
+ quit();
+ return;
+ }
next_screen.reset(screen_stack.back());
nextpush = false;
screen_stack.pop_back();
WORLDMAP_SOUTH = 0x0002,
WORLDMAP_EAST = 0x0004,
WORLDMAP_WEST = 0x0008,
-
- WORLDMAP_STOP = 0x0010
+
+ WORLDMAP_STOP = 0x0010,
+
+ // convenience values ("C" stands for crossroads)
+ WORLDMAP_CNSE = WORLDMAP_NORTH | WORLDMAP_SOUTH | WORLDMAP_EAST,
+ WORLDMAP_CNSW = WORLDMAP_NORTH | WORLDMAP_SOUTH | WORLDMAP_WEST,
+ WORLDMAP_CNEW = WORLDMAP_NORTH | WORLDMAP_EAST | WORLDMAP_WEST,
+ WORLDMAP_CSEW = WORLDMAP_SOUTH | WORLDMAP_EAST | WORLDMAP_WEST,
+ WORLDMAP_CNSEW = WORLDMAP_NORTH | WORLDMAP_SOUTH | WORLDMAP_EAST | WORLDMAP_WEST
};
struct ImageSpec {
const Tile* tile = at(tux->get_tile_pos());
- if (tile->getData() & Tile::WORLDMAP_NORTH
+ // first, test for crossroads
+ if (tile->getData() & Tile::WORLDMAP_CNSE || tile->getData() && Tile::WORLDMAP_CNSW
+ || tile->getData() & Tile::WORLDMAP_CNEW || tile->getData() && Tile::WORLDMAP_CSEW
+ || tile->getData() & Tile::WORLDMAP_CNSEW)
+ dir = D_NONE;
+ else if (tile->getData() & Tile::WORLDMAP_NORTH
&& tux->back_direction != D_NORTH)
dir = D_NORTH;
else if (tile->getData() & Tile::WORLDMAP_SOUTH