summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrzys-h <krzys_h@interia.pl>2013-03-24 19:05:20 +0100
committerkrzys-h <krzys_h@interia.pl>2013-03-24 19:05:20 +0100
commitf4e222248f4959ea82b9e94ec0e21dcecbecac88 (patch)
treeea64e7e03f63170f2e4c9c9ef039f57853d57628
parent5deb68e698fa9d7edd9125bea2d8c5e9df58cd6d (diff)
downloadcolobot-f4e222248f4959ea82b9e94ec0e21dcecbecac88.tar.gz
colobot-f4e222248f4959ea82b9e94ec0e21dcecbecac88.tar.bz2
colobot-f4e222248f4959ea82b9e94ec0e21dcecbecac88.zip
Retro mode now disables possibility of writing and running programs
-rw-r--r--src/object/brain.cpp26
-rw-r--r--src/object/robotmain.cpp4
-rw-r--r--src/object/robotmain.h4
3 files changed, 21 insertions, 13 deletions
diff --git a/src/object/brain.cpp b/src/object/brain.cpp
index babb38d..1f428b7 100644
--- a/src/object/brain.cpp
+++ b/src/object/brain.cpp
@@ -1288,18 +1288,20 @@ bool CBrain::CreateInterface(bool bSelect)
type == OBJECT_BEE ||
type == OBJECT_WORM ) // vehicle?
{
- ddim.x = dim.x*5.1f;
- ddim.y = dim.y*2.0f;
- pos.x = ox+sx*0.0f;
- pos.y = oy+sy*0.0f;
- pw->CreateList(pos, ddim, -1, EVENT_OBJECT_PROGLIST, 1.10f);
- UpdateScript(pw);
-
- pos.x = ox+sx*5.2f;
- pos.y = oy+sy*1.0f;
- pw->CreateButton(pos, dim, 8, EVENT_OBJECT_PROGRUN);
- pos.y = oy+sy*0.0f;
- pw->CreateButton(pos, dim, 22, EVENT_OBJECT_PROGEDIT);
+ if (!(CRobotMain::GetInstancePointer()->GetRetroMode())) {
+ ddim.x = dim.x*5.1f;
+ ddim.y = dim.y*2.0f;
+ pos.x = ox+sx*0.0f;
+ pos.y = oy+sy*0.0f;
+ pw->CreateList(pos, ddim, -1, EVENT_OBJECT_PROGLIST, 1.10f);
+ UpdateScript(pw);
+
+ pos.x = ox+sx*5.2f;
+ pos.y = oy+sy*1.0f;
+ pw->CreateButton(pos, dim, 8, EVENT_OBJECT_PROGRUN);
+ pos.y = oy+sy*0.0f;
+ pw->CreateButton(pos, dim, 22, EVENT_OBJECT_PROGEDIT);
+ }
}
if ( type == OBJECT_HUMAN ||
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index 2fde567..8dedb8c 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -6795,6 +6795,10 @@ const char* CRobotMain::GetFilesDir()
return m_dialog->GetFilesDir().c_str();
}
+bool CRobotMain::GetRetroMode()
+{
+ return m_retroStyle;
+}
//! Change the player's name
void CRobotMain::SetGamerName(const char *name)
diff --git a/src/object/robotmain.h b/src/object/robotmain.h
index 181a1cb..0bcd2dc 100644
--- a/src/object/robotmain.h
+++ b/src/object/robotmain.h
@@ -304,6 +304,7 @@ public:
const char* GetSavegameDir();
const char* GetPublicDir();
const char* GetFilesDir();
+ bool GetRetroMode();
void SetGamerName(const char *name);
char* GetGamerName();
@@ -447,6 +448,7 @@ protected:
int m_delayWriteMessage;
int m_movieInfoIndex;
+ //Level Checker flags
bool m_beginObject;
bool m_terrainGenerate;
bool m_terrainInitTextures;
@@ -454,7 +456,7 @@ protected:
bool m_terrainCreate;
int m_version; // Mission file version
- bool m_retroStyle; // Retro style
+ bool m_retroStyle; // Retro
bool m_immediatSatCom; // SatCom immediately?
bool m_beginSatCom; // messages SatCom poster?
bool m_movieLock; // movie in progress?