Fix for bugs #2843081 "FW: Assert starting demo (regression)" and #2843080 "OS: Assert starting demo (regression)".

svn-id: r43743
This commit is contained in:
Johannes Schickel 2009-08-25 23:11:17 +00:00
parent b5da8a5cdc
commit 228ceb3b63
3 changed files with 16 additions and 0 deletions

View File

@ -144,6 +144,8 @@ void CineEngine::initialize() {
renderer = new FWRenderer;
}
renderer->initialize();
collisionPage = new byte[320 * 200];
// Clear part buffer as there's nothing loaded into it yet.

View File

@ -107,6 +107,11 @@ FWRenderer::~FWRenderer() {
delete[] _backBuffer;
}
bool FWRenderer::initialize() {
_activePal = Palette(kLowPalFormat, kLowPalNumColors);
return true;
}
/* \brief Reset renderer state
*/
void FWRenderer::clear() {
@ -888,6 +893,11 @@ OSRenderer::~OSRenderer() {
}
}
bool OSRenderer::initialize() {
_activePal = Palette(kHighPalFormat, kHighPalNumColors);
return true;
}
/*! \brief Reset Operation Stealth renderer state
*/
void OSRenderer::clear() {

View File

@ -109,6 +109,8 @@ public:
FWRenderer();
virtual ~FWRenderer();
virtual bool initialize();
/*! \brief Test if renderer is ready to draw */
virtual bool ready() { return _background != NULL; }
@ -167,6 +169,8 @@ public:
OSRenderer();
~OSRenderer();
bool initialize();
/*! \brief Test if renderer is ready to draw */
bool ready() { return _bgTable[_currentBg].bg != NULL; }