MORTEVIELLE: Use variable size for _rightFramePict in order to handle the different sizes of the Amiga and Atari versions

This commit is contained in:
Strangerke 2013-07-25 10:24:25 +02:00
parent 51f6966656
commit e86ec8bc81
3 changed files with 7 additions and 2 deletions

View File

@ -102,10 +102,12 @@ MortevielleEngine::MortevielleEngine(OSystem *system, const ADGameDescription *g
memset(_mem, 0, sizeof(_mem));
_curPict = nullptr;
_rightFramePict = nullptr;
}
MortevielleEngine::~MortevielleEngine() {
free(_curPict);
free(_rightFramePict);
}
/**

View File

@ -476,7 +476,8 @@ public:
// TODO: Replace the following with proper implementations, or refactor out the code using them
byte _mem[65536 * 16];
byte *_curPict;
byte _rightFramePict[1664];
byte *_rightFramePict;
Debugger _debugger;
ScreenSurface _screenSurface;
PaletteManager _paletteManager;

View File

@ -2570,7 +2570,9 @@ void MortevielleEngine::adzon() {
if (!f.open("dec.mor"))
error("Missing file - dec.mor");
f.read(_rightFramePict, 1664);
free(_rightFramePict);
_rightFramePict = (byte *)malloc(sizeof(byte) * f.size());
f.read(_rightFramePict, f.size());
f.close();
}