summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2013-11-17 18:07:18 +0100
committerDidier Raboud <odyx@debian.org>2013-11-18 13:05:08 +0100
commit6e31af3923601663b351433892d6ad314fdc802a (patch)
tree1880e86ebe5fcf616ed7848ae7ad7bcc3284fe06 /test
parent81b940cc25e6892ac752005521b3adba4534177b (diff)
downloadcolobot-6e31af3923601663b351433892d6ad314fdc802a.tar.gz
colobot-6e31af3923601663b351433892d6ad314fdc802a.tar.bz2
colobot-6e31af3923601663b351433892d6ad314fdc802a.zip
Initialise CSystemUtils' singleton in the three light, transform and model tests
Also fix README
Diffstat (limited to 'test')
-rw-r--r--test/envs/opengl/README.txt2
-rw-r--r--test/envs/opengl/light_test.cpp3
-rw-r--r--test/envs/opengl/model_test.cpp5
-rw-r--r--test/envs/opengl/transform_test.cpp3
4 files changed, 11 insertions, 2 deletions
diff --git a/test/envs/opengl/README.txt b/test/envs/opengl/README.txt
index c618415..f64f185 100644
--- a/test/envs/opengl/README.txt
+++ b/test/envs/opengl/README.txt
@@ -1,7 +1,7 @@
Test programs for OpenGL engine:
- texture_test -> multitexturing test with 2 textures (included as files: ./tex1.png, ./tex2.png)
- model_test -> simple model viewer to test model loading
- usage: ./model_test {dxf|mod} model_file
+ usage: ./model_test {old|new_txt|new_bin} model_file
second argument is the loaded format (DXF or Colobot .mod files)
requires ./tex folder (or symlink) with Colobot textures
viewer is controlled from keyboard - the bindings can be found in code
diff --git a/test/envs/opengl/light_test.cpp b/test/envs/opengl/light_test.cpp
index 0baf6d3..227ca2a 100644
--- a/test/envs/opengl/light_test.cpp
+++ b/test/envs/opengl/light_test.cpp
@@ -365,6 +365,9 @@ int SDL_MAIN_FUNC(int argc, char *argv[])
{
CLogger logger;
+ CSystemUtils* systemUtils = CSystemUtils::Create(); // platform-specific utils
+ systemUtils->Init();
+
PREV_TIME = GetSystemUtils()->CreateTimeStamp();
CURR_TIME = GetSystemUtils()->CreateTimeStamp();
diff --git a/test/envs/opengl/model_test.cpp b/test/envs/opengl/model_test.cpp
index 1dda69c..fa4042c 100644
--- a/test/envs/opengl/model_test.cpp
+++ b/test/envs/opengl/model_test.cpp
@@ -265,6 +265,9 @@ int SDL_MAIN_FUNC(int argc, char *argv[])
{
CLogger logger;
+ CSystemUtils* systemUtils = CSystemUtils::Create(); // platform-specific utils
+ systemUtils->Init();
+
PREV_TIME = GetSystemUtils()->CreateTimeStamp();
CURR_TIME = GetSystemUtils()->CreateTimeStamp();
@@ -273,7 +276,7 @@ int SDL_MAIN_FUNC(int argc, char *argv[])
if (argc != 3)
{
- std::cerr << "Usage: " << argv[0] << "{old|new_txt|new_bin} model_file" << std::endl;
+ std::cerr << "Usage: " << argv[0] << " {old|new_txt|new_bin} model_file" << std::endl;
return 1;
}
diff --git a/test/envs/opengl/transform_test.cpp b/test/envs/opengl/transform_test.cpp
index 1d5ccf1..58d8e9e 100644
--- a/test/envs/opengl/transform_test.cpp
+++ b/test/envs/opengl/transform_test.cpp
@@ -243,6 +243,9 @@ int SDL_MAIN_FUNC(int argc, char *argv[])
{
CLogger logger;
+ CSystemUtils* systemUtils = CSystemUtils::Create(); // platform-specific utils
+ systemUtils->Init();
+
PREV_TIME = GetSystemUtils()->CreateTimeStamp();
CURR_TIME = GetSystemUtils()->CreateTimeStamp();