mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 14:50:17 +00:00
CGE: Remove Heart
This commit is contained in:
parent
5c7eb9a768
commit
8b53899ca7
@ -81,7 +81,6 @@ void CGEEngine::setup() {
|
||||
// Initialise engine objects
|
||||
_text = new Text(this, progName(), 128);
|
||||
_vga = new Vga(M13H);
|
||||
_heart = new Heart;
|
||||
_sys = new System(this);
|
||||
_pocLight = new PocLight(this);
|
||||
for (int i = 0; i < kPocketNX; i++) {
|
||||
@ -170,7 +169,6 @@ CGEEngine::~CGEEngine() {
|
||||
delete _cavLight;
|
||||
delete _debugLine;
|
||||
delete _text;
|
||||
delete _heart;
|
||||
delete _pocLight;
|
||||
delete _keyboard;
|
||||
delete _mouse;
|
||||
|
@ -63,7 +63,6 @@ namespace CGE {
|
||||
uint16 _stklen = (STACK_SIZ * 2);
|
||||
|
||||
Vga *_vga;
|
||||
Heart *_heart;
|
||||
System *_sys;
|
||||
Sprite *_pocLight;
|
||||
EventManager *_eventManager;
|
||||
@ -625,8 +624,6 @@ void CGEEngine::caveUp() {
|
||||
_dark = false;
|
||||
if (!_startupMode)
|
||||
_mouse->on();
|
||||
|
||||
_heart->_enable = true;
|
||||
}
|
||||
|
||||
|
||||
@ -675,7 +672,6 @@ void CGEEngine::switchCave(int cav) {
|
||||
debugC(1, kCGEDebugEngine, "CGEEngine::switchCave(%d)", cav);
|
||||
|
||||
if (cav != _now) {
|
||||
_heart->_enable = false;
|
||||
if (cav < 0) {
|
||||
_snail->addCom(kSnLabel, -1, 0, NULL); // wait for repaint
|
||||
_snail->addCom2(kSnExec, -1, 0, kQGame); // switch cave
|
||||
@ -1592,7 +1588,6 @@ void CGEEngine::runGame() {
|
||||
}
|
||||
|
||||
_keyboard->setClient(NULL);
|
||||
_heart->_enable = false;
|
||||
_snail->addCom(kSnClear, -1, 0, NULL);
|
||||
_snail_->addCom(kSnClear, -1, 0, NULL);
|
||||
_mouse->off();
|
||||
@ -1612,16 +1607,12 @@ void CGEEngine::movie(const char *ext) {
|
||||
loadScript(fn);
|
||||
expandSprite(_vga->_spareQ->locate(999));
|
||||
feedSnail(_vga->_showQ->locate(999), kTake);
|
||||
|
||||
_vga->_showQ->append(_mouse);
|
||||
|
||||
_heart->_enable = true;
|
||||
_keyboard->setClient(_sys);
|
||||
while (!_snail->idle() && !_eventManager->_quitFlag)
|
||||
mainLoop();
|
||||
|
||||
_keyboard->setClient(NULL);
|
||||
_heart->_enable = false;
|
||||
_snail->addCom(kSnClear, -1, 0, NULL);
|
||||
_snail_->addCom(kSnClear, -1, 0, NULL);
|
||||
_vga->_showQ->clear();
|
||||
@ -1662,7 +1653,6 @@ bool CGEEngine::showTitle(const char *name) {
|
||||
_vga->copyPage(1, 2);
|
||||
_vga->copyPage(0, 1);
|
||||
_vga->_showQ->append(_mouse);
|
||||
_heart->_enable = true;
|
||||
_mouse->on();
|
||||
for (; !_snail->idle() || Vmenu::_addr;) {
|
||||
mainLoop();
|
||||
@ -1671,7 +1661,6 @@ bool CGEEngine::showTitle(const char *name) {
|
||||
}
|
||||
|
||||
_mouse->off();
|
||||
_heart->_enable = false;
|
||||
_vga->_showQ->clear();
|
||||
_vga->copyPage(0, 2);
|
||||
_soundOk = 2;
|
||||
@ -1698,13 +1687,11 @@ bool CGEEngine::showTitle(const char *name) {
|
||||
strcpy(_usrFnam, "User");
|
||||
usr_ok = true;
|
||||
} else {
|
||||
_heart->_enable = true;
|
||||
for (takeName(); GetText::_ptr;) {
|
||||
mainLoop();
|
||||
if (_eventManager->_quitFlag)
|
||||
return false;
|
||||
}
|
||||
_heart->_enable = false;
|
||||
if (_keyboard->last() == Enter && *_usrFnam)
|
||||
usr_ok = true;
|
||||
}
|
||||
|
@ -122,7 +122,6 @@ private:
|
||||
};
|
||||
|
||||
extern Vga *_vga;
|
||||
extern Heart *_heart;
|
||||
extern System *_sys;
|
||||
extern int _offUseCount;
|
||||
extern Sprite *_pocLight;
|
||||
|
@ -501,16 +501,13 @@ void CGEEngine::snZTrim(Sprite *spr) {
|
||||
|
||||
if (spr)
|
||||
if (spr->active()) {
|
||||
bool en = _heart->_enable;
|
||||
Sprite *s;
|
||||
_heart->_enable = false;
|
||||
s = (spr->_flags._shad) ? spr->_prev : NULL;
|
||||
_vga->_showQ->insert(_vga->_showQ->remove(spr));
|
||||
if (s) {
|
||||
s->_z = spr->_z;
|
||||
_vga->_showQ->insert(_vga->_showQ->remove(s), spr);
|
||||
}
|
||||
_heart->_enable = en;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,11 +211,6 @@ Sprite *locate(int ref) {
|
||||
return (spr) ? spr : _vga->_spareQ->locate(ref);
|
||||
}
|
||||
|
||||
|
||||
Heart::Heart() {
|
||||
_enable = false;
|
||||
}
|
||||
|
||||
Sprite::Sprite(CGEEngine *vm, BMP_PTR *shpP)
|
||||
: _x(0), _y(0), _z(0), _nearPtr(0), _takePtr(0),
|
||||
_next(NULL), _prev(NULL), _seqPtr(NO_SEQ), _time(0), //Delay(0),
|
||||
@ -358,8 +353,6 @@ void Sprite::setName(char *n) {
|
||||
|
||||
Sprite *Sprite::expand() {
|
||||
if (!_ext) {
|
||||
bool enbl = _heart->_enable;
|
||||
_heart->_enable = false;
|
||||
_ext = new SprExt;
|
||||
assert(_ext != NULL);
|
||||
if (*_file) {
|
||||
@ -473,7 +466,6 @@ Sprite *Sprite::expand() {
|
||||
else
|
||||
_takePtr = NO_PTR;
|
||||
}
|
||||
_heart->_enable = enbl;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
@ -117,13 +117,6 @@ extern Seq _seq2[];
|
||||
#define VGAST1 (VGAST1_ & 0xFF)
|
||||
|
||||
|
||||
class Heart {
|
||||
public:
|
||||
Heart();
|
||||
bool _enable;
|
||||
};
|
||||
|
||||
|
||||
class SprExt {
|
||||
public:
|
||||
int _x0, _y0;
|
||||
|
Loading…
Reference in New Issue
Block a user