From 453fbb7454b5e6d517febd29aea4e589c44247bf Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 15 Jul 2011 22:56:49 +1000 Subject: CGE: Bugfixes for loading the room preview shapes list --- engines/cge/cge.cpp | 3 +++ engines/cge/cge.h | 1 + engines/cge/cge_main.cpp | 2 -- engines/cge/snail.h | 2 +- engines/cge/startup.cpp | 3 --- 5 files changed, 5 insertions(+), 6 deletions(-) (limited to 'engines') diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp index e192774f45..5c1bf2caf0 100644 --- a/engines/cge/cge.cpp +++ b/engines/cge/cge.cpp @@ -36,6 +36,7 @@ #include "cge/text.h" #include "cge/vol.h" #include "cge/walk.h" +#include "cge/startup.h" namespace CGE { @@ -95,6 +96,7 @@ void CGEEngine::setup() { _eventManager = new EventManager(); _offUseCount = atoi(_text->getText(OFF_USE_COUNT)); _music = true; + _mini = new byte[MINI_EMM_SIZE]; for (int i = 0; i < POCKET_NX; i++) _pocref[i] = -1; @@ -160,6 +162,7 @@ CGEEngine::~CGEEngine() { delete _snail; delete _snail_; delete _hero; + delete[] _mini; } Common::Error CGEEngine::run() { diff --git a/engines/cge/cge.h b/engines/cge/cge.h index dc757ec5a0..bb14251599 100644 --- a/engines/cge/cge.h +++ b/engines/cge/cge.h @@ -85,6 +85,7 @@ public: int _lev; Common::RandomSource _randomSource; + byte * _mini; virtual Common::Error run(); GUI::Debugger *getDebugger() { diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index f532bd05e8..3c926a3f89 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -90,7 +90,6 @@ static char _usrFnam[15] = "\0ɱ%^ //-------------------------------------------------------------------------- -static Ems *_mini = _miniEmm.alloc((uint16)MINI_EMM_SIZE); static BMP_PTR *_miniShpList = NULL; static BMP_PTR _miniShp[] = { NULL, NULL }; static bool _finis = false; @@ -348,7 +347,6 @@ void CGEEngine::miniStep(int stp) { if (stp < 0) _miniCave->_flags._hide = true; else { - &*_mini; *_miniShp[0] = *_miniShpList[stp]; if (_fx._current) &*(_fx._current->eAddr()); diff --git a/engines/cge/snail.h b/engines/cge/snail.h index 08f20b9d07..e8578e2b3d 100644 --- a/engines/cge/snail.h +++ b/engines/cge/snail.h @@ -48,7 +48,7 @@ namespace CGE { #define SNPOST_(c, r, v, p) _snail_->addCom(c, r, v, p) #define SNPOST2_(c, r, v, p) _snail_->addCom2(c, r, v, p) -#define SNAIL_FRAME_RATE 62 +#define SNAIL_FRAME_RATE 80 #define SNAIL_FRAME_DELAY (1000 / SNAIL_FRAME_RATE) struct Bar { diff --git a/engines/cge/startup.cpp b/engines/cge/startup.cpp index 9210b40c77..37c6b4f62e 100644 --- a/engines/cge/startup.cpp +++ b/engines/cge/startup.cpp @@ -37,9 +37,6 @@ extern char _copr[]; #define id (*(Ident*)_copr) - -Emm _miniEmm = MINI_EMM_SIZE; - // static Startup _startUp; int Startup::_mode = 0; -- cgit v1.2.3