- bugfix to allow headless server to load a texture for new tilesets where they must read it to determine parts.

- converted asserts to exceptions
This commit is contained in:
Mark Vejvoda
2013-06-23 04:17:25 +00:00
parent 4764da0e50
commit d46479df95
19 changed files with 140 additions and 39 deletions

View File

@@ -18,9 +18,11 @@
#include "graphics_factory.h"
#include "util.h"
#include "platform_util.h"
#include "leak_dumper.h"
using namespace Shared::Util;
using namespace Shared::Platform;
namespace Shared{ namespace Graphics{
@@ -29,7 +31,10 @@ namespace Shared{ namespace Graphics{
// =====================================================
TextureManager::TextureManager() {
assert(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false);
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == true) {
throw megaglest_runtime_error("Loading graphics in headless server mode not allowed!");
}
textureFilter= Texture::fBilinear;
maxAnisotropy= 1;