本文整理汇总了C++中Savegame::get_integer方法的典型用法代码示例。如果您正苦于以下问题:C++ Savegame::get_integer方法的具体用法?C++ Savegame::get_integer怎么用?C++ Savegame::get_integer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Savegame
的用法示例。
在下文中一共展示了Savegame::get_integer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Screen
/**
* @brief Creates a game.
* @param solarus the application object
* @param savegame the saved data of this game (the specified object will be copied and stored into the game)
*/
Game::Game(Solarus &solarus, Savegame &savegame):
Screen(solarus),
savegame(savegame),
pause_key_available(true),
pause_menu(NULL),
gameover_sequence(NULL),
reseting(false),
restarting(false),
keys_effect(NULL),
current_map(NULL),
next_map(NULL),
previous_map_surface(NULL),
transition_style(Transition::IMMEDIATE),
transition(NULL),
dungeon(NULL),
crystal_switch_state(false),
hud(NULL),
hud_enabled(true),
dialog_box(NULL) {
// notify objects
get_equipment().set_game(*this);
solarus.get_debug_keys().set_game(this);
// initialize members
controls = new GameControls(*this);
dialog_box = new DialogBox(*this);
hero = new Hero(get_equipment());
keys_effect = new KeysEffect();
hud = new HUD(*this);
// launch the starting map
set_current_map(savegame.get_integer(Savegame::STARTING_MAP), "", Transition::FADE);
}