mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 11:36:22 +00:00
CGE: Fixed several memory leaks of main objects
This commit is contained in:
parent
891032053a
commit
e2b19ad9b0
@ -74,8 +74,10 @@ void CGEEngine::setup() {
|
||||
_heart = new Heart;
|
||||
_sys = new System(this);
|
||||
_pocLight = new PocLight(this);
|
||||
for (int i = 0; i < POCKET_NX; i++)
|
||||
for (int i = 0; i < POCKET_NX; i++) {
|
||||
_pocket[i] = new Sprite(this, NULL);
|
||||
_pocket[i]->_flags._kill = false;
|
||||
}
|
||||
_sprite = new Sprite(this, NULL);
|
||||
_miniCave = new Sprite(this, NULL);
|
||||
_miniCave->_flags._kill = false;
|
||||
|
@ -1631,6 +1631,7 @@ void CGEEngine::runGame() {
|
||||
_hero->gotoxy(_heroXY[_now - 1]._x, _heroXY[_now - 1]._y);
|
||||
if (INI_FILE::exist("00SHADOW.SPR")) {
|
||||
loadSprite("00SHADOW", -1, 0, _hero->_x + 14, _hero->_y + 51);
|
||||
delete _shadow;
|
||||
if ((_shadow = _sprite) != NULL) {
|
||||
_shadow->_ref = 2;
|
||||
_shadow->_flags._tran = true;
|
||||
@ -1850,9 +1851,6 @@ void CGEEngine::cge_main() {
|
||||
_debugLine->_flags._hide = true;
|
||||
_horzLine->_flags._hide = true;
|
||||
|
||||
//srand((uint16) Timer());
|
||||
_sys = new System(this);
|
||||
|
||||
if (_music && Startup::_soundOk)
|
||||
loadMidi(0);
|
||||
if (Startup::_mode < 2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user