summaryrefslogtreecommitdiffstats
path: root/test/envs
diff options
context:
space:
mode:
Diffstat (limited to 'test/envs')
-rw-r--r--test/envs/opengl/CMakeLists.txt4
-rw-r--r--test/envs/opengl/light_test.cpp18
-rw-r--r--test/envs/opengl/model_test.cpp18
-rw-r--r--test/envs/opengl/transform_test.cpp18
4 files changed, 29 insertions, 29 deletions
diff --git a/test/envs/opengl/CMakeLists.txt b/test/envs/opengl/CMakeLists.txt
index d6c3a37..0bcb43d 100644
--- a/test/envs/opengl/CMakeLists.txt
+++ b/test/envs/opengl/CMakeLists.txt
@@ -3,9 +3,9 @@ set(SRC_DIR ${colobot_SOURCE_DIR}/src)
configure_file(${SRC_DIR}/common/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/common/config.h)
# Platform-dependent implementation of system.h
-if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+if (${PLATFORM_WINDOWS})
set(SYSTEM_CPP_MODULE "system_windows.cpp")
-elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+elseif(${PLATFORM_LINUX})
set(SYSTEM_CPP_MODULE "system_linux.cpp")
else()
set(SYSTEM_CPP_MODULE "system_other.cpp")
diff --git a/test/envs/opengl/light_test.cpp b/test/envs/opengl/light_test.cpp
index d4635cc..0baf6d3 100644
--- a/test/envs/opengl/light_test.cpp
+++ b/test/envs/opengl/light_test.cpp
@@ -258,9 +258,9 @@ void Update()
{
const float TRANS_SPEED = 6.0f; // units / sec
- GetCurrentTimeStamp(CURR_TIME);
- float timeDiff = TimeStampDiff(PREV_TIME, CURR_TIME, STU_SEC);
- CopyTimeStamp(PREV_TIME, CURR_TIME);
+ GetSystemUtils()->GetCurrentTimeStamp(CURR_TIME);
+ float timeDiff = GetSystemUtils()->TimeStampDiff(PREV_TIME, CURR_TIME, STU_SEC);
+ GetSystemUtils()->CopyTimeStamp(PREV_TIME, CURR_TIME);
CUBE_ORBIT += timeDiff * (Math::PI / 4.0f);
@@ -365,11 +365,11 @@ int SDL_MAIN_FUNC(int argc, char *argv[])
{
CLogger logger;
- PREV_TIME = CreateTimeStamp();
- CURR_TIME = CreateTimeStamp();
+ PREV_TIME = GetSystemUtils()->CreateTimeStamp();
+ CURR_TIME = GetSystemUtils()->CreateTimeStamp();
- GetCurrentTimeStamp(PREV_TIME);
- GetCurrentTimeStamp(CURR_TIME);
+ GetSystemUtils()->GetCurrentTimeStamp(PREV_TIME);
+ GetSystemUtils()->GetCurrentTimeStamp(CURR_TIME);
// Without any error checking, for simplicity
@@ -459,8 +459,8 @@ int SDL_MAIN_FUNC(int argc, char *argv[])
SDL_Quit();
- DestroyTimeStamp(PREV_TIME);
- DestroyTimeStamp(CURR_TIME);
+ GetSystemUtils()->DestroyTimeStamp(PREV_TIME);
+ GetSystemUtils()->DestroyTimeStamp(CURR_TIME);
return 0;
}
diff --git a/test/envs/opengl/model_test.cpp b/test/envs/opengl/model_test.cpp
index 168eb32..1dda69c 100644
--- a/test/envs/opengl/model_test.cpp
+++ b/test/envs/opengl/model_test.cpp
@@ -153,9 +153,9 @@ void Update()
const float ROT_SPEED = 80.0f * Math::DEG_TO_RAD; // rad / sec
const float TRANS_SPEED = 3.0f; // units / sec
- GetCurrentTimeStamp(CURR_TIME);
- float timeDiff = TimeStampDiff(PREV_TIME, CURR_TIME, STU_SEC);
- CopyTimeStamp(PREV_TIME, CURR_TIME);
+ GetSystemUtils()->GetCurrentTimeStamp(CURR_TIME);
+ float timeDiff = GetSystemUtils()->TimeStampDiff(PREV_TIME, CURR_TIME, STU_SEC);
+ GetSystemUtils()->CopyTimeStamp(PREV_TIME, CURR_TIME);
if (KEYMAP[K_RotYLeft])
ROTATION.y -= ROT_SPEED * timeDiff;
@@ -265,11 +265,11 @@ int SDL_MAIN_FUNC(int argc, char *argv[])
{
CLogger logger;
- PREV_TIME = CreateTimeStamp();
- CURR_TIME = CreateTimeStamp();
+ PREV_TIME = GetSystemUtils()->CreateTimeStamp();
+ CURR_TIME = GetSystemUtils()->CreateTimeStamp();
- GetCurrentTimeStamp(PREV_TIME);
- GetCurrentTimeStamp(CURR_TIME);
+ GetSystemUtils()->GetCurrentTimeStamp(PREV_TIME);
+ GetSystemUtils()->GetCurrentTimeStamp(CURR_TIME);
if (argc != 3)
{
@@ -377,8 +377,8 @@ int SDL_MAIN_FUNC(int argc, char *argv[])
SDL_Quit();
- DestroyTimeStamp(PREV_TIME);
- DestroyTimeStamp(CURR_TIME);
+ GetSystemUtils()->DestroyTimeStamp(PREV_TIME);
+ GetSystemUtils()->DestroyTimeStamp(CURR_TIME);
return 0;
}
diff --git a/test/envs/opengl/transform_test.cpp b/test/envs/opengl/transform_test.cpp
index 02f9d83..1d5ccf1 100644
--- a/test/envs/opengl/transform_test.cpp
+++ b/test/envs/opengl/transform_test.cpp
@@ -138,9 +138,9 @@ void Update()
{
const float TRANS_SPEED = 6.0f; // units / sec
- GetCurrentTimeStamp(CURR_TIME);
- float timeDiff = TimeStampDiff(PREV_TIME, CURR_TIME, STU_SEC);
- CopyTimeStamp(PREV_TIME, CURR_TIME);
+ GetSystemUtils()->GetCurrentTimeStamp(CURR_TIME);
+ float timeDiff = GetSystemUtils()->TimeStampDiff(PREV_TIME, CURR_TIME, STU_SEC);
+ GetSystemUtils()->CopyTimeStamp(PREV_TIME, CURR_TIME);
Math::Vector incTrans;
@@ -243,11 +243,11 @@ int SDL_MAIN_FUNC(int argc, char *argv[])
{
CLogger logger;
- PREV_TIME = CreateTimeStamp();
- CURR_TIME = CreateTimeStamp();
+ PREV_TIME = GetSystemUtils()->CreateTimeStamp();
+ CURR_TIME = GetSystemUtils()->CreateTimeStamp();
- GetCurrentTimeStamp(PREV_TIME);
- GetCurrentTimeStamp(CURR_TIME);
+ GetSystemUtils()->GetCurrentTimeStamp(PREV_TIME);
+ GetSystemUtils()->GetCurrentTimeStamp(CURR_TIME);
// Without any error checking, for simplicity
@@ -337,8 +337,8 @@ int SDL_MAIN_FUNC(int argc, char *argv[])
SDL_Quit();
- DestroyTimeStamp(PREV_TIME);
- DestroyTimeStamp(CURR_TIME);
+ GetSystemUtils()->DestroyTimeStamp(PREV_TIME);
+ GetSystemUtils()->DestroyTimeStamp(CURR_TIME);
return 0;
}