void CGhost::OnMapLoad() { OnReset(); UnloadAll(); m_pClient->m_pMenus->GhostlistPopulate(); m_AllowRestart = false; }
bool LoadObjects(const rct_object_entry * entries, size_t count) override { // Find all the required objects size_t numRequiredObjects; auto requiredObjects = new const ObjectRepositoryItem *[OBJECT_ENTRY_COUNT]; if (!GetRequiredObjects(entries, requiredObjects, &numRequiredObjects)) { delete[] requiredObjects; return false; } // Create a new list of loaded objects size_t numNewLoadedObjects; Object * * loadedObjects = LoadObjects(requiredObjects, &numNewLoadedObjects); delete[] requiredObjects; if (loadedObjects == nullptr) { UnloadAll(); return false; } else { SetNewLoadedObjectList(loadedObjects); UpdateLegacyLoadedObjectList(); UpdateSceneryGroupIndexes(); reset_type_to_ride_entry_index_map(); log_verbose("%u / %u new objects loaded", numNewLoadedObjects, numRequiredObjects); return true; } }
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance, LPSTR lpCmdLine,int nShowCmd) { INIT short State = 1; DWORD DefaultTime = timeGetTime(); CLSystem LSystem; CTriangle3D Triangle3D(L"Texture.jpg",3.0f); CCube3D Cube3D(L"Texture.jpg",3.0f); CPlane3D Plane3D(L"Grass.jpg",8.0f); LSystem.LoadFile("gfractal.ini"); CMandelbrot Mandelbrot; CMandelbrot3D Mandelbrot3D; Cube3D.Load(); BEGIN if(timeGetTime()-DefaultTime > 100){ if(Input.Keyboard(DIK_F1)&&State!=1&&State!=2){ UnloadAll(); Cube3D.Load(); State = 1; } if(Input.Keyboard(DIK_1)&&State!=1&&State==2){ UnloadAll(); Cube3D.Load(); State = 1; } if(Input.Keyboard(DIK_2)&&State==1&&State!=2){ UnloadAll(); Triangle3D.Load(); State = 2; } if(Input.Keyboard(DIK_F2)&&State!=3){ UnloadAll(); Plane3D.Load(); State = 3; } if(Input.Keyboard(DIK_F3)&&State!=4){ UnloadAll(); LSystem.Load(); State = 4; } if(Input.Keyboard(DIK_F4)&&State!=5){ UnloadAll(); Mandelbrot.Load(); State = 5; } if(Input.Keyboard(DIK_F5)&&State!=6){ UnloadAll(); Mandelbrot3D.Load(); State = 6; } DefaultTime = timeGetTime(); } if(State == 1) Cube3D.Update(); if(State == 2) Triangle3D.Update(); if(State == 3) Plane3D.Update(); if(State == 4) LSystem.Update(); if(State == 5) Mandelbrot.Update(); if(State == 6) Mandelbrot3D.Update(); END }
RegionPagerLua::~RegionPagerLua() { //unload all regions UnloadAll(); //clear any stored functions luaL_unref(lua, LUA_REGISTRYINDEX, loadRef); luaL_unref(lua, LUA_REGISTRYINDEX, saveRef); luaL_unref(lua, LUA_REGISTRYINDEX, createRef); luaL_unref(lua, LUA_REGISTRYINDEX, unloadRef); }
void SoundSystem::Destroy(void) { if (flag_no_sound) return; UnloadAll(); initialized = false; Mix_CloseAudio(); SDL_QuitSubSystem(SDL_INIT_AUDIO); }
void SetNewLoadedObjectList(Object * * newLoadedObjects) { if (newLoadedObjects == nullptr) { UnloadAll(); } else { UnloadObjectsExcept(newLoadedObjects); } Memory::Free(_loadedObjects); _loadedObjects = newLoadedObjects; }
CClientScriptingManager::~CClientScriptingManager( void ) { // Unload all clientscripts UnloadAll(); // Delete the script gui manager instance SAFE_DELETE( m_pScriptGUIManager ); // Delete the scripting manager instance SAFE_DELETE( m_pScriptingManager ); // Delete the events manager instance SAFE_DELETE( m_pEventsManager ); }
RageTexturePreloader &RageTexturePreloader::operator=( const RageTexturePreloader &rhs ) { if( &rhs == this ) return *this; UnloadAll(); for( unsigned i = 0; i < rhs.m_apTextures.size(); ++i ) { RageTexture *pTexture = TEXTUREMAN->CopyTexture( rhs.m_apTextures[i] ); m_apTextures.push_back( pTexture ); } return *this; }
RageTexturePreloader::~RageTexturePreloader() { UnloadAll(); }
CTextureManager::~CTextureManager() { UnloadAll(); }
ModuleManager::~ModuleManager(void) { UnloadAll(); }
CSprite::~CSprite(void) { //Cleanup UnloadAll(); }
Map::~Map() { UnloadAll(true); }
void Map::Reset() { UnloadAll(false); }
cFontManagerOpenGL::~cFontManagerOpenGL(){ UnloadAll(); TTF_Quit(); }
ModelContainer::~ModelContainer() { UnloadAll(); }
RandomSample::~RandomSample() { UnloadAll(); }
RegionPagerBase::~RegionPagerBase() { UnloadAll(); };
CSectionLoader::~CSectionLoader(void) { UnloadAll(); }
CreatureManager::~CreatureManager() { UnloadAll(); }
void World::ResetWorld() { theCamera.Reset(); UnloadAll(); }
BattleManager::~BattleManager() { UnloadAll(); }
CModules::~CModules() { UnloadAll(); }
void DisplaySurfaceManager::Release() { UnloadAll(); }