Пример #1
0
void CGhost::OnMapLoad()
{
	OnReset();
	UnloadAll();
	m_pClient->m_pMenus->GhostlistPopulate();
	m_AllowRestart = false;
}
Пример #2
0
    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;
        }
    }
Пример #3
0
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
}
Пример #4
0
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);
}
Пример #5
0
void SoundSystem::Destroy(void)
{
	if (flag_no_sound)
		return;

	UnloadAll();
	initialized = false;
	Mix_CloseAudio();
	SDL_QuitSubSystem(SDL_INIT_AUDIO);
}
Пример #6
0
 void SetNewLoadedObjectList(Object * * newLoadedObjects)
 {
     if (newLoadedObjects == nullptr)
     {
         UnloadAll();
     }
     else
     {
         UnloadObjectsExcept(newLoadedObjects);
     }
     Memory::Free(_loadedObjects);
     _loadedObjects = newLoadedObjects;
 }
Пример #7
0
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();
}
Пример #10
0
CTextureManager::~CTextureManager()
{
   UnloadAll();
}
Пример #11
0
ModuleManager::~ModuleManager(void)
{
	UnloadAll();
}
Пример #12
0
	CSprite::~CSprite(void)
	{
		//Cleanup
		UnloadAll();
	}
Пример #13
0
Map::~Map()
{
	UnloadAll(true);
}
Пример #14
0
void Map::Reset()
{
	UnloadAll(false);
}
cFontManagerOpenGL::~cFontManagerOpenGL(){
	UnloadAll();	
	TTF_Quit();
}
ModelContainer::~ModelContainer()
{
	UnloadAll();
}
Пример #17
0
RandomSample::~RandomSample()
{
	UnloadAll();
}
Пример #18
0
RegionPagerBase::~RegionPagerBase() {
	UnloadAll();
};
Пример #19
0
CSectionLoader::~CSectionLoader(void)
{
  UnloadAll();
}
Пример #20
0
CreatureManager::~CreatureManager() {
	UnloadAll();
}
Пример #21
0
void World::ResetWorld()
{
	theCamera.Reset();
	UnloadAll();
}
Пример #22
0
BattleManager::~BattleManager() {
	UnloadAll();
}
Пример #23
0
CModules::~CModules() {
	UnloadAll();
}
Пример #24
0
	void DisplaySurfaceManager::Release()
	{
		UnloadAll();
	}