summaryrefslogtreecommitdiffstats
path: root/src/graphics/opengl/test/transform_test.cpp
diff options
context:
space:
mode:
authorMichał Konopacki <konopacki.m@gmail.com>2012-08-13 21:23:20 +0200
committerMichał Konopacki <konopacki.m@gmail.com>2012-08-13 21:23:20 +0200
commit9ee1d2e172162be25b113595ad16779aa0a49a87 (patch)
tree5036de076ff1cf804bacfc866c2a8f04dc6c66f8 /src/graphics/opengl/test/transform_test.cpp
parentdc3cadd309a1ac1eb4921de69fed6037881b0b91 (diff)
parenta2dd39960b5851f8e62adf59b11b36ba14626468 (diff)
downloadcolobot-9ee1d2e172162be25b113595ad16779aa0a49a87.tar.gz
colobot-9ee1d2e172162be25b113595ad16779aa0a49a87.tar.bz2
colobot-9ee1d2e172162be25b113595ad16779aa0a49a87.zip
Merge remote-tracking branch 'upstream/dev-graphics' into dev-ui
Diffstat (limited to 'src/graphics/opengl/test/transform_test.cpp')
-rw-r--r--src/graphics/opengl/test/transform_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/graphics/opengl/test/transform_test.cpp b/src/graphics/opengl/test/transform_test.cpp
index 83819b8..cddd1b8 100644
--- a/src/graphics/opengl/test/transform_test.cpp
+++ b/src/graphics/opengl/test/transform_test.cpp
@@ -215,7 +215,7 @@ void KeyboardUp(SDLKey key)
void MouseMove(int x, int y)
{
- Math::Point currentPos((float)x, (float)y);
+ Math::Point currentPos(static_cast<float>(x), static_cast<float>(y));
static bool first = true;
if (first || (x < 10) || (y < 10) || (x > 790) || (y > 590))
@@ -228,8 +228,8 @@ void MouseMove(int x, int y)
return;
}
- ROTATION.y = ROTATION_BASE.y + ((float) (x - MOUSE_POS_BASE.x) / 800.0f) * Math::PI;
- ROTATION.x = ROTATION_BASE.x + ((float) (y - MOUSE_POS_BASE.y) / 600.0f) * Math::PI;
+ ROTATION.y = ROTATION_BASE.y + (static_cast<float> (x - MOUSE_POS_BASE.x) / 800.0f) * Math::PI;
+ ROTATION.x = ROTATION_BASE.x + (static_cast<float> (y - MOUSE_POS_BASE.y) / 600.0f) * Math::PI;
}
int main(int argc, char *argv[])
@@ -280,7 +280,7 @@ int main(int argc, char *argv[])
//SDL_WM_GrabInput(SDL_GRAB_ON);
SDL_ShowCursor(SDL_DISABLE);
- Gfx::CGLDevice *device = new Gfx::CGLDevice();
+ Gfx::CGLDevice *device = new Gfx::CGLDevice(Gfx::GLDeviceConfig());
device->Create();
Init(device);