mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
CGE2: Implement snKill().
Add and implement Sprite::setCave() during the process.
This commit is contained in:
parent
6ac5e2cfcf
commit
95c844a035
@ -30,6 +30,7 @@
|
||||
#include "cge2/hero.h"
|
||||
#include "cge2/text.h"
|
||||
#include "cge2/sound.h"
|
||||
#include "cge2/events.h"
|
||||
|
||||
namespace CGE2 {
|
||||
|
||||
@ -324,7 +325,22 @@ void CommandHandler::runCommand() {
|
||||
}
|
||||
|
||||
void CGE2Engine::snKill(Sprite *spr) {
|
||||
warning("STUB: CGE2Engine::snKill()");
|
||||
if (spr) {
|
||||
if (spr->_flags._kept)
|
||||
releasePocket(spr);
|
||||
Sprite *nx = spr->_next;
|
||||
hide1(spr);
|
||||
_vga->_showQ->remove(spr);
|
||||
_eventManager->clearEvent(spr);
|
||||
if (spr->_flags._kill)
|
||||
delete spr;
|
||||
else {
|
||||
spr->setCave(-1);
|
||||
_spare->dispose(spr);
|
||||
}
|
||||
if (nx && nx->_flags._slav)
|
||||
snKill(nx);
|
||||
}
|
||||
}
|
||||
|
||||
void CGE2Engine::snHide(Sprite *spr, int val) {
|
||||
|
@ -516,6 +516,10 @@ void Sprite::tick() {
|
||||
step();
|
||||
}
|
||||
|
||||
void Sprite::setCave(int c) {
|
||||
_scene = c;
|
||||
}
|
||||
|
||||
void Sprite::gotoxyz(int x, int y, int z) {
|
||||
gotoxyz(V3D(x, y, z));
|
||||
}
|
||||
|
@ -262,6 +262,7 @@ public:
|
||||
CommandHandler::Command *snList(Action type);
|
||||
virtual void touch(uint16 mask, int x, int y, Common::KeyCode keyCode);
|
||||
virtual void tick();
|
||||
virtual void setCave(int c);
|
||||
void clrHide() { if (_ext) _ext->_b0 = NULL; }
|
||||
void sync(Common::Serializer &s);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user