From 6e196c2ce4285c0aea2a5c714e842d90c1b84b43 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 1 Feb 2011 03:06:02 +0200 Subject: partly working chunk-based map generator (doesn't save properly, spawn is pretty random) --- src/irrlichtwrapper.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/irrlichtwrapper.cpp') diff --git a/src/irrlichtwrapper.cpp b/src/irrlichtwrapper.cpp index e5cab98c6..a1d37f4bd 100644 --- a/src/irrlichtwrapper.cpp +++ b/src/irrlichtwrapper.cpp @@ -5,6 +5,7 @@ IrrlichtWrapper::IrrlichtWrapper(IrrlichtDevice *device) { + m_running = true; m_main_thread = get_current_thread_id(); m_device_mutex.Init(); m_device = device; @@ -35,6 +36,11 @@ void IrrlichtWrapper::Run() } } +void IrrlichtWrapper::Shutdown(bool shutdown) +{ + m_running = !shutdown; +} + textureid_t IrrlichtWrapper::getTextureId(const std::string &name) { u32 id = m_namecache.getId(name); @@ -73,6 +79,10 @@ video::ITexture* IrrlichtWrapper::getTexture(const TextureSpec &spec) } else { + // If irrlicht has shut down, just return NULL + if(m_running == false) + return NULL; + // We're gonna ask the result to be put into here ResultQueue result_queue; -- cgit v1.2.3