Răsfoiți Sursa

Remove development and release #defines

mikymod 11 ani în urmă
părinte
comite
832542c234

+ 0 - 2
engine/Config.h.in

@@ -37,8 +37,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 #define PRIx64 "llx"
 
 #cmakedefine CROWN_DEBUG
-#cmakedefine CROWN_DEVELOPMENT
-#cmakedefine CROWN_RELEASE
 
 #define CE_PIXELS_PER_METER					32
 

+ 1 - 2
engine/audio/backend/ALSoundWorld.cpp

@@ -42,8 +42,7 @@ namespace crown
 {
 
 //-----------------------------------------------------------------------------
-#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
-
+#if defined(CROWN_DEBUG)
 	static const char* al_error_to_string(ALenum error)
 	{
 		switch (error)

+ 1 - 1
engine/audio/backend/SLESSoundWorld.cpp

@@ -42,7 +42,7 @@ namespace crown
 {
 
 //-----------------------------------------------------------------------------
-#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+#if defined(CROWN_DEBUG)
 	static const char* sles_error_to_string(SLresult result)
 	{
 		switch (result)

+ 1 - 1
engine/core/Assert.h

@@ -31,7 +31,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "Config.h"
 #include "Error.h"
 
-#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+#if defined(CROWN_DEBUG)
 	#define CE_ASSERT(condition, msg, ...) do { if (!(condition)) {\
 		crown::error::abort(__FILE__, __LINE__, "\nAssertion failed: %s\n\t" msg "\n", #condition, ##__VA_ARGS__); }} while (0)
 #else

+ 1 - 1
engine/core/Log.h

@@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+#if defined(CROWN_DEBUG)
 	#include "Device.h"
 	#include "ConsoleServer.h"
 	#define CE_LOGI(msg, ...) crown::device()->console()->log_to_all(crown::LogSeverity::INFO, msg, ##__VA_ARGS__)

+ 1 - 1
engine/lua/LuaStack.h

@@ -37,7 +37,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "Color4.h"
 
 //-----------------------------------------------------------------------------
-#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+#if defined(CROWN_DEBUG)
 	static void* checkudata(lua_State* L, int index, const char* expected)
 	{
 		luaL_checktype(L, index, LUA_TUSERDATA);

+ 4 - 4
engine/os/android/AndroidDevice.cpp

@@ -49,7 +49,7 @@ public:
 	AndroidDevice()
 		: m_game_thread("game_thread")
 	{
-		#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+		#if defined(CROWN_DEBUG)
 			m_fileserver = 1;
 		#endif
 	}
@@ -103,7 +103,7 @@ public:
 	//-----------------------------------------------------------------------------
 	int32_t loop()
 	{
-		#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+		#if defined(CROWN_DEBUG)
 			m_console = CE_NEW(default_allocator(), ConsoleServer)();
 			m_console->init(m_console_port, false);
 		#endif
@@ -117,7 +117,7 @@ public:
 
 		while (is_running() && !process_events())
 		{
-			#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+			#if defined(CROWN_DEBUG)
 				m_console->update();
 			#endif
 
@@ -128,7 +128,7 @@ public:
 
 		Device::shutdown();
 
-		#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+		#if defined(CROWN_DEBUG)
 			m_console->shutdown();
 			CE_DELETE(default_allocator(), m_console);
 		#endif

+ 3 - 3
engine/os/linux/main.cpp

@@ -149,7 +149,7 @@ public:
 		parse_command_line(argc, argv);
 		check_preferred_settings();
 
-		#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+		#if defined(CROWN_DEBUG)
 			m_console = CE_NEW(default_allocator(), ConsoleServer)();
 			m_console->init(m_console_port, (bool) m_wait_console);
 
@@ -180,7 +180,7 @@ public:
 	//-----------------------------------------------------------------------------
 	void shutdown()
 	{
-		#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+		#if defined(CROWN_DEBUG)
 			CE_DELETE(default_allocator(), m_bundle_compiler);
 
 			m_console->shutdown();
@@ -352,7 +352,7 @@ public:
 
 		while(!process_events() && is_running())
 		{
-			#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+			#if defined(CROWN_DEBUG)
 				m_console->update();
 			#endif
 

+ 3 - 3
engine/os/win/main.cpp

@@ -149,7 +149,7 @@ public:
 		parse_command_line(argc, argv);
 		check_preferred_settings();
 
-		#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+		#if defined(CROWN_DEBUG)
 			m_console = CE_NEW(default_allocator(), ConsoleServer)();
 			m_console->init(m_console_port, (bool) m_wait_console);
 
@@ -177,7 +177,7 @@ public:
 	//-----------------------------------------------------------------------------
 	void shutdown()
 	{
-		#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+		#if defined(CROWN_DEBUG)
 			CE_DELETE(default_allocator(), m_bundle_compiler);
 
 			m_console->shutdown();
@@ -316,7 +316,7 @@ public:
 
 		while(!process_events() && is_running())
 		{
-			#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+			#if defined(CROWN_DEBUG)
 				m_console->update();
 			#endif
 

+ 5 - 5
engine/physics/PhysicsWorld.cpp

@@ -218,7 +218,7 @@ namespace physics_system
 		CE_DELETE(default_allocator(), s_px_allocator);
 	}
 
-	#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+	#if defined(CROWN_DEBUG)
 		void draw_debug_lines(PxScene* scene, DebugLine& line)
 		{
 			const PxRenderBuffer& rb = scene->getRenderBuffer();
@@ -247,7 +247,7 @@ PhysicsWorld::PhysicsWorld(World& world)
 	, m_events(default_allocator())
 	, m_callback(m_events)
 
-	#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+	#if defined(CROWN_DEBUG)
 		, m_debug_line(NULL)
 	#endif
 {
@@ -282,7 +282,7 @@ PhysicsWorld::PhysicsWorld(World& world)
 
 	m_resource = (PhysicsConfigResource*) device()->resource_manager()->get("physics_config", "global");
 
-	#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+	#if defined(CROWN_DEBUG)
 		m_scene->setVisualizationParameter(PxVisualizationParameter::eSCALE, 1);
 		m_scene->setVisualizationParameter(PxVisualizationParameter::eACTOR_AXES, 1);
 		m_scene->setVisualizationParameter(PxVisualizationParameter::eCOLLISION_SHAPES, 1);
@@ -297,7 +297,7 @@ PhysicsWorld::~PhysicsWorld()
 	m_controller_manager->release();
 	m_scene->release();
 
-	#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+	#if defined(CROWN_DEBUG)
 		m_world.destroy_debug_line(m_debug_line);
 	#endif
 }
@@ -461,7 +461,7 @@ void PhysicsWorld::update(float dt)
 //-----------------------------------------------------------------------------
 void PhysicsWorld::draw_debug()
 {
-	#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+	#if defined(CROWN_DEBUG)
 		if (g_physics_debug)
 			physics_system::draw_debug_lines(m_scene, *m_debug_line);
 	#endif

+ 1 - 1
engine/physics/PhysicsWorld.h

@@ -153,7 +153,7 @@ private:
 
 	const PhysicsConfigResource* m_resource;
 
-	#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+	#if defined(CROWN_DEBUG)
 		DebugLine* m_debug_line;
 	#endif
 };

+ 1 - 1
engine/renderers/backend/gl/GLRenderer.cpp

@@ -55,7 +55,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "MathUtils.h"
 #include "PixelFormat.h"
 
-#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+#if defined(CROWN_DEBUG)
 
 	static const char* gl_error_to_string(GLenum error)
 	{

+ 1 - 1
engine/renderers/backend/gl/egl/GLContext.cpp

@@ -37,7 +37,7 @@ namespace crown
 extern ANativeWindow* g_android_window;
 
 //-----------------------------------------------------------------------------
-#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+#if defined(CROWN_DEBUG)
 	static const char* egl_error_to_string(EGLint error)
 	{
 		switch (error)

+ 1 - 1
engine/resource/LuaResource.cpp

@@ -38,7 +38,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 	#define LUAJIT_EXECUTABLE "./luajit"
 #endif
 
-#if defined(CROWN_DEBUG) || defined(CROWN_DEVELOPMENT)
+#if defined(CROWN_DEBUG)
 	#define LUAJIT_FLAGS "-bg" // Keep debug info
 #else
 	#define LUAJIT_FLAGS "-b"