mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 02:10:28 +00:00
GNAP: Clean up scene 39
This commit is contained in:
parent
4752703298
commit
9bac81c802
@ -158,14 +158,14 @@ Common::Error GnapEngine::run() {
|
||||
//testBack->fillRect(Common::Rect(0, 0, 800, 600), 0xFFFFFFFF);
|
||||
testBack->fillRect(Common::Rect(0, 0, 800, 600), 0xFF000000);
|
||||
|
||||
_currentSceneNum = 31;
|
||||
_currentSceneNum = 39;
|
||||
|
||||
Common::String datFilename = Common::String::format("%s_n.dat", kSceneNames[_currentSceneNum]);
|
||||
_dat->open(0, datFilename.c_str());
|
||||
|
||||
_gameSys->setBackgroundSurface(testBack, 0, 500, 1, 1000);
|
||||
|
||||
_gameSys->insertSequence(0xfe, 100, -1, -1, 0, 0, 0, 0);
|
||||
_gameSys->insertSequence(0x33, 100, -1, -1, 0, 0, 0, 0);
|
||||
|
||||
CursorMan.showMouse(true);
|
||||
|
||||
@ -751,7 +751,7 @@ void GnapEngine::mainLoop() {
|
||||
|
||||
// > DEBUG BEGIN
|
||||
_currentSceneNum = 53;
|
||||
_newSceneNum = 38;
|
||||
_newSceneNum = 39;
|
||||
_newCursorValue = 3;
|
||||
// < DEBUG END
|
||||
|
||||
|
@ -830,8 +830,7 @@ public:
|
||||
void scene38_updateAnimations();
|
||||
|
||||
// Scene 39
|
||||
int _s39_dword_47EAF8;
|
||||
int _s39_dword_47EAFC;
|
||||
int _s39_currGuySequenceId, _s39_nextGuySequenceId;
|
||||
int scene39_init();
|
||||
void scene39_updateHotspots();
|
||||
void scene39_run();
|
||||
|
@ -36,6 +36,10 @@ enum {
|
||||
kHSWalkArea2 = 6
|
||||
};
|
||||
|
||||
enum {
|
||||
kASLeaveScene = 0
|
||||
};
|
||||
|
||||
int GnapEngine::scene39_init() {
|
||||
_gameSys->setAnimation(0, 0, 0);
|
||||
_gameSys->setAnimation(0, 0, 1);
|
||||
@ -54,15 +58,17 @@ void GnapEngine::scene39_updateHotspots() {
|
||||
}
|
||||
|
||||
void GnapEngine::scene39_run() {
|
||||
|
||||
_timers[5] = 0; // Bug in the original? Timer was never intiailized.
|
||||
|
||||
queueInsertDeviceIcon();
|
||||
_s39_dword_47EAF8 = 0x33;
|
||||
_s39_currGuySequenceId = 0x33;
|
||||
|
||||
_gameSys->setAnimation(0x33, 21, 3);
|
||||
_gameSys->insertSequence(_s39_dword_47EAF8, 21, 0, 0, kSeqNone, 0, 0, 0);
|
||||
_gameSys->insertSequence(_s39_currGuySequenceId, 21, 0, 0, kSeqNone, 0, 0, 0);
|
||||
_gameSys->insertSequence(0x34, 21, 0, 0, kSeqLoop, 0, 0, 0);
|
||||
|
||||
_s39_dword_47EAFC = -1;
|
||||
_s39_nextGuySequenceId = -1;
|
||||
if (_prevSceneNum == 38) {
|
||||
initGnapPos(3, 7, 7);
|
||||
initBeaverPos(2, 7, 5);
|
||||
@ -79,7 +85,7 @@ void GnapEngine::scene39_run() {
|
||||
playSound(0x1094B, 1);
|
||||
setSoundVolume(0x1094B, 60);
|
||||
}
|
||||
|
||||
|
||||
updateMouseCursor();
|
||||
updateCursorByHotspot();
|
||||
|
||||
@ -122,10 +128,10 @@ void GnapEngine::scene39_run() {
|
||||
|
||||
case kHSExitUfoParty:
|
||||
if (_gnapActionStatus < 0) {
|
||||
_isLeavingScene = 1;
|
||||
_isLeavingScene = true;
|
||||
_sceneDone = true;
|
||||
gnapWalkTo(_gnapX, _gnapY, 0, 0x107AB, 1);
|
||||
_gnapActionStatus = 0;
|
||||
_gnapActionStatus = kASLeaveScene;
|
||||
_newSceneNum = 40;
|
||||
}
|
||||
break;
|
||||
@ -154,7 +160,7 @@ void GnapEngine::scene39_run() {
|
||||
case kHSExitInsideHouse:
|
||||
if (_gnapActionStatus < 0) {
|
||||
_sceneDone = true;
|
||||
_isLeavingScene = 1;
|
||||
_isLeavingScene = true;
|
||||
_newSceneNum = 38;
|
||||
}
|
||||
break;
|
||||
@ -185,16 +191,16 @@ void GnapEngine::scene39_run() {
|
||||
_timers[5] = getRandom(20) + 50;
|
||||
switch (getRandom(4)) {
|
||||
case 0:
|
||||
_s39_dword_47EAFC = 0x30;
|
||||
_s39_nextGuySequenceId = 0x30;
|
||||
break;
|
||||
case 1:
|
||||
_s39_dword_47EAFC = 0x31;
|
||||
_s39_nextGuySequenceId = 0x31;
|
||||
break;
|
||||
case 2:
|
||||
_s39_dword_47EAFC = 0x32;
|
||||
_s39_nextGuySequenceId = 0x32;
|
||||
break;
|
||||
case 3:
|
||||
_s39_dword_47EAFC = 0x33;
|
||||
_s39_nextGuySequenceId = 0x33;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -219,17 +225,17 @@ void GnapEngine::scene39_updateAnimations() {
|
||||
|
||||
if (_gameSys->getAnimationStatus(0) == 2) {
|
||||
_gameSys->setAnimation(0, 0, 0);
|
||||
if (_gnapActionStatus == 0)
|
||||
if (_gnapActionStatus == kASLeaveScene)
|
||||
_sceneDone = true;
|
||||
else
|
||||
_gnapActionStatus = -1;
|
||||
}
|
||||
|
||||
if (_gameSys->getAnimationStatus(3) == 2 && _s39_dword_47EAFC != -1) {
|
||||
_gameSys->setAnimation(_s39_dword_47EAFC, 21, 3);
|
||||
_gameSys->insertSequence(_s39_dword_47EAFC, 21, _s39_dword_47EAF8, 21, kSeqSyncWait, 0, 0, 0);
|
||||
_s39_dword_47EAF8 = _s39_dword_47EAFC;
|
||||
_s39_dword_47EAFC = -1;
|
||||
if (_gameSys->getAnimationStatus(3) == 2 && _s39_nextGuySequenceId != -1) {
|
||||
_gameSys->setAnimation(_s39_nextGuySequenceId, 21, 3);
|
||||
_gameSys->insertSequence(_s39_nextGuySequenceId, 21, _s39_currGuySequenceId, 21, kSeqSyncWait, 0, 0, 0);
|
||||
_s39_currGuySequenceId = _s39_nextGuySequenceId;
|
||||
_s39_nextGuySequenceId = -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user