mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 09:23:37 +00:00
CGE: Removed the _mini data block originally used to hold inventory shapes in high memory
This commit is contained in:
parent
46e1f03585
commit
1208e7e5af
@ -58,13 +58,11 @@ CGEEngine::CGEEngine(OSystem *syst, const ADGameDescription *gameDescription)
|
||||
|
||||
void CGEEngine::initCaveValues() {
|
||||
if (_isDemo) {
|
||||
_mini = new byte[16384];
|
||||
_caveDx = 23;
|
||||
_caveDy = 29;
|
||||
_caveNx = 3;
|
||||
_caveNy = 1;
|
||||
} else {
|
||||
_mini = new byte[65536];
|
||||
_caveDx = 9;
|
||||
_caveDy = 10;
|
||||
_caveNx = 8;
|
||||
@ -100,7 +98,6 @@ void CGEEngine::initCaveValues() {
|
||||
}
|
||||
|
||||
void CGEEngine::freeCaveValues() {
|
||||
delete[] _mini;
|
||||
free(_heroXY);
|
||||
free(_barriers);
|
||||
}
|
||||
@ -216,6 +213,8 @@ CGEEngine::~CGEEngine() {
|
||||
delete _snail_;
|
||||
delete _hero;
|
||||
|
||||
delete[] _miniShpList;
|
||||
|
||||
freeCaveValues();
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,6 @@ public:
|
||||
Bar *_barriers;
|
||||
|
||||
Common::RandomSource _randomSource;
|
||||
byte *_mini;
|
||||
BitmapPtr *_miniShp;
|
||||
BitmapPtr *_miniShpList;
|
||||
int _startGameSlot;
|
||||
|
@ -1525,22 +1525,18 @@ void CGEEngine::runGame() {
|
||||
if (!_music)
|
||||
killMidi();
|
||||
|
||||
if (_mini && INI_FILE::exist("MINI.SPR")) {
|
||||
if (INI_FILE::exist("MINI.SPR")) {
|
||||
_miniShp = new BitmapPtr[2];
|
||||
_miniShp[0] = _miniShp[1] = NULL;
|
||||
|
||||
uint8 *ptr = (uint8 *) &*_mini;
|
||||
if (ptr != NULL) {
|
||||
loadSprite("MINI", -1, 0, kMiniX, kMiniY);
|
||||
expandSprite(_miniCave = _sprite); // NULL is ok
|
||||
if (_miniCave) {
|
||||
_miniCave->_flags._kill = false;
|
||||
_miniCave->_flags._hide = true;
|
||||
_miniCave->moveShapes(ptr);
|
||||
_miniShp[0] = new Bitmap(*_miniCave->shp());
|
||||
_miniShpList = _miniCave->setShapeList(_miniShp);
|
||||
postMiniStep(-1);
|
||||
}
|
||||
loadSprite("MINI", -1, 0, kMiniX, kMiniY);
|
||||
expandSprite(_miniCave = _sprite); // NULL is ok
|
||||
if (_miniCave) {
|
||||
_miniCave->_flags._kill = false;
|
||||
_miniCave->_flags._hide = true;
|
||||
_miniShp[0] = new Bitmap(*_miniCave->shp());
|
||||
_miniShpList = _miniCave->setShapeList(_miniShp);
|
||||
postMiniStep(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user