summaryrefslogtreecommitdiffstats
path: root/src/object
diff options
context:
space:
mode:
authorkrzys-h <krzys_h@interia.pl>2014-06-27 19:50:09 +0200
committerkrzys-h <krzys_h@interia.pl>2014-06-27 19:52:09 +0200
commit1835d2ae580525603308206f7b8e6b4552b3ca0f (patch)
tree159fb045b27e9d816819b22a30e7f5b0b2eee173 /src/object
parent400bcd60fe07ef313f3944dda725020e0f6485da (diff)
downloadcolobot-1835d2ae580525603308206f7b8e6b4552b3ca0f.tar.gz
colobot-1835d2ae580525603308206f7b8e6b4552b3ca0f.tar.bz2
colobot-1835d2ae580525603308206f7b8e6b4552b3ca0f.zip
Removed old code based on #ifs (issue #55)
Diffstat (limited to 'src/object')
-rw-r--r--src/object/auto/autobase.cpp4
-rw-r--r--src/object/brain.cpp20
-rw-r--r--src/object/robotmain.cpp29
-rw-r--r--src/object/task/taskterraform.cpp23
4 files changed, 0 insertions, 76 deletions
diff --git a/src/object/auto/autobase.cpp b/src/object/auto/autobase.cpp
index 25320d3..af6c6e0 100644
--- a/src/object/auto/autobase.cpp
+++ b/src/object/auto/autobase.cpp
@@ -1356,11 +1356,7 @@ void CAutoBase::BeginTransit()
}
else
{
-#if _DEMO
- m_bgBack = "back46b.png"; // paintings
-#else
m_bgBack = "back46.png"; // paintings
-#endif
}
m_engine->SetFogStart(0.9f); // hardly any fog
diff --git a/src/object/brain.cpp b/src/object/brain.cpp
index b27acd1..4bd8742 100644
--- a/src/object/brain.cpp
+++ b/src/object/brain.cpp
@@ -1789,9 +1789,6 @@ bool CBrain::CreateInterface(bool bSelect)
pos.x = ox+sx*13.4f;
pos.y = oy+sy*0;
-#if _TEEN
- pw->CreateButton(pos, dim, 9, EVENT_OBJECT_RESET);
-#else
if ( m_object->GetTrainer() ) // Training?
{
pw->CreateButton(pos, dim, 9, EVENT_OBJECT_RESET);
@@ -1800,7 +1797,6 @@ bool CBrain::CreateInterface(bool bSelect)
{
pw->CreateButton(pos, dim, 10, EVENT_OBJECT_DESELECT);
}
-#endif
if ( type == OBJECT_MOBILEfa ||
type == OBJECT_MOBILEta ||
@@ -2459,17 +2455,10 @@ void CBrain::UpdateScript(Ui::CWindow *pw)
char name[100];
char title[100];
int i;
- bool bSoluce;
pl = static_cast< Ui::CList* >(pw->SearchControl(EVENT_OBJECT_PROGLIST));
if ( pl == 0 ) return;
-#if _SCHOOL
- bSoluce = m_main->GetSoluce4();
-#else
- bSoluce = true;
-#endif
-
for ( i=0 ; i<BRAINMAXSCRIPT ; i++ )
{
sprintf(name, "%d", i+1);
@@ -2477,10 +2466,6 @@ void CBrain::UpdateScript(Ui::CWindow *pw)
if ( m_script[i] != 0 )
{
m_script[i]->GetTitle(title);
- if ( !bSoluce && i == 3 )
- {
- title[0] = 0;
- }
if ( title[0] != 0 )
{
sprintf(name, "%d: %s", i+1, title);
@@ -2490,11 +2475,6 @@ void CBrain::UpdateScript(Ui::CWindow *pw)
pl->SetItemName(i, name);
}
- if ( !bSoluce )
- {
- pl->SetEnable(3, false);
- }
-
pl->SetSelect(m_selScript);
pl->ShowSelect(true);
}
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index 2424938..76c234d 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -1083,9 +1083,6 @@ void CRobotMain::ChangePhase(Phase phase)
m_sound->StopMusic(0.0f);
m_camera->SetControllingObject(0);
-/* TODO: #if _SCHOOL
- if ( true )
-#else*/
if (m_gameTime > 10.0f) // did you play at least 10 seconds?
{
int rank = m_dialog->GetSceneRank();
@@ -1172,12 +1169,6 @@ void CRobotMain::ChangePhase(Phase phase)
m_cmdEdit = false; // hidden for now
// Creates the speedometer.
-/* TODO: #if _TEEN
- dim.x = 30.0f/640.0f;
- dim.y = 20.0f/480.0f;
- pos.x = 4.0f/640.0f;
- pos.y = 454.0f/480.0f;
-#else*/
dim.x = 30.0f/640.0f;
dim.y = 20.0f/480.0f;
pos.x = 4.0f/640.0f;
@@ -1249,10 +1240,6 @@ void CRobotMain::ChangePhase(Phase phase)
}
else
{
-/* TODO: #if _TEEN
- m_winTerminate = (m_endingWinRank == 900);
- m_dialog->SetSceneName("teenw");
-#else*/
m_winTerminate = (m_endingWinRank == 904);
m_dialog->SetSceneName("win");
@@ -1266,16 +1253,6 @@ void CRobotMain::ChangePhase(Phase phase)
if (m_winTerminate)
{
-/* TODO: #if _TEEN
- pos.x = ox+sx*3; pos.y = oy+sy*1;
- ddim.x = dim.x*15; ddim.y = dim.y*2;
- pe = m_interface->CreateEdit(pos, ddim, 0, EVENT_EDIT0);
- pe->SetFontType(FONT_COLOBOT);
- pe->SetEditCap(false);
- pe->SetHiliteCap(false);
- pe->ReadText("help/teenw.txt");
-#else*/
-
pos.x = ox+sx*3; pos.y = oy+sy*0.2f;
ddim.x = dim.x*15; ddim.y = dim.y*3.0f;
pe = m_interface->CreateEdit(pos, ddim, 0, EVENT_EDIT0);
@@ -2106,9 +2083,6 @@ void CRobotMain::ExecuteCmd(char *cmd)
return;
}
-/* TODO: #if _TEEN
- if (strcmp(cmd, "allteens") == 0)
-#else*/
if (strcmp(cmd, "allmission") == 0)
{
m_showAll = !m_showAll;
@@ -4771,9 +4745,6 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
{
sprintf(op, "script%d", i+1); // script1..script10
OpString(line, op, name);
-/* TODO: #if _SCHOOL
- if ( !m_dialog->GetSoluce4() && i == 3 ) continue;
-#endif*/
if (name[0] != 0)
brain->SetScriptName(i, name);
diff --git a/src/object/task/taskterraform.cpp b/src/object/task/taskterraform.cpp
index 096e5de..61ff045 100644
--- a/src/object/task/taskterraform.cpp
+++ b/src/object/task/taskterraform.cpp
@@ -76,15 +76,9 @@ bool CTaskTerraform::EventProcess(const Event &event)
{
if ( m_soundChannel == -1 )
{
-#if _TEEN
- m_soundChannel = m_sound->Play(SOUND_GGG, m_object->GetPosition(0), 1.0f, 0.5f, true);
- m_sound->AddEnvelope(m_soundChannel, 1.0f, 2.0f, 1.5f, SOPER_CONTINUE);
- m_sound->AddEnvelope(m_soundChannel, 0.0f, 0.5f, 0.5f, SOPER_STOP);
-#else
m_soundChannel = m_sound->Play(SOUND_GGG, m_object->GetPosition(0), 1.0f, 0.5f, true);
m_sound->AddEnvelope(m_soundChannel, 1.0f, 2.0f, 4.0f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.0f, 0.5f, 0.5f, SOPER_STOP);
-#endif
}
dir.x = 0.0f;
@@ -109,11 +103,7 @@ bool CTaskTerraform::EventProcess(const Event &event)
if ( m_phase == TTP_DOWN )
{
pos.x = 9.0f;
-#if _TEEN
- pos.y = 4.0f-m_progress*4.0f;
-#else
pos.y = 4.0f-m_progress*5.8f;
-#endif
pos.z = 0.0f;
m_object->SetPosition(2, pos);
}
@@ -121,11 +111,7 @@ bool CTaskTerraform::EventProcess(const Event &event)
if ( m_phase == TTP_UP )
{
pos.x = 9.0f;
-#if _TEEN
- pos.y = 4.0f-(1.0f-m_progress)*4.0f;
-#else
pos.y = 4.0f-(1.0f-m_progress)*5.8f;
-#endif
pos.z = 0.0f;
m_object->SetPosition(2, pos);
}
@@ -230,11 +216,7 @@ Error CTaskTerraform::Start()
m_phase = TTP_CHARGE;
m_progress = 0.0f;
-#if _TEEN
- m_speed = 1.0f/1.5f;
-#else
m_speed = 1.0f/4.0f;
-#endif
m_time = 0.0f;
m_bError = false; // ok
@@ -261,9 +243,6 @@ Error CTaskTerraform::IsEnded()
if ( m_phase == TTP_CHARGE )
{
-#if _TEEN
- Terraform(); // changes the terrain.
-#endif
m_phase = TTP_DOWN;
m_speed = 1.0f/0.2f;
@@ -272,9 +251,7 @@ Error CTaskTerraform::IsEnded()
if ( m_phase == TTP_DOWN )
{
-#if !_TEEN
Terraform(); // changes the terrain.
-#endif
m_object->SetCirVibration(Math::Vector(0.0f, 0.0f, 0.0f));
m_object->SetZoom(0, 1.0f);