diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2013-11-03 13:04:57 +0100 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2013-11-03 13:04:57 +0100 |
commit | f1c5cd5f82d33d5db5033ea28e1d24a13b2e28a2 (patch) | |
tree | b9e7e75a2138875ffed59772a2a1c7cf82b7aaa4 /src/object/auto | |
parent | ec38c14ee8293b2dc7436e0c06b0c294652c84cc (diff) | |
parent | d8e50e4eeb2dde3e0d228e2bead29d73494f8874 (diff) | |
download | colobot-f1c5cd5f82d33d5db5033ea28e1d24a13b2e28a2.tar.gz colobot-f1c5cd5f82d33d5db5033ea28e1d24a13b2e28a2.tar.bz2 colobot-f1c5cd5f82d33d5db5033ea28e1d24a13b2e28a2.zip |
Colobot Gold 0.1.1-alpha
Diffstat (limited to 'src/object/auto')
-rw-r--r-- | src/object/auto/auto.cpp | 2 | ||||
-rw-r--r-- | src/object/auto/auto.h | 2 | ||||
-rw-r--r-- | src/object/auto/autobase.cpp | 5 | ||||
-rw-r--r-- | src/object/auto/autoconvert.cpp | 5 | ||||
-rw-r--r-- | src/object/auto/autoderrick.cpp | 3 | ||||
-rw-r--r-- | src/object/auto/autodestroyer.cpp | 3 | ||||
-rw-r--r-- | src/object/auto/autoenergy.cpp | 5 | ||||
-rw-r--r-- | src/object/auto/autofactory.cpp | 7 | ||||
-rw-r--r-- | src/object/auto/autolabo.cpp | 5 | ||||
-rw-r--r-- | src/object/auto/autonuclear.cpp | 5 | ||||
-rw-r--r-- | src/object/auto/autoresearch.cpp | 7 | ||||
-rw-r--r-- | src/object/auto/autotower.cpp | 3 |
12 files changed, 19 insertions, 33 deletions
diff --git a/src/object/auto/auto.cpp b/src/object/auto/auto.cpp index 8dc1d94..0aeaa0a 100644 --- a/src/object/auto/auto.cpp +++ b/src/object/auto/auto.cpp @@ -52,7 +52,6 @@ CAuto::CAuto(CObject* object) m_lightning = m_engine->GetLightning(); m_camera = m_main->GetCamera(); m_interface = m_main->GetInterface(); - m_displayText = m_main->GetDisplayText(); m_type = m_object->GetType(); m_time = 0.0f; @@ -83,7 +82,6 @@ CAuto::~CAuto() m_lightning = nullptr; m_camera = nullptr; m_interface = nullptr; - m_displayText = nullptr; } diff --git a/src/object/auto/auto.h b/src/object/auto/auto.h index 4a430ce..fd25e70 100644 --- a/src/object/auto/auto.h +++ b/src/object/auto/auto.h @@ -28,7 +28,6 @@ class CRobotMain; class CSoundInterface; namespace Ui { -class CDisplayText; class CInterface; class CWindow; } /* Ui */ @@ -101,7 +100,6 @@ protected: Gfx::CLightning* m_lightning; Gfx::CCamera* m_camera; Ui::CInterface* m_interface; - Ui::CDisplayText* m_displayText; CRobotMain* m_main; CObject* m_object; CSoundInterface* m_sound; diff --git a/src/object/auto/autobase.cpp b/src/object/auto/autobase.cpp index d0bd87b..6d61bc2 100644 --- a/src/object/auto/autobase.cpp +++ b/src/object/auto/autobase.cpp @@ -34,7 +34,6 @@ #include "ui/interface.h" #include "ui/window.h" -#include "ui/displaytext.h" @@ -317,14 +316,14 @@ begin: err = CheckCloseDoor(); if ( err != ERR_OK ) { - m_displayText->DisplayError(err, m_object); + m_main->DisplayError(err, m_object); return false; } err = m_main->CheckEndMission(false); if ( err != ERR_OK ) { - m_displayText->DisplayError(err, m_object); + m_main->DisplayError(err, m_object); return false; } diff --git a/src/object/auto/autoconvert.cpp b/src/object/auto/autoconvert.cpp index 7281ed7..ee1e83b 100644 --- a/src/object/auto/autoconvert.cpp +++ b/src/object/auto/autoconvert.cpp @@ -26,7 +26,6 @@ #include "ui/interface.h" #include "ui/window.h" -#include "ui/displaytext.h" #include <stdio.h> #include <string.h> @@ -515,7 +514,7 @@ void CAutoConvert::CreateMetal() if ( !fret->CreateResource(pos, angle, OBJECT_METAL) ) { delete fret; - m_displayText->DisplayError(ERR_TOOMANY, m_object); + m_main->DisplayError(ERR_TOOMANY, m_object); return; } @@ -524,6 +523,6 @@ void CAutoConvert::CreateMetal() fret->SetResetCap(RESET_DELETE); } - m_displayText->DisplayError(INFO_CONVERT, m_object); + m_main->DisplayError(INFO_CONVERT, m_object); } diff --git a/src/object/auto/autoderrick.cpp b/src/object/auto/autoderrick.cpp index b613406..5b6cea4 100644 --- a/src/object/auto/autoderrick.cpp +++ b/src/object/auto/autoderrick.cpp @@ -28,7 +28,6 @@ #include "ui/interface.h" #include "ui/window.h" -#include "ui/displaytext.h" #include <stdio.h> #include <string.h> @@ -535,7 +534,7 @@ void CAutoDerrick::CreateFret(Math::Vector pos, float angle, ObjectType type, if ( !fret->CreateResource(pos, angle, type) ) { delete fret; - m_displayText->DisplayError(ERR_TOOMANY, m_object); + m_main->DisplayError(ERR_TOOMANY, m_object); return; } fret->SetLock(true); // object not yet usable diff --git a/src/object/auto/autodestroyer.cpp b/src/object/auto/autodestroyer.cpp index fdaebc0..dfe8e78 100644 --- a/src/object/auto/autodestroyer.cpp +++ b/src/object/auto/autodestroyer.cpp @@ -24,7 +24,6 @@ #include "ui/interface.h" #include "ui/window.h" -#include "ui/displaytext.h" #include <stdio.h> #include <string.h> @@ -122,7 +121,7 @@ bool CAutoDestroyer::EventProcess(const Event &event) { Error err = StartAction(0); if ( err != ERR_OK ) - m_displayText->DisplayError(err, m_object); + m_main->DisplayError(err, m_object); return false; } diff --git a/src/object/auto/autoenergy.cpp b/src/object/auto/autoenergy.cpp index 6a8672b..a38caf2 100644 --- a/src/object/auto/autoenergy.cpp +++ b/src/object/auto/autoenergy.cpp @@ -29,7 +29,6 @@ #include "ui/interface.h" #include "ui/gauge.h" #include "ui/window.h" -#include "ui/displaytext.h" #include <stdio.h> #include <string.h> @@ -325,7 +324,7 @@ bool CAutoEnergy::EventProcess(const Event &event) fret->SetPosition(0, Math::Vector(0.0f, 3.0f, 0.0f)); m_object->SetPower(fret); - m_displayText->DisplayError(INFO_ENERGY, m_object); + m_main->DisplayError(INFO_ENERGY, m_object); } SetBusy(false); @@ -468,7 +467,7 @@ void CAutoEnergy::CreatePower() if ( !power->CreateResource(pos, angle, OBJECT_POWER) ) { delete power; - m_displayText->DisplayError(ERR_TOOMANY, m_object); + m_main->DisplayError(ERR_TOOMANY, m_object); return; } power->SetLock(true); // battery not yet usable diff --git a/src/object/auto/autofactory.cpp b/src/object/auto/autofactory.cpp index a648656..49abad4 100644 --- a/src/object/auto/autofactory.cpp +++ b/src/object/auto/autofactory.cpp @@ -32,7 +32,6 @@ #include "ui/interface.h" #include "ui/window.h" -#include "ui/displaytext.h" #include <stdio.h> #include <string.h> @@ -211,7 +210,7 @@ bool CAutoFactory::EventProcess(const Event &event) Error err = StartAction(type); if( err != ERR_OK && err != ERR_GENERIC ) - m_displayText->DisplayError(err, m_object); + m_main->DisplayError(err, m_object); if( err != ERR_GENERIC ) return false; @@ -379,7 +378,7 @@ bool CAutoFactory::EventProcess(const Event &event) } else { - m_displayText->DisplayError(INFO_FACTORY, m_object); + m_main->DisplayError(INFO_FACTORY, m_object); SoundManip(2.0f, 1.0f, 1.2f); fret = SearchFret(); // transform metal? @@ -678,7 +677,7 @@ bool CAutoFactory::CreateVehicle() if ( !vehicle->CreateVehicle(pos, angle, m_type, -1.0f, false, false) ) { delete vehicle; - m_displayText->DisplayError(ERR_TOOMANY, m_object); + m_main->DisplayError(ERR_TOOMANY, m_object); return false; } vehicle->UpdateMapping(); diff --git a/src/object/auto/autolabo.cpp b/src/object/auto/autolabo.cpp index 172a618..07112b7 100644 --- a/src/object/auto/autolabo.cpp +++ b/src/object/auto/autolabo.cpp @@ -29,7 +29,6 @@ #include "ui/interface.h" #include "ui/window.h" -#include "ui/displaytext.h" #include <stdio.h> #include <string.h> @@ -179,7 +178,7 @@ bool CAutoLabo::EventProcess(const Event &event) if ( event.type == EVENT_OBJECT_RiGUN ) err = StartAction(RESEARCH_iGUN); if( err != ERR_OK && err != ERR_GENERIC ) - m_displayText->DisplayError(err, m_object); + m_main->DisplayError(err, m_object); if( err != ERR_GENERIC ) return false; @@ -370,7 +369,7 @@ bool CAutoLabo::EventProcess(const Event &event) delete power; } - m_displayText->DisplayError(INFO_LABO, m_object); + m_main->DisplayError(INFO_LABO, m_object); SoundManip(1.5f, 1.0f, 0.5f); m_phase = ALAP_CLOSE1; diff --git a/src/object/auto/autonuclear.cpp b/src/object/auto/autonuclear.cpp index 224776d..edab5eb 100644 --- a/src/object/auto/autonuclear.cpp +++ b/src/object/auto/autonuclear.cpp @@ -26,7 +26,6 @@ #include "ui/interface.h" #include "ui/window.h" -#include "ui/displaytext.h" #include <stdio.h> #include <string.h> @@ -274,7 +273,7 @@ bool CAutoNuclear::EventProcess(const Event &event) SetBusy(false); UpdateInterface(); - m_displayText->DisplayError(INFO_NUCLEAR, m_object); + m_main->DisplayError(INFO_NUCLEAR, m_object); m_phase = ANUP_WAIT; m_progress = 0.0f; @@ -402,7 +401,7 @@ void CAutoNuclear::CreatePower() if ( !power->CreateResource(pos, angle, OBJECT_ATOMIC) ) { delete power; - m_displayText->DisplayError(ERR_TOOMANY, m_object); + m_main->DisplayError(ERR_TOOMANY, m_object); return; } diff --git a/src/object/auto/autoresearch.cpp b/src/object/auto/autoresearch.cpp index 8308ebe..834a48c 100644 --- a/src/object/auto/autoresearch.cpp +++ b/src/object/auto/autoresearch.cpp @@ -29,7 +29,6 @@ #include "ui/interface.h" #include "ui/gauge.h" #include "ui/window.h" -#include "ui/displaytext.h" #include <stdio.h> #include <string.h> @@ -178,7 +177,7 @@ bool CAutoResearch::EventProcess(const Event &event) if ( event.type == EVENT_OBJECT_RATOMIC ) err = StartAction(RESEARCH_ATOMIC); if( err != ERR_OK && err != ERR_GENERIC ) - m_displayText->DisplayError(err, m_object); + m_main->DisplayError(err, m_object); if( err != ERR_GENERIC ) return false; @@ -257,7 +256,7 @@ bool CAutoResearch::EventProcess(const Event &event) m_eventQueue->AddEvent(newEvent); UpdateInterface(); - m_displayText->DisplayError(INFO_RESEARCH, m_object); + m_main->DisplayError(INFO_RESEARCH, m_object); message = ERR_OK; if ( m_research == RESEARCH_TANK ) message = INFO_RESEARCHTANK; @@ -270,7 +269,7 @@ bool CAutoResearch::EventProcess(const Event &event) if ( m_research == RESEARCH_ATOMIC ) message = INFO_RESEARCHATOMIC; if ( message != ERR_OK ) { - m_displayText->DisplayError(message, m_object); + m_main->DisplayError(message, m_object); } SetBusy(false); diff --git a/src/object/auto/autotower.cpp b/src/object/auto/autotower.cpp index 17a41f4..329cab0 100644 --- a/src/object/auto/autotower.cpp +++ b/src/object/auto/autotower.cpp @@ -27,7 +27,6 @@ #include "script/cmdtoken.h" #include "ui/interface.h" -#include "ui/displaytext.h" #include "ui/window.h" #include "ui/gauge.h" @@ -179,7 +178,7 @@ bool CAutoTower::EventProcess(const Event &event) target = SearchTarget(m_targetPos); if ( energy < ENERGY_FIRE ) { - m_displayText->DisplayError(ERR_TOWER_ENERGY, m_object); + m_main->DisplayError(ERR_TOWER_ENERGY, m_object); } if ( target == 0 || energy < ENERGY_FIRE ) { |