void cOverworld_Manager::Init(void) { // if already loaded if (!objects.empty()) { Delete_All(); } // Load Worlds Load_Dir(pResource_Manager->Get_User_World_Directory(), true); Load_Dir(pResource_Manager->Get_Game_Overworld_Directory()); }
void cOverworld_Manager :: Init( void ) { // if already loaded if( !objects.empty() ) { Delete_All(); } // Load Worlds Load_Dir( pResource_Manager->user_data_dir + USER_WORLD_DIR, 1 ); Load_Dir( DATA_DIR "/" GAME_OVERWORLD_DIR ); }
void cHud_Manager::Unload(void) { if (objects.empty()) { return; } Delete_All(); pHud_Lives = NULL; pHud_Goldpieces = NULL; pHud_Points = NULL; pHud_Time = NULL; pHud_Debug = NULL; pHud_Itembox = NULL; m_loaded = 0; }
void cLayer :: Load( const std::string &filename ) { Delete_All(); try { // parse layer // fixme : Workaround for std::string to CEGUI::String utf8 conversion. Check again if CEGUI 0.8 works with std::string utf8 #ifdef _WIN32 CEGUI::System::getSingleton().getXMLParser()->parseXMLFile( *this, (const CEGUI::utf8*)filename.c_str(), DATA_DIR "/" GAME_SCHEMA_DIR "/World/Lines.xsd", "" ); #else CEGUI::System::getSingleton().getXMLParser()->parseXMLFile( *this, filename.c_str(), DATA_DIR "/" GAME_SCHEMA_DIR "/World/Lines.xsd", "" ); #endif } // catch CEGUI Exceptions catch( CEGUI::Exception &ex ) { printf( "Loading Line Layer %s CEGUI Exception %s\n", filename.c_str(), ex.getMessage().c_str() ); pHud_Debug->Set_Text( _("Line Layer Loading failed : ") + (const std::string)ex.getMessage().c_str() ); } }
void cOverworld_Manager :: Init( void ) { // if already loaded if( !objects.empty() ) { Delete_All(); } // Load Worlds Load_Dir( pResource_Manager->user_data_dir + USER_WORLD_DIR, 1 ); Load_Dir( DATA_DIR "/" GAME_OVERWORLD_DIR ); // Get Overworld user comments if( File_Exists( m_worlds_filename ) ) { // Parse CEGUI::System::getSingleton().getXMLParser()->parseXMLFile( *this, m_worlds_filename.c_str(), DATA_DIR "/" GAME_SCHEMA_DIR "/Worlds_User_Data.xsd", "" ); } else { // filename not valid printf( "Warning : Couldn't open Worlds description file : %s\n", m_worlds_filename.c_str() ); } }
cOverworld_Manager :: ~cOverworld_Manager( void ) { Delete_All(); delete m_camera; }
cLayer :: ~cLayer( void ) { Delete_All(); }
cObjectCollisionType :: ~cObjectCollisionType( void ) { Delete_All(); }
cWorld_Sprite_Manager::~cWorld_Sprite_Manager(void) { Delete_All(); }