summaryrefslogtreecommitdiffstats
path: root/src/object/auto/autoflag.cpp
diff options
context:
space:
mode:
authorMichał Konopacki <konopacki.m@gmail.com>2012-09-09 14:28:19 +0200
committerMichał Konopacki <konopacki.m@gmail.com>2012-09-09 14:28:19 +0200
commit6892d37a4f497821d8059dc40bc6ead4085d66d8 (patch)
tree079cfa9559b0a0c05bdfbd0297d1afe8acd33ad5 /src/object/auto/autoflag.cpp
parentb3d5491af4f953e8d63800897c40d602de9e9305 (diff)
downloadcolobot-6892d37a4f497821d8059dc40bc6ead4085d66d8.tar.gz
colobot-6892d37a4f497821d8059dc40bc6ead4085d66d8.tar.bz2
colobot-6892d37a4f497821d8059dc40bc6ead4085d66d8.zip
[src/object/auto] Folder rewritten
Diffstat (limited to 'src/object/auto/autoflag.cpp')
-rw-r--r--src/object/auto/autoflag.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/object/auto/autoflag.cpp b/src/object/auto/autoflag.cpp
index ea74b17..acab2d0 100644
--- a/src/object/auto/autoflag.cpp
+++ b/src/object/auto/autoflag.cpp
@@ -1,5 +1,6 @@
// * This file is part of the COLOBOT source code
// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
+// * Copyright (C) 2012 Polish Portal of Colobot (PPC)
// *
// * This program is free software: you can redistribute it and/or modify
// * it under the terms of the GNU General Public License as published by
@@ -20,7 +21,7 @@
#include "object/auto/autoflag.h"
#include "math/geometry.h"
-#include "old/terrain.h"
+#include "graphics/engine/terrain.h"
@@ -68,7 +69,7 @@ void CAutoFlag::Init()
m_param = 0;
m_progress = 0.0f;
- wind = m_terrain->RetWind();
+ wind = m_terrain->GetWind();
angle = Math::RotateAngle(wind.x, -wind.z);
m_object->SetAngleY(0, angle); // directs the flag in the wind
@@ -98,7 +99,7 @@ bool CAutoFlag::EventProcess(const Event &event)
CAuto::EventProcess(event);
#if ADJUST_ANGLE
- if ( event.event == EVENT_KEYDOWN )
+ if ( event.type == EVENT_KEYDOWN )
{
if ( event.param == 'E' ) g_flag1 += 0.1f;
if ( event.param == 'D' ) g_flag1 -= 0.1f;
@@ -109,8 +110,8 @@ bool CAutoFlag::EventProcess(const Event &event)
}
#endif
- if ( m_engine->RetPause() ) return true;
- if ( event.event != EVENT_FRAME ) return true;
+ if ( m_engine->GetPause() ) return true;
+ if ( event.type != EVENT_FRAME ) return true;
if ( m_param == 1 ) // shakes?
{
@@ -152,9 +153,9 @@ bool CAutoFlag::EventProcess(const Event &event)
}
-// Returns an error due the state of the automation
+// Geturns an error due the state of the automation
-Error CAutoFlag::RetError()
+Error CAutoFlag::GetError()
{
return ERR_OK;
}