summaryrefslogtreecommitdiffstats
path: root/test/envs
diff options
context:
space:
mode:
authorPiotr Dziwiński <piotr.dziwinski@nsn.com>2013-02-16 22:37:43 +0100
committerPiotr Dziwiński <piotr.dziwinski@nsn.com>2013-02-17 12:11:56 +0100
commit001d37b257b126dd6ef1dced70f94ff3d2806d28 (patch)
tree1025979c635c899f196d606f7d74170e33ef4f3a /test/envs
parent45040318b026f8864d244e39f1703685ad688470 (diff)
downloadcolobot-001d37b257b126dd6ef1dced70f94ff3d2806d28.tar.gz
colobot-001d37b257b126dd6ef1dced70f94ff3d2806d28.tar.bz2
colobot-001d37b257b126dd6ef1dced70f94ff3d2806d28.zip
CInstanceManager refactoring
* removed classes managed by CInstanceManager except for CObject, CPyro, CBrain and CPhysics because of dependencies * refactored instance searching to use existing singleton instances of CApplication, CEngine and CRobotMain and calling their getter functions
Diffstat (limited to 'test/envs')
-rw-r--r--test/envs/opengl/CMakeLists.txt13
-rw-r--r--test/envs/opengl/light_test.cpp6
-rw-r--r--test/envs/opengl/model_test.cpp3
-rw-r--r--test/envs/opengl/texture_test.cpp2
-rw-r--r--test/envs/opengl/transform_test.cpp5
5 files changed, 20 insertions, 9 deletions
diff --git a/test/envs/opengl/CMakeLists.txt b/test/envs/opengl/CMakeLists.txt
index 588a864..3de5466 100644
--- a/test/envs/opengl/CMakeLists.txt
+++ b/test/envs/opengl/CMakeLists.txt
@@ -15,7 +15,6 @@ ${SRC_DIR}/graphics/opengl/gldevice.cpp
${SRC_DIR}/graphics/engine/modelfile.cpp
${SRC_DIR}/common/logger.cpp
${SRC_DIR}/common/image.cpp
-${SRC_DIR}/common/iman.cpp
${SRC_DIR}/common/stringutils.cpp
${SRC_DIR}/app/system.cpp
model_test.cpp
@@ -25,7 +24,6 @@ set(TRANSFORM_SOURCES
${SRC_DIR}/graphics/opengl/gldevice.cpp
${SRC_DIR}/common/logger.cpp
${SRC_DIR}/common/image.cpp
-${SRC_DIR}/common/iman.cpp
${SRC_DIR}/app/system.cpp
transform_test.cpp
)
@@ -34,20 +32,27 @@ set(LIGHT_SOURCES
${SRC_DIR}/graphics/opengl/gldevice.cpp
${SRC_DIR}/common/logger.cpp
${SRC_DIR}/common/image.cpp
-${SRC_DIR}/common/iman.cpp
${SRC_DIR}/app/system.cpp
light_test.cpp
)
include_directories(${SRC_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(
+SYSTEM
+${SDL_INCLUDE_DIR}
+${SDLIMAGE_INCLUDE_DIR}
+${SDLTTF_INCLUDE_DIR}
+${PNG_INCLUDE_DIRS}
+${GLEW_INCLUDE_PATH}
+)
+
set(LIBS
${SDL_LIBRARY}
${SDLIMAGE_LIBRARY}
${OPENGL_LIBRARY}
${GLEW_LIBRARY}
${PNG_LIBRARIES}
-${ADD_LIBS}
)
add_executable(texture_test ${TEXTURE_SOURCES})
diff --git a/test/envs/opengl/light_test.cpp b/test/envs/opengl/light_test.cpp
index b19ba4b..b1e0151 100644
--- a/test/envs/opengl/light_test.cpp
+++ b/test/envs/opengl/light_test.cpp
@@ -1,8 +1,10 @@
#include "app/system.h"
+
#include "common/logger.h"
#include "common/image.h"
-#include "common/iman.h"
+
#include "graphics/opengl/gldevice.h"
+
#include "math/geometry.h"
#include <SDL/SDL.h>
@@ -365,8 +367,6 @@ int main(int argc, char *argv[])
GetCurrentTimeStamp(PREV_TIME);
GetCurrentTimeStamp(CURR_TIME);
- CInstanceManager iMan;
-
// Without any error checking, for simplicity
SDL_Init(SDL_INIT_VIDEO);
diff --git a/test/envs/opengl/model_test.cpp b/test/envs/opengl/model_test.cpp
index a06a178..882b785 100644
--- a/test/envs/opengl/model_test.cpp
+++ b/test/envs/opengl/model_test.cpp
@@ -1,8 +1,11 @@
#include "app/system.h"
+
#include "common/logger.h"
#include "common/image.h"
+
#include "graphics/engine/modelfile.h"
#include "graphics/opengl/gldevice.h"
+
#include "math/geometry.h"
#include <SDL/SDL.h>
diff --git a/test/envs/opengl/texture_test.cpp b/test/envs/opengl/texture_test.cpp
index de9caf3..b1f352c 100644
--- a/test/envs/opengl/texture_test.cpp
+++ b/test/envs/opengl/texture_test.cpp
@@ -1,6 +1,8 @@
#include "common/logger.h"
#include "common/image.h"
+
#include "graphics/opengl/gldevice.h"
+
#include "math/geometry.h"
#include <SDL/SDL.h>
diff --git a/test/envs/opengl/transform_test.cpp b/test/envs/opengl/transform_test.cpp
index cddd1b8..04c73f7 100644
--- a/test/envs/opengl/transform_test.cpp
+++ b/test/envs/opengl/transform_test.cpp
@@ -1,8 +1,11 @@
#include "app/system.h"
+
#include "common/logger.h"
#include "common/image.h"
#include "common/iman.h"
+
#include "graphics/opengl/gldevice.h"
+
#include "math/geometry.h"
#include <SDL/SDL.h>
@@ -242,8 +245,6 @@ int main(int argc, char *argv[])
GetCurrentTimeStamp(PREV_TIME);
GetCurrentTimeStamp(CURR_TIME);
- CInstanceManager iMan;
-
// Without any error checking, for simplicity
SDL_Init(SDL_INIT_VIDEO);