3 // SuperTux - A Jump'n Run
4 // Copyright (C) 2004 Ingo Ruhnke <grumbel@gmx.de>
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 #include "app/globals.h"
27 #include "video/surface.h"
28 #include "video/screen.h"
29 #include "video/drawing_context.h"
30 #include "utils/lispreader.h"
32 #include "app/setup.h"
35 #include "audio/sound_manager.h"
36 #include "resources.h"
37 #include "app/gettext.h"
40 Menu* worldmap_menu = 0;
42 namespace WorldMapNS {
44 Direction reverse_dir(Direction direction)
63 direction_to_string(Direction direction)
81 string_to_direction(const std::string& directory)
83 if (directory == "west")
85 else if (directory == "east")
87 else if (directory == "north")
89 else if (directory == "south")
95 TileManager::TileManager()
97 std::string stwt_filename = datadir + "/images/worldmap/antarctica.stwt";
98 lisp_object_t* root_obj = lisp_read_from_file(stwt_filename);
101 Termination::abort("Couldn't load file", stwt_filename);
103 if (strcmp(lisp_symbol(lisp_car(root_obj)), "supertux-worldmap-tiles") == 0)
105 lisp_object_t* cur = lisp_cdr(root_obj);
107 while(!lisp_nil_p(cur))
109 lisp_object_t* element = lisp_car(cur);
111 if (strcmp(lisp_symbol(lisp_car(element)), "tile") == 0)
114 std::string filename = "<invalid>";
116 Tile* tile = new Tile;
122 tile->auto_walk = false;
124 LispReader reader(lisp_cdr(element));
125 reader.read_int("id", id);
126 reader.read_bool("north", tile->north);
127 reader.read_bool("south", tile->south);
128 reader.read_bool("west", tile->west);
129 reader.read_bool("east", tile->east);
130 reader.read_bool("stop", tile->stop);
131 reader.read_bool("auto-walk", tile->auto_walk);
132 reader.read_string("image", filename);
134 tile->sprite = new Surface(
135 datadir + "/images/worldmap/" + filename,
138 if (id >= int(tiles.size()))
145 puts("Unhandled symbol");
159 TileManager::~TileManager()
161 for(std::vector<Tile*>::iterator i = tiles.begin(); i != tiles.end(); ++i)
166 TileManager::get(int i)
168 assert(i >=0 && i < int(tiles.size()));
172 //---------------------------------------------------------------------------
174 Tux::Tux(WorldMap* worldmap_)
175 : worldmap(worldmap_)
177 largetux_sprite = new Surface(datadir + "/images/worldmap/tux.png", true);
178 firetux_sprite = new Surface(datadir + "/images/worldmap/firetux.png", true);
179 smalltux_sprite = new Surface(datadir + "/images/worldmap/smalltux.png", true);
183 tile_pos.x = worldmap->get_start_x();
184 tile_pos.y = worldmap->get_start_y();
186 input_direction = D_NONE;
191 delete smalltux_sprite;
192 delete firetux_sprite;
193 delete largetux_sprite;
197 Tux::draw(DrawingContext& context, const Vector& offset)
199 Vector pos = get_pos();
200 switch (player_status.bonus)
202 case PlayerStatus::GROWUP_BONUS:
203 context.draw_surface(largetux_sprite,
204 Vector(pos.x + offset.x, pos.y + offset.y - 10), LAYER_OBJECTS);
206 case PlayerStatus::FLOWER_BONUS:
207 context.draw_surface(firetux_sprite,
208 Vector(pos.x + offset.x, pos.y + offset.y - 10), LAYER_OBJECTS);
210 case PlayerStatus::NO_BONUS:
211 context.draw_surface(smalltux_sprite,
212 Vector(pos.x + offset.x, pos.y + offset.y - 10), LAYER_OBJECTS);
221 float x = tile_pos.x * 32;
222 float y = tile_pos.y * 32;
242 return Vector((int)x, (int)y);
254 Tux::action(float delta)
258 if (input_direction != D_NONE)
260 WorldMap::SpecialTile* special_tile = worldmap->at_special_tile();
262 // We got a new direction, so lets start walking when possible
264 if ((!special_tile || special_tile->solved || special_tile->level_name.empty())
265 && worldmap->path_ok(input_direction, tile_pos, &next_tile))
267 tile_pos = next_tile;
269 direction = input_direction;
270 back_direction = reverse_dir(direction);
272 else if (input_direction == back_direction)
274 std::cout << "Back triggered" << std::endl;
276 direction = input_direction;
277 tile_pos = worldmap->get_next_tile(tile_pos, direction);
278 back_direction = reverse_dir(direction);
284 // Let tux walk a few pixels (20 pixel/sec)
285 offset += 20.0f * delta;
288 { // We reached the next tile, so we check what to do now
291 if (worldmap->at(tile_pos)->stop || worldmap->at_special_tile())
297 if (worldmap->at(tile_pos)->auto_walk)
298 { // Turn to a new direction
299 Tile* tile = worldmap->at(tile_pos);
300 Direction dir = D_NONE;
302 if (tile->north && back_direction != D_NORTH)
304 else if (tile->south && back_direction != D_SOUTH)
306 else if (tile->east && back_direction != D_EAST)
308 else if (tile->west && back_direction != D_WEST)
314 back_direction = reverse_dir(direction);
318 // Should never be reached if tiledata is good
324 // Walk automatically to the next tile
326 if (worldmap->path_ok(direction, tile_pos, &next_tile))
328 tile_pos = next_tile;
332 puts("Tilemap data is buggy");
340 //---------------------------------------------------------------------------
350 //---------------------------------------------------------------------------
354 tile_manager = new TileManager();
355 //tux = new Tux(this);
363 level_sprite = new Surface(datadir + "/images/worldmap/levelmarker.png", true);
364 leveldot_green = new Surface(datadir + "/images/worldmap/leveldot_green.png", true);
365 leveldot_red = new Surface(datadir + "/images/worldmap/leveldot_red.png", true);
367 input_direction = D_NONE;
371 music = "SALCON.MOD";
374 WorldMap::~WorldMap()
380 delete leveldot_green;
387 lisp_object_t* root_obj = lisp_read_from_file(datadir + "/special_tiles/worldmap/" + map_filename);
389 Termination::abort("Couldn't load file", datadir + "/special_tiles/worldmap/" + map_filename);
391 if (strcmp(lisp_symbol(lisp_car(root_obj)), "supertux-worldmap") == 0)
393 lisp_object_t* cur = lisp_cdr(root_obj);
395 while(!lisp_nil_p(cur))
397 lisp_object_t* element = lisp_car(cur);
399 if (strcmp(lisp_symbol(lisp_car(element)), "tilemap") == 0)
401 LispReader reader(lisp_cdr(element));
402 reader.read_int("width", width);
403 reader.read_int("height", height);
404 reader.read_int_vector("data", tilemap);
406 else if (strcmp(lisp_symbol(lisp_car(element)), "properties") == 0)
408 LispReader reader(lisp_cdr(element));
409 reader.read_string("name", name, true);
410 reader.read_string("music", music);
411 reader.read_int("start_pos_x", start_x);
412 reader.read_int("start_pos_y", start_y);
414 else if (strcmp(lisp_symbol(lisp_car(element)), "special_tiles") == 0)
416 lisp_object_t* cur = lisp_cdr(element);
418 while(!lisp_nil_p(cur))
420 lisp_object_t* element = lisp_car(cur);
422 if (strcmp(lisp_symbol(lisp_car(element)), "special-tile") == 0)
424 SpecialTile special_tile;
425 LispReader reader(lisp_cdr(element));
426 special_tile.solved = false;
428 special_tile.north = true;
429 special_tile.east = true;
430 special_tile.south = true;
431 special_tile.west = true;
433 reader.read_string("extro-filename", special_tile.extro_filename);
434 reader.read_string("map-message", special_tile.display_map_message);
435 reader.read_string("next-world", special_tile.next_worldmap);
436 reader.read_string("level", special_tile.level_name, true);
437 reader.read_int("x", special_tile.x);
438 reader.read_int("y", special_tile.y);
439 special_tile.auto_path = true;
440 reader.read_bool("auto-path", special_tile.auto_path);
441 special_tile.swap_x = special_tile.swap_y = -1;
442 reader.read_int("swap-x", special_tile.swap_x);
443 reader.read_int("swap-y", special_tile.swap_y);
444 special_tile.vertical_flip = false;
445 reader.read_bool("flip-special_tile", special_tile.vertical_flip);
446 special_tile.quit_worldmap = false;
447 reader.read_bool("exit-game", special_tile.quit_worldmap);
449 special_tiles.push_back(special_tile);
452 /* Kept for backward compability */
453 else if (strcmp(lisp_symbol(lisp_car(element)), "level") == 0)
455 SpecialTile special_tile;
456 LispReader reader(lisp_cdr(element));
457 special_tile.solved = false;
459 special_tile.north = true;
460 special_tile.east = true;
461 special_tile.south = true;
462 special_tile.west = true;
464 reader.read_string("extro-filename", special_tile.extro_filename);
465 if(!special_tile.extro_filename.empty())
466 special_tile.quit_worldmap = true;
467 reader.read_string("name", special_tile.level_name, true);
468 reader.read_int("x", special_tile.x);
469 reader.read_int("y", special_tile.y);
470 special_tile.vertical_flip = false;
471 special_tile.swap_x = special_tile.swap_y = -1;
473 special_tiles.push_back(special_tile);
492 void WorldMap::get_level_title(SpecialTile& special_tile)
494 /** get special_tile's title */
495 special_tile.title = "<no title>";
497 LispReader* reader = LispReader::load(datadir + "/special_tiles/" + special_tile.level_name, "supertux-special_tile");
500 std::cerr << "Error: Could not open special_tile file. Ignoring...\n";
504 reader->read_string("name", special_tile.title, true);
509 WorldMap::on_escape_press()
511 // Show or hide the menu
513 Menu::set_current(worldmap_menu);
515 Menu::set_current(0);
519 WorldMap::get_input()
522 input_direction = D_NONE;
525 while (SDL_PollEvent(&event))
529 Menu::current()->event(event);
536 Termination::abort("Received window close", "");
540 switch(event.key.keysym.sym)
554 case SDL_JOYAXISMOTION:
555 if (event.jaxis.axis == joystick_keymap.x_axis)
557 if (event.jaxis.value < -joystick_keymap.dead_zone)
558 input_direction = D_WEST;
559 else if (event.jaxis.value > joystick_keymap.dead_zone)
560 input_direction = D_EAST;
562 else if (event.jaxis.axis == joystick_keymap.y_axis)
564 if (event.jaxis.value > joystick_keymap.dead_zone)
565 input_direction = D_SOUTH;
566 else if (event.jaxis.value < -joystick_keymap.dead_zone)
567 input_direction = D_NORTH;
571 case SDL_JOYBUTTONDOWN:
572 if (event.jbutton.button == joystick_keymap.b_button)
574 else if (event.jbutton.button == joystick_keymap.start_button)
584 if (!Menu::current())
586 Uint8 *keystate = SDL_GetKeyState(NULL);
588 if (keystate[SDLK_LEFT])
589 input_direction = D_WEST;
590 else if (keystate[SDLK_RIGHT])
591 input_direction = D_EAST;
592 else if (keystate[SDLK_UP])
593 input_direction = D_NORTH;
594 else if (keystate[SDLK_DOWN])
595 input_direction = D_SOUTH;
600 WorldMap::get_next_tile(Vector pos, Direction direction)
623 WorldMap::path_ok(Direction direction, Vector old_pos, Vector* new_pos)
625 *new_pos = get_next_tile(old_pos, direction);
627 if (!(new_pos->x >= 0 && new_pos->x < width
628 && new_pos->y >= 0 && new_pos->y < height))
629 { // New position is outsite the tilemap
633 { // Check if we the tile allows us to go to new_pos
637 return (at(old_pos)->west && at(*new_pos)->east);
640 return (at(old_pos)->east && at(*new_pos)->west);
643 return (at(old_pos)->north && at(*new_pos)->south);
646 return (at(old_pos)->south && at(*new_pos)->north);
649 assert(!"path_ok() can't work if direction is NONE");
656 WorldMap::update(float delta)
658 if (enter_level && !tux->is_moving())
660 bool level_finished = true;
661 SpecialTile* special_tile = at_special_tile();
664 std::cout << "Nothing to enter at: "
665 << tux->get_tile_pos().x << ", " << tux->get_tile_pos().y << std::endl;
670 if(!special_tile->level_name.empty())
672 if (special_tile->x == tux->get_tile_pos().x &&
673 special_tile->y == tux->get_tile_pos().y)
675 PlayerStatus old_player_status = player_status;
677 std::cout << "Enter the current special_tile: " << special_tile->level_name << std::endl;
678 // do a shriking fade to the special_tile
679 shrink_fade(Vector((special_tile->x*32 + 16 + offset.x),(special_tile->y*32 + 16
681 GameSession session(datadir + "/special_tiles/" + special_tile->level_name,
682 ST_GL_LOAD_LEVEL_FILE, special_tile->vertical_flip);
684 switch (session.run())
686 case GameSession::ES_LEVEL_FINISHED:
688 level_finished = true;
689 bool old_level_state = special_tile->solved;
690 special_tile->solved = true;
692 if (session.get_current_sector()->player->got_power !=
693 session.get_current_sector()->player->NONE_POWER)
694 player_status.bonus = PlayerStatus::FLOWER_BONUS;
695 else if (session.get_current_sector()->player->size == BIG)
696 player_status.bonus = PlayerStatus::GROWUP_BONUS;
698 player_status.bonus = PlayerStatus::NO_BONUS;
700 if (old_level_state != special_tile->solved && special_tile->auto_path)
701 { // Try to detect the next direction to which we should walk
702 // FIXME: Mostly a hack
703 Direction dir = D_NONE;
705 Tile* tile = at(tux->get_tile_pos());
707 if (tile->north && tux->back_direction != D_NORTH)
709 else if (tile->south && tux->back_direction != D_SOUTH)
711 else if (tile->east && tux->back_direction != D_EAST)
713 else if (tile->west && tux->back_direction != D_WEST)
718 tux->set_direction(dir);
719 //tux->update(delta);
722 std::cout << "Walk to dir: " << dir << std::endl;
727 case GameSession::ES_LEVEL_ABORT:
728 level_finished = false;
729 /* In case the player's abort the special_tile, keep it using the old
730 status. But the minimum lives and no bonus. */
731 player_status.score = old_player_status.score;
732 player_status.distros = old_player_status.distros;
733 player_status.lives = std::min(old_player_status.lives, player_status.lives);
734 player_status.bonus = player_status.NO_BONUS;
737 case GameSession::ES_GAME_OVER:
739 level_finished = false;
740 /* draw an end screen */
741 /* in the future, this should make a dialog a la SuperMario, asking
742 if the player wants to restart the world map with no score and from
746 DrawingContext context;
747 context.draw_gradient(Color (200,240,220), Color(200,200,220),
750 context.draw_text_center(blue_text, _("GAMEOVER"),
751 Vector(0, 200), LAYER_FOREGROUND1);
753 sprintf(str, _("SCORE: %d"), player_status.score);
754 context.draw_text_center(gold_text, str,
755 Vector(0, 230), LAYER_FOREGROUND1);
757 sprintf(str, _("COINS: %d"), player_status.distros);
758 context.draw_text_center(gold_text, str,
759 Vector(0, screen->w - 32), LAYER_FOREGROUND1);
761 context.do_drawing();
764 wait_for_event(event,2000,5000,true);
767 player_status.reset();
770 case GameSession::ES_NONE:
772 // Should never be reached
776 SoundManager::get()->play_music(song);
777 Menu::set_current(0);
778 if (!savegame_file.empty())
779 savegame(savegame_file);
782 /* The porpose of the next checking is that if the player lost
783 the special_tile (in case there is one), don't show anything */
786 if (!special_tile->extro_filename.empty())
788 // Display a text file
789 display_text_file(special_tile->extro_filename, SCROLL_SPEED_MESSAGE, white_big_text , white_text, white_small_text, blue_text );
791 if (special_tile->swap_x != -1 && special_tile->swap_y != -1)
793 // TODO: add an effect, like a camera scrolling, or at least, a fading
794 tux->set_tile_pos(Vector(special_tile->swap_x, special_tile->swap_y));
796 if (!special_tile->next_worldmap.empty())
798 // Load given worldmap
799 loadmap(special_tile->next_worldmap);
801 if (special_tile->quit_worldmap)
808 tux->set_direction(input_direction);
811 Menu* menu = Menu::current();
816 if(menu == worldmap_menu)
818 switch (worldmap_menu->check())
820 case MNID_RETURNWORLDMAP: // Return to game
822 case MNID_QUITWORLDMAP: // Quit Worldmap
827 else if(menu == options_menu)
829 process_options_menu();
835 WorldMap::at(Vector p)
844 return tile_manager->get(tilemap[width * y + x]);
847 WorldMap::SpecialTile*
848 WorldMap::at_special_tile()
850 for(SpecialTiles::iterator i = special_tiles.begin(); i != special_tiles.end(); ++i)
852 if (i->x == tux->get_tile_pos().x &&
853 i->y == tux->get_tile_pos().y)
862 WorldMap::draw(DrawingContext& context, const Vector& offset)
864 for(int y = 0; y < height; ++y)
865 for(int x = 0; x < width; ++x)
867 Tile* tile = at(Vector(x, y));
868 context.draw_surface(tile->sprite,
869 Vector(x*32 + offset.x, y*32 + offset.y), LAYER_TILES);
872 for(SpecialTiles::iterator i = special_tiles.begin(); i != special_tiles.end(); ++i)
874 if(i->level_name.empty())
878 context.draw_surface(leveldot_green,
879 Vector(i->x*32 + offset.x, i->y*32 + offset.y), LAYER_TILES+1);
881 context.draw_surface(leveldot_red,
882 Vector(i->x*32 + offset.x, i->y*32 + offset.y), LAYER_TILES+1);
885 tux->draw(context, offset);
886 draw_status(context);
890 WorldMap::draw_status(DrawingContext& context)
893 sprintf(str, " %d", player_status.score);
895 context.draw_text(white_text, _("SCORE"), Vector(0, 0), LAYER_FOREGROUND1);
896 context.draw_text(gold_text, str, Vector(96, 0), LAYER_FOREGROUND1);
898 sprintf(str, "%d", player_status.distros);
899 context.draw_text(white_text, _("COINS"), Vector(screen->w/2 - 16*5, 0),
901 context.draw_text(gold_text, str, Vector(screen->w/2 + (16*5)/2, 0),
904 if (player_status.lives >= 5)
906 sprintf(str, "%dx", player_status.lives);
907 context.draw_text(gold_text, str,
908 Vector(screen->w - gold_text->get_text_width(str) - tux_life->w, 0),
910 context.draw_surface(tux_life, Vector(screen->w -
911 gold_text->get_text_width("9"), 0), LAYER_FOREGROUND1);
915 for(int i= 0; i < player_status.lives; ++i)
916 context.draw_surface(tux_life,
917 Vector(screen->w - tux_life->w*4 + (tux_life->w*i), 0),
920 context.draw_text(white_text, _("LIVES"),
921 Vector(screen->w - white_text->get_text_width(_("LIVES")) - white_text->get_text_width(" 99"), 0),
924 if (!tux->is_moving())
926 for(SpecialTiles::iterator i = special_tiles.begin(); i != special_tiles.end(); ++i)
928 if (i->x == tux->get_tile_pos().x &&
929 i->y == tux->get_tile_pos().y)
931 if(!i->level_name.empty())
936 context.draw_text_center(white_text, i->title,
937 Vector(0, screen->h - white_text->get_height() - 30),
941 /* Display a message in the map, if any as been selected */
942 if(!i->display_map_message.empty())
943 context.draw_text_center(gold_text, i->display_map_message,
944 Vector(0, screen->h - white_text->get_height() - 60),
955 Menu::set_current(0);
959 song = SoundManager::get()->load_music(datadir + "/music/" + music);
960 SoundManager::get()->play_music(song);
962 unsigned int last_update_time;
963 unsigned int update_time;
965 last_update_time = update_time = Ticks::get();
967 DrawingContext context;
970 float delta = ((float)(update_time-last_update_time))/100.0;
977 last_update_time = update_time;
978 update_time = Ticks::get();
980 Vector tux_pos = tux->get_pos();
983 offset.x = -tux_pos.x + screen->w/2;
984 offset.y = -tux_pos.y + screen->h/2;
986 if (offset.x > 0) offset.x = 0;
987 if (offset.y > 0) offset.y = 0;
989 if (offset.x < screen->w - width*32) offset.x = screen->w - width*32;
990 if (offset.y < screen->h - height*32) offset.y = screen->h - height*32;
993 draw(context, offset);
999 Menu::current()->draw(context);
1000 mouse_cursor->draw(context);
1003 context.do_drawing();
1010 WorldMap::savegame(const std::string& filename)
1015 std::cout << "savegame: " << filename << std::endl;
1016 std::ofstream out(filename.c_str());
1018 int nb_solved_levels = 0;
1019 for(SpecialTiles::iterator i = special_tiles.begin(); i != special_tiles.end(); ++i)
1025 out << "(supertux-savegame\n"
1027 << " (title \"" << name << " - " << nb_solved_levels << "/" << special_tiles.size() << "\")\n"
1028 << " (map \"" << map_filename << "\")\n"
1029 << " (lives " << player_status.lives << ")\n"
1030 << " (score " << player_status.score << ")\n"
1031 << " (distros " << player_status.distros << ")\n"
1032 << " (tux (x " << tux->get_tile_pos().x << ") (y " << tux->get_tile_pos().y << ")\n"
1033 << " (back \"" << direction_to_string(tux->back_direction) << "\")\n"
1034 << " (bonus \"" << bonus_to_string(player_status.bonus) << "\"))\n"
1035 << " (special_tiles\n";
1037 for(SpecialTiles::iterator i = special_tiles.begin(); i != special_tiles.end(); ++i)
1039 if (i->solved && !i->level_name.empty())
1041 out << " (special_tile (name \"" << i->level_name << "\")\n"
1042 << " (solved #t))\n";
1047 << " )\n\n;; EOF ;;" << std::endl;
1051 WorldMap::loadgame(const std::string& filename)
1053 std::cout << "loadgame: " << filename << std::endl;
1054 savegame_file = filename;
1055 map_filename = "icyisland.stwm";
1057 if (access(filename.c_str(), F_OK) != 0)
1063 lisp_object_t* savegame = lisp_read_from_file(filename);
1066 std::cout << "WorldMap:loadgame: File not found: " << filename << std::endl;
1071 lisp_object_t* cur = savegame;
1073 if (strcmp(lisp_symbol(lisp_car(cur)), "supertux-savegame") != 0)
1079 cur = lisp_cdr(cur);
1080 LispReader reader(cur);
1082 /* Get the Map filename and then load it before setting special_tile settings */
1083 reader.read_string("map", map_filename);
1086 reader.read_int("lives", player_status.lives);
1087 reader.read_int("score", player_status.score);
1088 reader.read_int("distros", player_status.distros);
1090 if (player_status.lives < 0)
1091 player_status.lives = START_LIVES;
1093 lisp_object_t* tux_cur = 0;
1094 if (reader.read_lisp("tux", tux_cur))
1097 std::string back_str = "none";
1098 std::string bonus_str = "none";
1100 LispReader tux_reader(tux_cur);
1101 tux_reader.read_float("x", p.x);
1102 tux_reader.read_float("y", p.y);
1103 tux_reader.read_string("back", back_str);
1104 tux_reader.read_string("bonus", bonus_str);
1106 player_status.bonus = string_to_bonus(bonus_str);
1107 tux->back_direction = string_to_direction(back_str);
1108 tux->set_tile_pos(p);
1111 lisp_object_t* level_cur = 0;
1112 if (reader.read_lisp("special_tiles", level_cur))
1116 lisp_object_t* sym = lisp_car(lisp_car(level_cur));
1117 lisp_object_t* data = lisp_cdr(lisp_car(level_cur));
1119 if (strcmp(lisp_symbol(sym), "special_tile") == 0)
1122 bool solved = false;
1124 LispReader level_reader(data);
1125 level_reader.read_string("name", name, true);
1126 level_reader.read_bool("solved", solved);
1128 for(SpecialTiles::iterator i = special_tiles.begin(); i != special_tiles.end(); ++i)
1130 if (name == i->level_name)
1135 level_cur = lisp_cdr(level_cur);
1139 lisp_free(savegame);
1143 WorldMap::loadmap(const std::string& filename)
1146 map_filename = filename;
1150 } // namespace WorldMapNS
1152 /* Local Variables: */