- Got rid of string_list_type (caution! Bugs with the replacement solutions are likely to happen, that will be fixed)
SVN-Revision: 1640
bool use_fullscreen;
bool debug_mode;
bool show_fps;
-float game_speed = 1.0f;
int joystick_num = 0;
char* level_startup_file = 0;
extern char* st_dir;
extern char* st_save_dir;
- extern float game_speed;
extern SDL_Joystick * js;
int wait_for_event(SDL_Event& event,unsigned int min_delay = 0, unsigned int max_delay = 0, bool empty_events = false);
/* Get all names of sub-directories in a certain directory. */
/* Returns the number of sub-directories found. */
/* Note: The user has to free the allocated space. */
-string_list_type FileSystem::dsubdirs(const char *rel_path,const char* expected_file)
+std::set<std::string> FileSystem::dsubdirs(const char *rel_path,const char* expected_file)
{
DIR *dirStructP;
struct dirent *direntp;
- string_list_type sdirs;
+ std::set<std::string> sdirs;
char filename[1024];
char path[1024];
- string_list_init(&sdirs);
sprintf(path,"%s/%s",st_dir,rel_path);
if((dirStructP = opendir(path)) != NULL)
{
continue;
}
- string_list_add_item(&sdirs,direntp->d_name);
+ sdirs.insert(direntp->d_name);
}
}
closedir(dirStructP);
}
}
- string_list_add_item(&sdirs,direntp->d_name);
+ sdirs.insert(direntp->d_name);
}
}
closedir(dirStructP);
return sdirs;
}
-string_list_type FileSystem::dfiles(const char *rel_path, const char* glob, const char* exception_str)
+std::set<std::string> FileSystem::dfiles(const char *rel_path, const char* glob, const char* exception_str)
{
DIR *dirStructP;
struct dirent *direntp;
- string_list_type sdirs;
+ std::set<std::string> sdirs;
char path[1024];
- string_list_init(&sdirs);
sprintf(path,"%s/%s",st_dir,rel_path);
if((dirStructP = opendir(path)) != NULL)
{
if(strstr(direntp->d_name,glob) == NULL)
continue;
- string_list_add_item(&sdirs,direntp->d_name);
+ sdirs.insert(direntp->d_name);
}
}
closedir(dirStructP);
if(strstr(direntp->d_name,glob) == NULL)
continue;
- string_list_add_item(&sdirs,direntp->d_name);
+ sdirs.insert(direntp->d_name);
}
}
closedir(dirStructP);
exit(ret);
}
-std::vector<std::string> FileSystem::read_directory(const std::string& pathname)
+std::set<std::string> FileSystem::read_directory(const std::string& pathname)
{
- std::vector<std::string> dirnames;
+ std::set<std::string> dirnames;
DIR* dir = opendir(pathname.c_str());
if (dir)
while((direntp = readdir(dir)))
{
- dirnames.push_back(direntp->d_name);
+ dirnames.insert(direntp->d_name);
}
closedir(dir);
#define SUPERTUX_SETUP_H
#include <vector>
+#include <set>
#include <string>
#include "../gui/menu.h"
#include "../special/base.h"
static int faccessible(const char *filename);
static int fcreatedir(const char* relative_dir);
static int fwriteable(const char *filename);
- static std::vector<std::string> read_directory(const std::string& pathname);
- static string_list_type dsubdirs(const char *rel_path, const char* expected_file);
- static string_list_type dfiles(const char *rel_path, const char* glob, const char* exception_str);
+ static std::set<std::string> read_directory(const std::string& pathname);
+ static std::set<std::string> dsubdirs(const char *rel_path, const char* expected_file);
+ static std::set<std::string> dfiles(const char *rel_path, const char* glob, const char* exception_str);
};
/// All you need to get an application up and running
pnew_item->input = (char*) malloc(sizeof(char));
pnew_item->input[0] = '\0';
- if(kind_ == MN_STRINGSELECT)
- {
- pnew_item->list = (string_list_type*) malloc(sizeof(string_list_type));
- string_list_init(pnew_item->list);
- }
- else
- pnew_item->list = NULL;
-
pnew_item->id = id;
pnew_item->int_p = int_p_;
+
+ pnew_item->list.second = 0;
pnew_item->input_flickering = false;
pnew_item->input_flickering_timer.init(true);
{
free(item[i].text);
free(item[i].input);
- string_list_free(item[i].list);
+ item[i].list.first.clear();
}
}
}
case MENU_ACTION_LEFT:
if(item[active_item].kind == MN_STRINGSELECT
- && item[active_item].list->num_items != 0)
+ && item[active_item].list.first.size() != 0)
{
- if(item[active_item].list->active_item > 0)
- --item[active_item].list->active_item;
+ if(item[active_item].list.second != item[active_item].list.first.begin())
+ --item[active_item].list.second;
else
- item[active_item].list->active_item = item[active_item].list->num_items-1;
+ item[active_item].list.second = item[active_item].list.first.end();
}
break;
case MENU_ACTION_RIGHT:
if(item[active_item].kind == MN_STRINGSELECT
- && item[active_item].list->num_items != 0)
+ && item[active_item].list.first.size() != 0)
{
- if(item[active_item].list->active_item < item[active_item].list->num_items-1)
- ++item[active_item].list->active_item;
+ if(item[active_item].list.second != item[active_item].list.first.end())
+ ++item[active_item].list.second;
else
- item[active_item].list->active_item = 0;
+ item[active_item].list.second = item[active_item].list.first.begin();
}
break;
int shadow_size = 2;
int text_width = int(text_font->get_text_width(pitem.text));
int input_width = int(text_font->get_text_width(pitem.input) + 10);
- int list_width =
- int(text_font->get_text_width(string_list_active(pitem.list)));
-
+ int list_width = 0;
+ if(pitem.list.second != 0)
+ list_width = int(text_font->get_text_width((*pitem.list.second)));
+
if (arrange_left)
x_pos += 24 - menu_width/2 + (text_width + input_width + list_width)/2;
Vector(list_pos_2, 18),
Color(0,0,0,128), LAYER_GUI - 5);
- context.draw_text_center(text_font, string_list_active(pitem.list),
+ context.draw_text_center(text_font, (*pitem.list.second),
Vector(text_pos, y_pos - int(text_font->get_height()/2)),
LAYER_GUI);
context.draw_text_center(text_font, pitem.text,
int menu_width = 0;
for(unsigned int i = 0; i < item.size(); ++i)
{
- int w = strlen(item[i].text) + (item[i].input ? strlen(item[i].input) + 1 : 0) + strlen(string_list_active(item[i].list));
+ int w = strlen(item[i].text) + (item[i].input ? strlen(item[i].input) + 1 : 0); //+ ((item[i].list.second != item[i].list.first.end()) ? (strlen((*(item[i].list.second)).c_str())) : 0);
if( w > menu_width )
{
menu_width = w;
void
Menu::draw(DrawingContext& context)
{
+
int menu_height = get_height();
- int menu_width = get_width();
+ int menu_width = get_width();
/* Draw a transparent background */
context.draw_filled_rect(
#define SUPERTUX_MENU_H
#include <vector>
+#include <set>
+#include <string>
+#include <utility>
#include "SDL.h"
#include "../video/font.h"
#include "../special/timer.h"
#include "../special/base.h"
-#include "../special/stringlist.h"
#include "../gui/mousecursor.h"
namespace SuperTux
char *input;
int *int_p; // used for setting keys (can be used for more stuff...)
int id; // item id
- string_list_type* list;
+ std::pair<std::set<std::string>, std::set<std::string>::iterator> list;
Menu* target_menu;
void change_text (const char *text);
+++ /dev/null
-// $Id$
-//
-// SuperTux
-// Copyright (C) 2004 Tobias Glaesser <tobi.web@gmx.de>
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-// 02111-1307, USA.
-
-#include "string.h"
-#include "stdlib.h"
-#include "../special/stringlist.h"
-
-using namespace SuperTux;
-
-void SuperTux::string_list_init(string_list_type* pstring_list)
-{
- pstring_list->num_items = 0;
- pstring_list->active_item = -1;
- pstring_list->item = NULL;
-}
-
-char* SuperTux::string_list_active(string_list_type* pstring_list)
-{
- if(pstring_list == NULL)
- return "";
-
- if(pstring_list->active_item != -1)
- return pstring_list->item[pstring_list->active_item];
- else
- return "";
-}
-
-void SuperTux::string_list_add_item(string_list_type* pstring_list,const char* str)
-{
- char *pnew_string;
- pnew_string = (char*) malloc(sizeof(char)*(strlen(str)+1));
- strcpy(pnew_string,str);
- ++pstring_list->num_items;
- pstring_list->item = (char**) realloc(pstring_list->item,sizeof(char**)*pstring_list->num_items);
- pstring_list->item[pstring_list->num_items-1] = pnew_string;
- if(pstring_list->active_item == -1)
- pstring_list->active_item = 0;
-}
-
-void SuperTux::string_list_copy(string_list_type* pstring_list, string_list_type pstring_list_orig)
-{
- int i;
- string_list_free(pstring_list);
- for(i = 0; i < pstring_list_orig.num_items; ++i)
- string_list_add_item(pstring_list,pstring_list_orig.item[i]);
-}
-
-int SuperTux::string_list_find(string_list_type* pstring_list,const char* str)
-{
- int i;
- for(i = 0; i < pstring_list->num_items; ++i)
- {
- if(strcmp(pstring_list->item[i],str) == 0)
- {
- return i;
- }
- }
- return -1;
-}
-
-void SuperTux::string_list_sort(string_list_type* pstring_list)
-{
- int i,j,y;
-
- for(j = 0; j < pstring_list->num_items; ++j)
- for(i = 0; i < pstring_list->num_items-1; ++i)
- {
-
- y = strcmp(pstring_list->item[i],pstring_list->item[i+1]);
- if(y == 0)
- {
- continue;
- }
- else if(y < 0)
- {
- continue;
- }
- else if(y > 0)
- {
- char* char_pointer;
- char_pointer = pstring_list->item[i];
- pstring_list->item[i] = pstring_list->item[i+1];
- pstring_list->item[i+1] = char_pointer;
- continue;
- }
-
- }
-
-}
-
-void SuperTux::string_list_free(string_list_type* pstring_list)
-{
- if(pstring_list != NULL)
- {
- int i;
- for(i=0; i < pstring_list->num_items; ++i)
- free(pstring_list->item[i]);
- free(pstring_list->item);
- pstring_list->item = NULL;
- pstring_list->num_items = 0;
- pstring_list->active_item = -1;
- }
-}
-
+++ /dev/null
-// $Id$
-//
-// SuperTux
-// Copyright (C) 2004 Tobias Glaesser <tobi.web@gmx.de>
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-// 02111-1307, USA.
-
-#ifndef SUPERTUX_STRINGLIST_H
-#define SUPERTUX_STRINGLIST_H
-
-namespace SuperTux
- {
-
- struct string_list_type
- {
- int num_items;
- int active_item;
- char **item;
- };
-
- void string_list_init(string_list_type* pstring_list);
- char* string_list_active(string_list_type* pstring_list);
- void string_list_copy(string_list_type* pstring_list, string_list_type pstring_list_orig);
- int string_list_find(string_list_type* pstring_list, const char* str);
- void string_list_sort(string_list_type* pstring_list);
- void string_list_add_item(string_list_type* pstring_list, const char* str);
- void string_list_free(string_list_type* pstring_list);
-
-} //namespace SuperTux
-
-#endif /*SUPERTUX_STRINGLIST_H*/
-
if (root_obj->type == LISP_TYPE_EOF || root_obj->type == LISP_TYPE_PARSE_ERROR)
return;
- if (strcmp(lisp_symbol(lisp_car(root_obj)), "supertux-config") != 0)
+ if (strcmp(lisp_symbol(lisp_car(root_obj)), (package_symbol_name+"-config").c_str()) != 0)
return;
LispReader reader(lisp_cdr(root_obj));
if(config)
{
- fprintf(config, "(supertux-config\n");
+ fprintf(config, ("("+package_symbol_name+"-config\n").c_str());
fprintf(config, "\t;; the following options can be set to #t or #f:\n");
fprintf(config, "\t(fullscreen %s)\n", use_fullscreen ? "#t" : "#f");
fprintf(config, "\t(sound %s)\n", SoundManager::get()->sound_enabled() ? "#t" : "#f");
context = new DrawingContext();
+ if(debug_mode)
+ flip_level = true;
+
restart_level();
}
// 02111-1307, USA.
#include <assert.h>
-#include <unistd.h>
-
#include "app/setup.h"
#include "level.h"
#include "app/globals.h"
if (levels.empty())
{ // Level info file doesn't define any levels, so read the
// directory to see what we can find
- std::vector<std::string> files;
+ std::set<std::string> files;
snprintf(filename, 1024, "%s/levels/%s/", st_dir, subset);
if(access(filename, R_OK) == 0)
files = FileSystem::read_directory(filename);
}
- for(std::vector<std::string>::iterator i = files.begin(); i != files.end(); ++i)
+ for(std::set<std::string>::iterator i = files.begin(); i != files.end(); ++i)
{
if (has_suffix(*i, ".stl"))
levels.push_back(*i);
default:
if(i >= 1)
{
- if(load_level_subset(level_subsets.item[i-1]))
+ if(load_level_subset(subset_load_menu->item[i+1].text))
return 1;
}
break;
return done;
}
-int LevelEditor::load_level_subset(char *filename)
+int LevelEditor::load_level_subset(const char *filename)
{
le_level_subset->load(filename);
leveleditor_menu->get_item_by_id(MNID_SUBSETSETTINGS).kind = MN_GOTO;
void LevelEditor::init_menus()
{
- int i;
+ int i = 0;
leveleditor_menu = new Menu();
subset_load_menu = new Menu();
subset_load_menu->additem(MN_LABEL, "Load Level Subset", 0, 0);
subset_load_menu->additem(MN_HL, "", 0, 0);
- for(i = 0; i < level_subsets.num_items; ++i)
+ for(std::set<std::string>::iterator it = level_subsets.begin(); it != level_subsets.end(); ++it)
{
- subset_load_menu->additem(MN_ACTION,level_subsets.item[i],0,0, i+1);
+ subset_load_menu->additem(MN_ACTION,(*it),0,0, i+1);
}
subset_load_menu->additem(MN_HL,"",0,0);
subset_load_menu->additem(MN_BACK,"Back",0,0);
void LevelEditor::update_level_settings_menu()
{
char str[80];
- int i;
+ std::set<std::string>::iterator it;
level_settings_menu->get_item_by_id(MNID_NAME).change_input(le_level->name.c_str());
level_settings_menu->get_item_by_id(MNID_AUTHOR).change_input(le_level->author.c_str());
- string_list_copy(level_settings_menu->get_item_by_id(MNID_SONG).list, FileSystem::dfiles("music/",NULL, "-fast"));
- string_list_copy(level_settings_menu->get_item_by_id(MNID_BGIMG).list, FileSystem::dfiles("images/background",NULL, NULL));
- string_list_add_item(level_settings_menu->get_item_by_id(MNID_BGIMG).list,"");
- string_list_add_item(level_settings_menu->get_item_by_id(MNID_PARTICLE).list,"");
- string_list_add_item(level_settings_menu->get_item_by_id(MNID_PARTICLE).list,"snow");
- string_list_add_item(level_settings_menu->get_item_by_id(MNID_PARTICLE).list,"clouds");
-
- if((i = string_list_find(level_settings_menu->get_item_by_id(MNID_SONG).list,le_level->get_sector("main")->song_title.c_str())) != -1)
- level_settings_menu->get_item_by_id(MNID_SONG).list->active_item = i;
- if((i = string_list_find(level_settings_menu->get_item_by_id(MNID_BGIMG).list,le_level->get_sector("main")->background->get_image().c_str())) != -1)
- level_settings_menu->get_item_by_id(MNID_BGIMG).list->active_item = i;
+ level_settings_menu->get_item_by_id(MNID_SONG).list.first = FileSystem::dfiles("music/",NULL, "-fast");
+ level_settings_menu->get_item_by_id(MNID_BGIMG).list.first = FileSystem::dfiles("images/background",NULL, NULL);
+ level_settings_menu->get_item_by_id(MNID_BGIMG).list.first.insert("");
+ level_settings_menu->get_item_by_id(MNID_PARTICLE).list.first.insert("");
+ level_settings_menu->get_item_by_id(MNID_PARTICLE).list.first.insert("snow");
+ level_settings_menu->get_item_by_id(MNID_PARTICLE).list.first.insert("clouds");
+
+ if((it = level_settings_menu->get_item_by_id(MNID_SONG).list.first.find(le_level->get_sector("main")->song_title)) != level_settings_menu->get_item_by_id(MNID_SONG).list.first.end())
+ level_settings_menu->get_item_by_id(MNID_SONG).list.second = it;
+ if((it = level_settings_menu->get_item_by_id(MNID_BGIMG).list.first.find(le_level->get_sector("main")->background->get_image())) != level_settings_menu->get_item_by_id(MNID_BGIMG).list.first.end())
+ level_settings_menu->get_item_by_id(MNID_BGIMG).list.second = it;
/* if((i = string_list_find(level_settings_menu->get_item_by_id(MNID_PARTICLE).list,le_level->get_sector("main")->particlesystem.c_str())) != -1)
level_settings_menu->get_item_by_id(MNID_PARTICLE).list->active_item = i;*/
le_level->name = level_settings_menu->get_item_by_id(MNID_NAME).input;
le_level->author = level_settings_menu->get_item_by_id(MNID_AUTHOR).input;
- if(le_level->get_sector("main")->background->get_image().compare(string_list_active(level_settings_menu->get_item_by_id(MNID_BGIMG).list)) != 0)
+ if(le_level->get_sector("main")->background->get_image().compare((*level_settings_menu->get_item_by_id(MNID_BGIMG).list.second)) != 0)
{
- le_level->get_sector("main")->background->set_image(string_list_active(level_settings_menu->get_item_by_id(MNID_BGIMG).list), atoi(level_settings_menu->get_item_by_id(MNID_BGSPEED).input));
+ le_level->get_sector("main")->background->set_image((*level_settings_menu->get_item_by_id(MNID_BGIMG).list.second), atoi(level_settings_menu->get_item_by_id(MNID_BGSPEED).input));
i = true;
}
le_level->load_gfx();
}*/
- le_level->get_sector("main")->song_title = string_list_active(level_settings_menu->get_item_by_id(MNID_SONG).list);
+ le_level->get_sector("main")->song_title = (*level_settings_menu->get_item_by_id(MNID_SONG).list.second);
le_level->get_sector("main")->solids->resize(
atoi(level_settings_menu->get_item_by_id(MNID_LENGTH).input),
object_properties_menu->additem(MN_STRINGSELECT,"Kind",0,0,1);
for(int i = 0; i < NUM_BadGuyKinds; ++i)
{
- string_list_add_item(object_properties_menu->get_item_by_id(1).list,
- badguykind_to_string(static_cast<BadGuyKind>(i)).c_str());
+ object_properties_menu->get_item_by_id(1).list.first.insert(
+ badguykind_to_string(static_cast<BadGuyKind>(i)));
if(pbad->kind == i)
- object_properties_menu->get_item_by_id(1).list->active_item = i;
+ object_properties_menu->get_item_by_id(1).list.second = object_properties_menu->get_item_by_id(1).list.first.find(badguykind_to_string(static_cast<BadGuyKind>(i)));
}
object_properties_menu->additem(MN_TOGGLE,"StayOnPlatform",pbad->stay_on_platform,0,2);
}
BadGuy* pbad = dynamic_cast<BadGuy*>(pobj);
if(pbad != 0) {
BadGuy* pbad = dynamic_cast<BadGuy*>(pobj);
- pbad->kind = badguykind_from_string(string_list_active(object_properties_menu->get_item_by_id(1).list));
+ pbad->kind = badguykind_from_string((*object_properties_menu->get_item_by_id(1).list.second));
pbad->stay_on_platform = object_properties_menu->get_item_by_id(2).toggled;
}
loop = false;
/* own declerations */
/* crutial ones (main loop) */
void init_menus();
-int load_level_subset(char *filename);
+int load_level_subset(const char *filename);
void drawlevel(DrawingContext& context);
void drawinterface(DrawingContext& context);
void change(float x, float y, int tm, unsigned int c);
// variables
/* leveleditor internals */
-string_list_type level_subsets;
+std::set<std::string> level_subsets;
bool le_level_changed; /* if changes, ask for saving, when quiting*/
bool show_minimap;
bool show_selections;
static std::vector<LevelSubset*> contrib_subsets;
static LevelSubset* current_contrib_subset = 0;
-static string_list_type worldmap_list;
+static std::set<std::string> worldmap_list;
static LevelEditor* leveleditor;
void generate_contrib_menu()
{
+
/** Generating contrib levels list by making use of Level Subset */
- string_list_type level_subsets = FileSystem::dsubdirs("/levels", "info");
+ std::set<std::string> level_subsets = FileSystem::dsubdirs("/levels", "info");
free_contrib_menu();
contrib_menu->additem(MN_LABEL,_("Contrib Levels"),0,0);
contrib_menu->additem(MN_HL,"",0,0);
-
- for (int i = 0; i < level_subsets.num_items; ++i)
+
+ int i = 0;
+ for (std::set<std::string>::iterator it = level_subsets.begin(); it != level_subsets.end(); ++it)
{
LevelSubset* subset = new LevelSubset();
- subset->load(level_subsets.item[i]);
+ subset->load((*it).c_str());
contrib_menu->additem(MN_GOTO, subset->title.c_str(), i,
- contrib_subset_menu, i);
+ contrib_subset_menu);
contrib_subsets.push_back(subset);
+ ++i;
}
- for(int i = 0; i < worldmap_list.num_items; i++)
+ i = 0;
+ for(std::set<std::string>::iterator it = worldmap_list.begin(); it != worldmap_list.end(); ++it)
{
WorldMapNS::WorldMap worldmap;
- worldmap.loadmap(worldmap_list.item[i]);
- contrib_menu->additem(MN_ACTION, worldmap.get_world_title(),0,0, i + level_subsets.num_items);
+ worldmap.loadmap((*it).c_str());
+ contrib_menu->additem(MN_ACTION, worldmap.get_world_title(),0,0, i + level_subsets.size());
+ ++i;
}
contrib_menu->additem(MN_HL,"",0,0);
contrib_menu->additem(MN_BACK,_("Back"),0,0);
- string_list_free(&level_subsets);
+ level_subsets.clear();
}
void check_levels_contrib_menu()
titlesession->set_current();
}
}
- else if(index < worldmap_list.num_items + (int)contrib_subsets.size())
+ else if((unsigned)index < worldmap_list.size() + (int)contrib_subsets.size())
{
WorldMapNS::WorldMap worldmap;
- worldmap.loadmap(worldmap_list.item[index - contrib_subsets.size()]);
+ std::set<std::string>::iterator it = worldmap_list.begin();
+ for(int i = index - contrib_subsets.size(); i > 0; --i)
+ ++it;
+ worldmap.loadmap((*it));
worldmap.display();
Menu::set_current(main_menu);
if (event.type == SDL_QUIT)
Menu::set_current(0);
}
-
+
/* Draw the background: */
draw_demo(frame_ratio);
-
+
+
if (Menu::current() == main_menu)
context.draw_surface(logo, Vector(screen->w/2 - logo->w/2, 30),
LAYER_FOREGROUND1+1);
{
menu->draw(context);
menu->action();
-
+
if(menu == main_menu)
{
switch (main_menu->check())
/* Free surfaces: */
free_contrib_menu();
- string_list_free(&worldmap_list);
+ worldmap_list.clear();
delete titlesession;
delete bkg_title;
delete logo;
delete img_choose_subset;
}
+
// EOF //
reader.read_int("x", level.x);
reader.read_int("y", level.y);
level.auto_path = true;
- reader.read_bool("auto-path", &level.auto_path);
+ reader.read_bool("auto-path", level.auto_path);
level.swap_x = level.swap_y = -1;
reader.read_int("swap-x", level.swap_x);
reader.read_int("swap-y", level.swap_y);