Removed CSettings access through CRobotMain
parent
3815ef0bd6
commit
b5e98dd6e9
|
@ -5279,21 +5279,6 @@ char* CRobotMain::GetScriptFile()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CRobotMain::GetInterfaceGlint()
|
|
||||||
{
|
|
||||||
return m_settings->GetInterfaceGlint();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CRobotMain::GetSoluce4()
|
|
||||||
{
|
|
||||||
return m_settings->GetSoluce4();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CRobotMain::GetMovies()
|
|
||||||
{
|
|
||||||
return m_settings->GetMovies();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CRobotMain::GetShowSoluce()
|
bool CRobotMain::GetShowSoluce()
|
||||||
{
|
{
|
||||||
return m_showSoluce;
|
return m_showSoluce;
|
||||||
|
|
|
@ -234,9 +234,6 @@ public:
|
||||||
char* GetScriptFile();
|
char* GetScriptFile();
|
||||||
bool GetTrainerPilot();
|
bool GetTrainerPilot();
|
||||||
bool GetFixScene();
|
bool GetFixScene();
|
||||||
bool GetInterfaceGlint();
|
|
||||||
bool GetSoluce4();
|
|
||||||
bool GetMovies();
|
|
||||||
bool GetShowSoluce();
|
bool GetShowSoluce();
|
||||||
bool GetSceneSoluce();
|
bool GetSceneSoluce();
|
||||||
bool GetShowAll();
|
bool GetShowAll();
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
#include "common/global.h"
|
#include "common/global.h"
|
||||||
#include "common/make_unique.h"
|
#include "common/make_unique.h"
|
||||||
|
#include "common/settings.h"
|
||||||
#include "common/stringutils.h"
|
#include "common/stringutils.h"
|
||||||
|
|
||||||
#include "graphics/engine/lightman.h"
|
#include "graphics/engine/lightman.h"
|
||||||
|
@ -1118,7 +1119,7 @@ void COldObject::Read(CLevelParserLine* line)
|
||||||
int i = line->GetParam("run")->AsInt(-1);
|
int i = line->GetParam("run")->AsInt(-1);
|
||||||
if (i != -1)
|
if (i != -1)
|
||||||
{
|
{
|
||||||
if (i != PARAM_FIXSCENE && !m_main->GetMovies()) i = 0;
|
if (i != PARAM_FIXSCENE && !CSettings::GetInstancePointer()->GetMovies()) i = 0;
|
||||||
m_auto->Start(i); // starts the film
|
m_auto->Start(i); // starts the film
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "app/app.h"
|
#include "app/app.h"
|
||||||
|
|
||||||
#include "common/restext.h"
|
#include "common/restext.h"
|
||||||
|
#include "common/settings.h"
|
||||||
|
|
||||||
#include "level/robotmain.h"
|
#include "level/robotmain.h"
|
||||||
|
|
||||||
|
@ -38,6 +39,7 @@ CControl::CControl()
|
||||||
m_engine = Gfx::CEngine::GetInstancePointer();
|
m_engine = Gfx::CEngine::GetInstancePointer();
|
||||||
m_main = CRobotMain::GetInstancePointer();
|
m_main = CRobotMain::GetInstancePointer();
|
||||||
m_particle = m_engine->GetParticle();
|
m_particle = m_engine->GetParticle();
|
||||||
|
m_settings = CSettings::GetInstancePointer();
|
||||||
m_eventType = EVENT_NULL;
|
m_eventType = EVENT_NULL;
|
||||||
m_state = STATE_ENABLE|STATE_VISIBLE|STATE_GLINT;
|
m_state = STATE_ENABLE|STATE_VISIBLE|STATE_GLINT;
|
||||||
m_fontSize = Gfx::FONT_SIZE_SMALL;
|
m_fontSize = Gfx::FONT_SIZE_SMALL;
|
||||||
|
@ -420,7 +422,7 @@ void CControl::GlintFrame(const Event &event)
|
||||||
(m_state & STATE_ENABLE ) == 0 ||
|
(m_state & STATE_ENABLE ) == 0 ||
|
||||||
(m_state & STATE_VISIBLE) == 0 ) return;
|
(m_state & STATE_VISIBLE) == 0 ) return;
|
||||||
|
|
||||||
if ( !m_main->GetInterfaceGlint() ) return;
|
if ( !m_settings->GetInterfaceGlint() ) return;
|
||||||
|
|
||||||
m_glintProgress += event.rTime;
|
m_glintProgress += event.rTime;
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
class CRobotMain;
|
class CRobotMain;
|
||||||
class CSoundInterface;
|
class CSoundInterface;
|
||||||
|
class CSettings;
|
||||||
|
|
||||||
namespace Gfx
|
namespace Gfx
|
||||||
{
|
{
|
||||||
|
@ -120,6 +121,7 @@ protected:
|
||||||
CEventQueue* m_event;
|
CEventQueue* m_event;
|
||||||
CRobotMain* m_main;
|
CRobotMain* m_main;
|
||||||
CSoundInterface* m_sound;
|
CSoundInterface* m_sound;
|
||||||
|
CSettings* m_settings;
|
||||||
|
|
||||||
Math::Point m_pos; // corner upper / left
|
Math::Point m_pos; // corner upper / left
|
||||||
Math::Point m_dim; // dimensions
|
Math::Point m_dim; // dimensions
|
||||||
|
|
Loading…
Reference in New Issue