From ef7a17a64a9d3781108ccdf2c7338b02bf3b3aa6 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 13 Aug 2011 16:44:48 +1000 Subject: CGE: Fix for HLINE not being available for demo The HorizLine class is really only used for on-screen debugging information anyway, so it's not a problem. --- engines/cge/cge.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'engines/cge/cge.cpp') diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp index cfd941017e..936aeea75a 100644 --- a/engines/cge/cge.cpp +++ b/engines/cge/cge.cpp @@ -131,7 +131,7 @@ void CGEEngine::setup() { _pocLight = new PocLight(this); for (int i = 0; i < kPocketNX; i++) _pocket[i] = NULL; - _horzLine = new HorizLine(this); + _horzLine = isDemo() ? NULL : new HorizLine(this); _infoLine = new InfoLine(this, kInfoW); _cavLight = new CavLight(this); _debugLine = new InfoLine(this, kScrWidth); @@ -247,4 +247,8 @@ bool CGEEngine::canSaveGameStateCurrently() { return (_startupMode == 0) && _mouse->_active; } +bool CGEEngine::isDemo() const { + return _gameDescription->flags & ADGF_DEMO; +} + } // End of namespace CGE -- cgit v1.2.3