diff options
Diffstat (limited to 'src/object')
-rw-r--r-- | src/object/brain.cpp | 14 | ||||
-rw-r--r-- | src/object/robotmain.cpp | 15 |
2 files changed, 11 insertions, 18 deletions
diff --git a/src/object/brain.cpp b/src/object/brain.cpp index 52db776..fa3e425 100644 --- a/src/object/brain.cpp +++ b/src/object/brain.cpp @@ -1944,9 +1944,7 @@ bool CBrain::CreateInterface(bool bSelect) void CBrain::UpdateInterface(float rTime) { Ui::CWindow* pw; -/* TODO: #if _TEEN Ui::CButton* pb; -#endif*/ Ui::CGauge* pg; Ui::CCompass* pc; Ui::CGroup* pgr; @@ -2058,8 +2056,7 @@ void CBrain::UpdateInterface(float rTime) pc->SetState(Ui::STATE_VISIBLE, m_main->GetShowMap()); } -#if _TEEN - pb = (CButton*)pw->SearchControl(EVENT_OBJECT_REC); + pb = (Ui::CButton*)pw->SearchControl(EVENT_OBJECT_REC); if ( pb != 0 ) { if ( m_bTraceRecord && Math::Mod(m_time, 0.4f) >= 0.2f ) @@ -2071,7 +2068,6 @@ void CBrain::UpdateInterface(float rTime) pb->ClearState(Ui::STATE_CHECK); } } -#endif bOnBoard = m_camera->GetType() == Gfx::CAM_TYPE_ONBOARD; @@ -2151,10 +2147,8 @@ void CBrain::UpdateInterface() Ui::CWindow* pw; Ui::CButton* pb; Ui::CSlider* ps; -#if _TEEN - CColor* pc; + Ui::CColor* pc; int color; -#endif bool bEnable, bFly, bRun; char title[100]; @@ -2189,7 +2183,6 @@ void CBrain::UpdateInterface() EnableInterface(pw, EVENT_OBJECT_FIRE, bEnable); EnableInterface(pw, EVENT_OBJECT_SPIDEREXPLO, bEnable); EnableInterface(pw, EVENT_OBJECT_RESET, bEnable); -#if _TEEN EnableInterface(pw, EVENT_OBJECT_PEN0, bEnable); EnableInterface(pw, EVENT_OBJECT_PEN1, bEnable); EnableInterface(pw, EVENT_OBJECT_PEN2, bEnable); @@ -2201,7 +2194,6 @@ void CBrain::UpdateInterface() EnableInterface(pw, EVENT_OBJECT_PEN8, bEnable); EnableInterface(pw, EVENT_OBJECT_REC, bEnable); EnableInterface(pw, EVENT_OBJECT_STOP, bEnable); -#endif if ( type == OBJECT_HUMAN ) // builder? { @@ -2352,7 +2344,6 @@ void CBrain::UpdateInterface() CheckInterface(pw, EVENT_OBJECT_MFRONT, m_manipStyle==EVENT_OBJECT_MFRONT); } -#if _TEEN if ( m_object->GetTraceDown() ) { pb = static_cast< Ui::CButton* >(pw->SearchControl(EVENT_OBJECT_PEN0)); @@ -2452,7 +2443,6 @@ void CBrain::UpdateInterface() pc->ClearState(Ui::STATE_CHECK); } } -#endif } // Updates the list of programs. diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp index f27438f..40157e2 100644 --- a/src/object/robotmain.cpp +++ b/src/object/robotmain.cpp @@ -4328,12 +4328,13 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) Math::Vector pos = OpPos(line, "pos")*g_unit; float dir = OpFloat(line, "dir", 0.0f)*Math::PI; + bool trainer = OpInt(line, "trainer", 0); CObject* obj = CreateObject(pos, dir, OpFloat(line, "z", 1.0f), OpFloat(line, "h", 0.0f), type, OpFloat(line, "power", 1.0f), - OpInt(line, "trainer", 0), + trainer, OpInt(line, "toy", 0), OpInt(line, "option", 0)); @@ -4395,12 +4396,14 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) obj->SetShield(OpFloat(line, "shield", 1.0f)); obj->SetMagnifyDamage(OpFloat(line, "magnifyDamage", 1.0f)); obj->SetClip(OpInt(line, "clip", 1)); - obj->SetCheckToken(OpInt(line, "checkToken", 1)); - obj->SetManual(OpInt(line, "manual", 0)); + obj->SetCheckToken(m_version >= 2 ? trainer : OpInt(line, "manual", 1)); + obj->SetManual(m_version >= 2 ? !trainer : OpInt(line, "manual", 0)); - Math::Vector zoom = OpDir(line, "zoom"); - if (zoom.x != 0.0f || zoom.y != 0.0f || zoom.z != 0.0f) - obj->SetZoom(0, zoom); + if(m_version >= 2) { + Math::Vector zoom = OpDir(line, "zoom"); + if (zoom.x != 0.0f || zoom.y != 0.0f || zoom.z != 0.0f) + obj->SetZoom(0, zoom); + } CMotion* motion = obj->GetMotion(); if (motion != nullptr) |