diff options
author | johndoe123 | 2012-09-11 13:56:48 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-05-08 20:43:40 +0200 |
commit | bbb23cdf275d686f23f0553154d36a5c1fb74c88 (patch) | |
tree | adf45cc08a1d885c283920d6920f9300ac529284 /engines | |
parent | b2175adf61a2524338ad8c78a747a326d1519266 (diff) | |
download | scummvm-rg350-bbb23cdf275d686f23f0553154d36a5c1fb74c88.tar.gz scummvm-rg350-bbb23cdf275d686f23f0553154d36a5c1fb74c88.tar.bz2 scummvm-rg350-bbb23cdf275d686f23f0553154d36a5c1fb74c88.zip |
NEVERHOOD: Start with Module2500
- Implement Scene2501
- Add Scene::removeSprite
Diffstat (limited to 'engines')
-rw-r--r-- | engines/neverhood/gamemodule.cpp | 15 | ||||
-rw-r--r-- | engines/neverhood/klayman.cpp | 51 | ||||
-rw-r--r-- | engines/neverhood/klayman.h | 8 | ||||
-rw-r--r-- | engines/neverhood/module.mk | 1 | ||||
-rw-r--r-- | engines/neverhood/module2500.cpp | 387 | ||||
-rw-r--r-- | engines/neverhood/module2500.h | 96 | ||||
-rw-r--r-- | engines/neverhood/module2700.cpp | 1 | ||||
-rw-r--r-- | engines/neverhood/scene.cpp | 5 | ||||
-rw-r--r-- | engines/neverhood/scene.h | 1 |
9 files changed, 563 insertions, 2 deletions
diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp index 32082835e9..9953492362 100644 --- a/engines/neverhood/gamemodule.cpp +++ b/engines/neverhood/gamemodule.cpp @@ -37,6 +37,7 @@ #include "neverhood/module2100.h" #include "neverhood/module2200.h" #include "neverhood/module2300.h" +#include "neverhood/module2500.h" #include "neverhood/module2600.h" #include "neverhood/module2700.h" #include "neverhood/module2800.h" @@ -327,10 +328,15 @@ void GameModule::startup() { _vm->gameState().sceneNum = 1; createModule(2700, -1); #endif -#if 1 +#if 0 _vm->gameState().sceneNum = 11; createModule(2800, -1); #endif +#if 1 + _vm->gameState().which = 2; + _vm->gameState().sceneNum = 0; + createModule(2500, -1); +#endif } void GameModule::createModule(int moduleNum, int which) { @@ -394,6 +400,10 @@ void GameModule::createModule(int moduleNum, int which) { setGlobalVar(0x91080831, 0x1A214010); _childObject = new Module2300(_vm, this, which); break; + case 2500: + setGlobalVar(0x91080831, 0x29220120); + _childObject = new Module2500(_vm, this, which); + break; case 2600: setGlobalVar(0x91080831, 0x40271018); _childObject = new Module2600(_vm, this, which); @@ -513,6 +523,9 @@ void GameModule::updateModule() { createModule(1000, 1); } break; + case 2500: + createModule(2600, 1); + break; case 2600: if (_moduleResult == 1) { createModule(2500, 0); diff --git a/engines/neverhood/klayman.cpp b/engines/neverhood/klayman.cpp index f69686aa66..9d28b5f046 100644 --- a/engines/neverhood/klayman.cpp +++ b/engines/neverhood/klayman.cpp @@ -5215,6 +5215,57 @@ void KmScene2247::sub453520() { FinalizeState(&Klayman::stStartWalkingDone); } +KmScene2501::KmScene2501(NeverhoodEngine *vm, Entity *parentScene, int16 x, int16 y) + : Klayman(vm, parentScene, x, y, 1000, 1000), _isSittingInTeleporter(false) { + // Empty +} + +uint32 KmScene2501::xHandleMessage(int messageNum, const MessageParam ¶m) { + uint32 messageResult = 0; + switch (messageNum) { + case 0x2000: + _isSittingInTeleporter = param.asInteger() != 0; + messageResult = 1; + break; + case 0x4001: + case 0x4800: + startWalkToX(param.asPoint().x, false); + break; + case 0x4004: + if (_isSittingInTeleporter) + GotoState(&Klayman::sub421350); + else + GotoState(&Klayman::stTryStandIdle); + break; + case 0x4817: + setDoDeltaX(param.asInteger()); + gotoNextStateExt(); + break; + case 0x481D: + if (_isSittingInTeleporter) + GotoState(&Klayman::stTurnToUseInTeleporter); + break; + case 0x481E: + if (_isSittingInTeleporter) + GotoState(&Klayman::stReturnFromUseInTeleporter); + break; + case 0x4834: + GotoState(&Klayman::stStepOver); + break; + case 0x4835: + sendMessage(_parentScene, 0x2000, 1); + _isSittingInTeleporter = true; + GotoState(&Klayman::stSitInTeleporter); + break; + case 0x4836: + sendMessage(_parentScene, 0x2000, 0); + _isSittingInTeleporter = false; + GotoState(&Klayman::stGetUpFromTeleporter); + break; + } + return messageResult; +} + KmScene2801::KmScene2801(NeverhoodEngine *vm, Entity *parentScene, int16 x, int16 y) : Klayman(vm, parentScene, x, y, 1000, 1000) { // Empty diff --git a/engines/neverhood/klayman.h b/engines/neverhood/klayman.h index 6cfb0fc733..fea543cdc9 100644 --- a/engines/neverhood/klayman.h +++ b/engines/neverhood/klayman.h @@ -578,6 +578,14 @@ protected: void sub453520(); }; +class KmScene2501 : public Klayman { +public: + KmScene2501(NeverhoodEngine *vm, Entity *parentScene, int16 x, int16 y); +protected: + bool _isSittingInTeleporter; + uint32 xHandleMessage(int messageNum, const MessageParam ¶m); +}; + class KmScene2801 : public Klayman { public: KmScene2801(NeverhoodEngine *vm, Entity *parentScene, int16 x, int16 y); diff --git a/engines/neverhood/module.mk b/engines/neverhood/module.mk index 780ee76ae1..ac4064bf81 100644 --- a/engines/neverhood/module.mk +++ b/engines/neverhood/module.mk @@ -25,6 +25,7 @@ MODULE_OBJS = \ module2100.o \ module2200.o \ module2300.o \ + module2500.o \ module2600.o \ module2700.o \ module2800.o \ diff --git a/engines/neverhood/module2500.cpp b/engines/neverhood/module2500.cpp new file mode 100644 index 0000000000..0f746d1488 --- /dev/null +++ b/engines/neverhood/module2500.cpp @@ -0,0 +1,387 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "neverhood/module2500.h" + +namespace Neverhood { + +Module2500::Module2500(NeverhoodEngine *vm, Module *parentModule, int which) + : Module(vm, parentModule), _soundResource1(vm), _soundResource2(vm), + _soundResource3(vm), _soundResource4(vm), _soundIndex(0) { + + // TODO Music18hList_add(0x29220120, 0x05343184); + // TODO Music18hList_play(0x05343184, 0, 0, 1); + SetMessageHandler(&Module2500::handleMessage); + + if (which < 0) { + createScene(_vm->gameState().sceneNum, _vm->gameState().which); + } else { + createScene(0, 0); + } + + _soundResource1.load(0x00880CCC); + _soundResource2.load(0x00880CC0); + _soundResource3.load(0x00880CCC); + _soundResource4.load(0x00880CC0); + +} + +Module2500::~Module2500() { +} + +void Module2500::createScene(int sceneNum, int which) { + debug("Module2500::createScene(%d, %d)", sceneNum, which); + _vm->gameState().sceneNum = sceneNum; + switch (_vm->gameState().sceneNum) { + case 0: + _childObject = new Scene2501(_vm, this, which); + break; + } + SetUpdateHandler(&Module2500::updateScene); + _childObject->handleUpdate(); +} + +void Module2500::updateScene() { + if (!updateChild()) { + switch (_vm->gameState().sceneNum) { + case 0: + if (_moduleResult == 1) + createScene(2, 0); + else if (_moduleResult == 2) + createScene(1, 0); + else + leaveModule(0); + break; + } + } +} + +uint32 Module2500::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { + uint32 messageResult = Module::handleMessage(messageNum, param, sender); + switch (messageNum) { + case 0x200D: + switch (_soundIndex) { + case 0: + _soundResource1.play(); + break; + case 1: + _soundResource2.play(); + break; + case 2: + _soundResource3.play(); + break; + case 3: + _soundResource4.play(); + break; + } + _soundIndex++; + if (_soundIndex >= 4) + _soundIndex = 0; + break; + } + return messageResult; +} + +Class541::Class541(NeverhoodEngine *vm, int16 x, int16 y) + : AnimatedSprite(vm, 0x1209E09F, 1100, x, y) { + + startAnimation(0x1209E09F, 1, -1); + _newStickFrameIndex = 1; + setDoDeltaX(1); +} + +Class542::Class542(NeverhoodEngine *vm, int16 x, int16 y) + : AnimatedSprite(vm, 0x1209E09F, 100, x, y) { + + _newStickFrameIndex = 0; + setDoDeltaX(1); +} + +Scene2501::Scene2501(NeverhoodEngine *vm, Module *parentModule, int which) + : Scene(vm, parentModule, true) { + + _sceneInfos[0] = _vm->_staticData->getSceneInfo2700(0x004B2628); + _sceneInfos[1] = _vm->_staticData->getSceneInfo2700(0x004B264C); + _sceneInfos[2] = _vm->_staticData->getSceneInfo2700(0x004B2670); + + setGlobalVar(0x21E60190, 1); + SetUpdateHandler(&Scene2501::update); + _surfaceFlag = true; + setBackground(0x1B8E8115); + setPalette(0x1B8E8115); + _palette->addPalette(0x00128842, 65, 31, 65); + _palette->addPalette("paKlayRed", 0, 64, 0); + insertMouse433(0xE81111B0); + + _class437 = createSprite<Class437>(0x99BE9015); // Don't add this to the sprite list + addEntity(_class437); + + _class521 = createSprite<Class521>(this, 211, 400); // Create but don't add to the sprite list yet + _class541 = insertSprite<Class541>(211, 400); + _class542 = insertSprite<Class542>(211, 400); + insertStaticSprite(0xC42AC521, 1500); + + if (which < 0) { + insertKlayman<KmScene2501>(162, 393); + _kmScene2501 = _klayman; + _klaymanInCar = false; + setMessageList(0x004B2538); + setRectList(0x004B2608); + SetMessageHandler(&Scene2501::handleMessage); + SetUpdateHandler(&Scene2501::update); + sendMessage(_class521, 0x2009, 0); + _class521->setVisible(false); + _currTrackIndex = 0; + } else if (which == 1 || which == 2) { + addSprite(_class521); + _kmScene2501 = (Klayman*)new KmScene2501(_vm, this, 275, 393); + _klaymanInCar = true; + sendMessage(_kmScene2501, 0x2000, 1); + _kmScene2501->setDoDeltaX(1); + SetMessageHandler(&Scene2501::hmRidingCar); + SetUpdateHandler(&Scene2501::upRidingCar); + _class541->setVisible(false); + _class542->setVisible(false); + _currTrackIndex = which; + } else { + insertKlayman<KmScene2501>(162, 393); + _kmScene2501 = _klayman; + _klaymanInCar = false; + setMessageList(0x004B2538); + setRectList(0x004B2608); + SetMessageHandler(&Scene2501::handleMessage); + SetUpdateHandler(&Scene2501::update); + sendMessage(_class521, 0x2009, 0); + _class521->setVisible(false); + _currTrackIndex = 0; + } + + // TODO _class517 = insertSprite<Class517>(_class521, _class437->getSurface(), 4); + // TODO _class520 = insertSprite<Class520>(_class521, _class437->getSurface(), 4); + // TODO _class519 = insertSprite<Class519>(_class521, _class437->getSurface(), 4); + insertSprite<Class518>(_class521); + + _pointListsCount = 3; + _newTrackIndex = -1; + _dataResource.load(calcHash("Ashooded")); + + _trackPoints = _dataResource.getPointArray(_sceneInfos[_currTrackIndex]->pointListName); + _class521->setPathPoints(_trackPoints); + + if (which >= 0 && _sceneInfos[_currTrackIndex]->which2 == which) { + NPoint testPoint = (*_trackPoints)[_trackPoints->size() - 1]; + sendMessage(_class521, 0x2002, _trackPoints->size() - 1); + if (testPoint.x < 0 || testPoint.x >= 640 || testPoint.y < 0 || testPoint.y >= 480) + sendMessage(_class521, 0x2007, 150); + } else { + NPoint testPoint = (*_trackPoints)[0]; + sendMessage(_class521, 0x2002, 0); + if (testPoint.x < 0 || testPoint.x >= 640 || testPoint.y < 0 || testPoint.y >= 480) + sendMessage(_class521, 0x2008, 150); + } + + _carStatus = 0; + +} + +Scene2501::~Scene2501() { + // Free sprites not currently in the sprite list + if (_klaymanInCar) + delete _kmScene2501; + else + delete _class521; +} + +void Scene2501::update() { + Scene::update(); + if (_carStatus == 1) { + removeSprite(_klayman); + addSprite(_class521); + clearRectList(); + _klaymanInCar = true; + SetMessageHandler(&Scene2501::hmCarAtHome); + SetUpdateHandler(&Scene2501::upCarAtHome); + _class541->setVisible(false); + _class542->setVisible(false); + _class521->setVisible(true); + sendMessage(_class521, 0x2009, 0); + _class521->handleUpdate(); + _klayman = NULL; + _carStatus = 0; + } + updateKlaymanCliprect(); +} + +void Scene2501::upCarAtHome() { + Scene::update(); + if (_mouseClicked) { + if (_mouseClickPos.x <= 210 && _class521->getX() == 211 && _class521->getY() == 400) { + sendMessage(_class521, 0x200A, 0); + SetUpdateHandler(&Scene2501::upGettingOutOfCar); + } else { + findClosestTrack(_mouseClickPos); + SetMessageHandler(&Scene2501::hmRidingCar); + SetUpdateHandler(&Scene2501::upRidingCar); + } + _mouseClicked = false; + } + updateKlaymanCliprect(); +} + +void Scene2501::upGettingOutOfCar() { + Scene::update(); + if (_carStatus == 2) { + _klayman = _kmScene2501; + removeSprite(_class521); + addSprite(_klayman); + _klaymanInCar = false; + SetMessageHandler(&Scene2501::handleMessage); + SetUpdateHandler(&Scene2501::update); + setRectList(0x004B2608); + _class541->setVisible(true); + _class542->setVisible(true); + _class521->setVisible(false); + setMessageList(0x004B2570); + runMessageList(); + _klayman->handleUpdate(); + _carStatus = 0; + } + updateKlaymanCliprect(); +} + +void Scene2501::upRidingCar() { + Scene::update(); + if (_mouseClicked) { + findClosestTrack(_mouseClickPos); + _mouseClicked = false; + } +} + +uint32 Scene2501::handleMessage(int messageNum, const MessageParam ¶m, Entity *sender) { + uint32 messageResult = Scene::handleMessage(messageNum, param, sender); + switch (messageNum) { + case 0x100D: + if (param.asInteger() == 0x60842040) + _carStatus = 1; + break; + case 0x200D: + sendMessage(_parentModule, 0x200D, 0); + break; + } + return messageResult; +} + +uint32 Scene2501::hmRidingCar(int messageNum, const MessageParam ¶m, Entity *sender) { + uint32 messageResult = Scene::handleMessage(messageNum, param, sender); + switch (messageNum) { + case 0x2005: + if (_sceneInfos[_currTrackIndex]->which1 < 0 && _newTrackIndex >= 0) { + changeTrack(); + } else if (_sceneInfos[_currTrackIndex]->which1 == 0) { + SetMessageHandler(&Scene2501::hmCarAtHome); + SetUpdateHandler(&Scene2501::upCarAtHome); + sendMessage(_class521, 0x200F, 1); + } else if (_sceneInfos[_currTrackIndex]->which1 > 0) { + leaveScene(_sceneInfos[_currTrackIndex]->which1); + } + break; + case 0x2006: + if (_sceneInfos[_currTrackIndex]->which2 < 0 && _newTrackIndex >= 0) { + changeTrack(); + } else if (_sceneInfos[_currTrackIndex]->which2 == 0) { + SetMessageHandler(&Scene2501::hmCarAtHome); + SetUpdateHandler(&Scene2501::upCarAtHome); + sendMessage(_class521, 0x200F, 1); + } else if (_sceneInfos[_currTrackIndex]->which2 > 0) { + leaveScene(_sceneInfos[_currTrackIndex]->which2); + } + break; + case 0x200D: + sendMessage(_parentModule, 0x200D, 0); + break; + } + return messageResult; +} + +uint32 Scene2501::hmCarAtHome(int messageNum, const MessageParam ¶m, Entity *sender) { + uint32 messageResult = Scene::handleMessage(messageNum, param, sender); + switch (messageNum) { + case 0x200A: + _carStatus = 2; + break; + case 0x200D: + sendMessage(_parentModule, 0x200D, 0); + break; + } + return messageResult; +} + +void Scene2501::changeTrack() { + _currTrackIndex = _newTrackIndex; + _trackPoints = _dataResource.getPointArray(_sceneInfos[_currTrackIndex]->pointListName); + _class521->setPathPoints(_trackPoints); + if (_currTrackIndex == 0) { + sendMessage(_class521, 0x2002, _trackPoints->size() - 1); + } else { + sendMessage(_class521, 0x2002, 0); + } + sendPointMessage(_class521, 0x2004, _clickPoint); + _newTrackIndex = -1; +} + +void Scene2501::findClosestTrack(NPoint &pt) { + // TODO NOTE This is uses with minor variations in other scenes, maybe merge them? + int minMatchDistance = 640; + int minMatchTrackIndex = -1; + // Find the track which contains a point closest to pt + for (int infoIndex = 0; infoIndex < _pointListsCount; infoIndex++) { + NPointArray *pointList = _dataResource.getPointArray(_sceneInfos[infoIndex]->pointListName); + for (uint pointIndex = 0; pointIndex < pointList->size(); pointIndex++) { + NPoint testPt = (*pointList)[pointIndex]; + int distance = calcDistance(testPt.x, testPt.y, pt.x, pt.y); + if (distance < minMatchDistance) { + minMatchTrackIndex = infoIndex; + minMatchDistance = distance; + } + } + } + if (minMatchTrackIndex >= 0 && minMatchTrackIndex != _currTrackIndex) { + _newTrackIndex = minMatchTrackIndex; + _clickPoint = pt; + if (_currTrackIndex == 0) + sendMessage(_class521, 0x2003, _trackPoints->size() - 1); + else + sendMessage(_class521, 0x2003, 0); + } else { + _newTrackIndex = -1; + sendMessage(_class521, 0x2004, pt); + } +} + +void Scene2501::updateKlaymanCliprect() { + if (_kmScene2501->getX() <= 211) + _kmScene2501->setClipRect(0, 0, 640, 480); + else + _kmScene2501->setClipRect(0, 0, 640, 388); +} + +} // End of namespace Neverhood diff --git a/engines/neverhood/module2500.h b/engines/neverhood/module2500.h new file mode 100644 index 0000000000..d907d5fbda --- /dev/null +++ b/engines/neverhood/module2500.h @@ -0,0 +1,96 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef NEVERHOOD_MODULE2500_H +#define NEVERHOOD_MODULE2500_H + +#include "neverhood/neverhood.h" +#include "neverhood/module.h" +#include "neverhood/scene.h" +#include "neverhood/module1600.h" +#include "neverhood/module2700.h" + +namespace Neverhood { + +// Module2500 + +class Module2500 : public Module { +public: + Module2500(NeverhoodEngine *vm, Module *parentModule, int which); + virtual ~Module2500(); +protected: + SoundResource _soundResource1; + SoundResource _soundResource2; + SoundResource _soundResource3; + SoundResource _soundResource4; + int _soundIndex; + void createScene(int sceneNum, int which); + void updateScene(); + uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender); +}; + +class Class541 : public AnimatedSprite { +public: + Class541(NeverhoodEngine *vm, int16 x, int16 y); +}; + +class Class542 : public AnimatedSprite { +public: + Class542(NeverhoodEngine *vm, int16 x, int16 y); +}; + +class Scene2501 : public Scene { +public: + Scene2501(NeverhoodEngine *vm, Module *parentModule, int which); + virtual ~Scene2501(); +protected: + Class521 *_class521; + Sprite *_class437; + // TODO Sprite *_class517; + // TODO Sprite *_class519; + // TODO Sprite *_class520; + Sprite *_class541; + Sprite *_class542; + Klayman *_kmScene2501; + NPointArray *_trackPoints; + SceneInfo2700 *_sceneInfos[3]; + int _currTrackIndex; + NPoint _clickPoint; + int _pointListsCount; + int _newTrackIndex; + int _carStatus; + bool _klaymanInCar; + void update(); + void upCarAtHome(); + void upGettingOutOfCar(); + void upRidingCar(); + uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender); + uint32 hmRidingCar(int messageNum, const MessageParam ¶m, Entity *sender); + uint32 hmCarAtHome(int messageNum, const MessageParam ¶m, Entity *sender); + void findClosestTrack(NPoint &pt); + void changeTrack(); + void updateKlaymanCliprect(); +}; + +} // End of namespace Neverhood + +#endif /* NEVERHOOD_MODULE2500_H */ diff --git a/engines/neverhood/module2700.cpp b/engines/neverhood/module2700.cpp index 096e33546e..862b832654 100644 --- a/engines/neverhood/module2700.cpp +++ b/engines/neverhood/module2700.cpp @@ -90,7 +90,6 @@ Module2700::Module2700(NeverhoodEngine *vm, Module *parentModule, int which) // TODO Music18hList_play(0x04020210, 24, 2, 1); SetMessageHandler(&Module2700::handleMessage); - if (which < 0) { which = _vm->gameState().which; if (_vm->gameState().sceneNum == 0 || _vm->gameState().sceneNum == 30 || _vm->gameState().sceneNum == 31) diff --git a/engines/neverhood/scene.cpp b/engines/neverhood/scene.cpp index 457d5866d0..d189fad240 100644 --- a/engines/neverhood/scene.cpp +++ b/engines/neverhood/scene.cpp @@ -158,6 +158,11 @@ Sprite *Scene::addSprite(Sprite *sprite) { return sprite; } +void Scene::removeSprite(Sprite *sprite) { + removeSurface(sprite->getSurface()); + removeEntity(sprite); +} + void Scene::setSurfacePriority(BaseSurface *surface, int priority) { surface->setPriority(priority); if (removeSurface(surface)) diff --git a/engines/neverhood/scene.h b/engines/neverhood/scene.h index e962266168..f9e221a6da 100644 --- a/engines/neverhood/scene.h +++ b/engines/neverhood/scene.h @@ -47,6 +47,7 @@ public: void addSurface(BaseSurface *surface); bool removeSurface(BaseSurface *surface); Sprite *addSprite(Sprite *sprite); + void removeSprite(Sprite *sprite); void setSurfacePriority(BaseSurface *surface, int priority); void deleteSprite(Sprite **sprite); Background *addBackground(Background *background); |