Пример #1
0
//-----------------------------------------------------------------------------
void Device::shutdown()
{
	CE_ASSERT(_is_init, "Engine is not initialized");

	// Shutdowns the game
	_lua_environment->call_global("shutdown", 0);

	_boot_package->unload();
	destroy_resource_package(_boot_package);

	CE_LOGD("Releasing lua system...");
	lua_system::shutdown();
	CE_DELETE(_allocator, _lua_environment);

	CE_LOGD("Releasing material manager...");
	material_manager::shutdown();

	CE_LOGD("Releasing world manager...");
	CE_DELETE(_allocator, _world_manager);

	CE_LOGD("Releasing resource manager...");
	CE_DELETE(_allocator, _resource_manager);

	Bundle::destroy(_allocator, _resource_bundle);

	_allocator.clear();
	_is_init = false;
}
Пример #2
0
void Device::destroy_world(World& w)
{
    for (uint32_t i = 0, n = array::size(_worlds); i < n; ++i)
    {
        if (&w == _worlds[i])
        {
            CE_DELETE(default_allocator(), &w);
            _worlds[i] = _worlds[n - 1];
            array::pop_back(_worlds);
            return;
        }
    }

    CE_ASSERT(false, "Bad world");
}
Пример #3
0
void SpriteAnimationPlayer::destroy_sprite_animation(SpriteAnimation* anim)
{
	const uint32_t num = array::size(m_animations);

	for (uint32_t i = 0; i < num; i++)
	{
		if (anim == m_animations[i])
		{
			CE_DELETE(default_allocator(), anim);
			m_animations[i] = m_animations[num - 1];
			array::pop_back(m_animations);
			return;
		}
	}
}
Пример #4
0
	void shutdown()
	{
		CE_DELETE(default_allocator(), _keyboard);
		CE_DELETE(default_allocator(), _mouse);
		CE_DELETE(default_allocator(), _touch);
	}
Пример #5
0
void DiskFilesystem::close(File* file)
{
	CE_ASSERT_NOT_NULL(file);

	CE_DELETE(default_allocator(), file);
}
Пример #6
0
	void shutdown()
	{
		CE_DELETE(default_allocator(), _device);
	}
Пример #7
0
//-----------------------------------------------------------------------------
void Device::destroy_resource_package(ResourcePackage* package)
{
	CE_DELETE(default_allocator(), package);
}
Пример #8
0
//-----------------------------------------------------------------------------
void Filesystem::close(DiskFile* stream)
{
	CE_DELETE(m_allocator, stream);
}
Пример #9
0
void SoundWorld::destroy(Allocator& a, SoundWorld* sw)
{
	CE_DELETE(a, sw);
}
Пример #10
0
	void unload(Allocator& a, void* resource)
	{
		CE_DELETE(a, (PackageResource*)resource);
	}
Пример #11
0
void ShaderManager::unload(Allocator& a, void* res)
{
	CE_DELETE(a, (ShaderResource*)res);
}
Пример #12
0
	void shutdown()
	{
		CE_DELETE(default_allocator(), _console);
	}