aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
authorPaul Gilbert2014-04-15 23:51:41 -0400
committerPaul Gilbert2014-04-15 23:51:41 -0400
commit0b340a034330fd5124b1534544a8ef9500349411 (patch)
tree8d4bf80422ef360a78ecc41d8fc4aa088b449bc6 /engines/mads
parentdea63c9fe8b64c30464119ffbfbc3491e6f158cc (diff)
downloadscummvm-rg350-0b340a034330fd5124b1534544a8ef9500349411.tar.gz
scummvm-rg350-0b340a034330fd5124b1534544a8ef9500349411.tar.bz2
scummvm-rg350-0b340a034330fd5124b1534544a8ef9500349411.zip
MADS: Fix depth issues with sitting in chair in scene 101
Diffstat (limited to 'engines/mads')
-rw-r--r--engines/mads/action.h6
-rw-r--r--engines/mads/animation.cpp2
-rw-r--r--engines/mads/game.cpp6
-rw-r--r--engines/mads/messages.cpp2
-rw-r--r--engines/mads/msurface.cpp2
-rw-r--r--engines/mads/nebular/nebular_scenes1.cpp6
-rw-r--r--engines/mads/nebular/nebular_scenes2.cpp8
-rw-r--r--engines/mads/scene.cpp16
-rw-r--r--engines/mads/scene_data.cpp2
-rw-r--r--engines/mads/sequence.cpp20
-rw-r--r--engines/mads/sequence.h2
11 files changed, 36 insertions, 36 deletions
diff --git a/engines/mads/action.h b/engines/mads/action.h
index 6b3f1ca3c2..599fb0e4f9 100644
--- a/engines/mads/action.h
+++ b/engines/mads/action.h
@@ -29,9 +29,9 @@
namespace MADS {
enum TriggerMode {
- KERNEL_TRIGGER_PARSER = 0, // Triggers parser
- KERNEL_TRIGGER_DAEMON = 1, // Triggers step/daemon code
- KERNEL_TRIGGER_PREPARE = 2 // Triggers preparser
+ SEQUENCE_TRIGGER_PARSER = 0, // Triggers parser
+ SEQUENCE_TRIGGER_DAEMON = 1, // Triggers step/daemon code
+ SEQUENCE_TRIGGER_PREPARE = 2 // Triggers preparser
};
enum InterAwaiting {
diff --git a/engines/mads/animation.cpp b/engines/mads/animation.cpp
index 06eeaf8278..93cc72f613 100644
--- a/engines/mads/animation.cpp
+++ b/engines/mads/animation.cpp
@@ -590,7 +590,7 @@ void Animation::update() {
_vm->_game->_trigger = _trigger;
_vm->_game->_triggerMode = _triggerMode;
- if (_triggerMode != KERNEL_TRIGGER_DAEMON) {
+ if (_triggerMode != SEQUENCE_TRIGGER_DAEMON) {
// Copy the noun list
scene._action._action = _actionDetails;
}
diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp
index a6650555ce..bf3822da09 100644
--- a/engines/mads/game.cpp
+++ b/engines/mads/game.cpp
@@ -57,8 +57,8 @@ Game::Game(MADSEngine *vm): _vm(vm), _surface(nullptr), _objects(vm),
_aaName = "*I0.AA";
_priorFrameTimer = 0;
_anyEmergency = false;
- _triggerMode = KERNEL_TRIGGER_PARSER;
- _triggerSetupMode = KERNEL_TRIGGER_DAEMON;
+ _triggerMode = SEQUENCE_TRIGGER_PARSER;
+ _triggerSetupMode = SEQUENCE_TRIGGER_DAEMON;
_winStatus = 0;
_widepipeCtr = 0;
@@ -238,7 +238,7 @@ void Game::sectionLoop() {
_priorFrameTimer = _scene._frameStartTime;
// Call the scene logic for entering the given scene
- _triggerSetupMode = KERNEL_TRIGGER_DAEMON;
+ _triggerSetupMode = SEQUENCE_TRIGGER_DAEMON;
_scene._sceneLogic->enter();
// Set player data
diff --git a/engines/mads/messages.cpp b/engines/mads/messages.cpp
index 3903b71766..46b05c1413 100644
--- a/engines/mads/messages.cpp
+++ b/engines/mads/messages.cpp
@@ -179,7 +179,7 @@ void KernelMessages::processText(int msgIndex) {
_vm->_game->_trigger = msg._trigger;
_vm->_game->_triggerMode = msg._abortMode;
- if (_vm->_game->_triggerMode != KERNEL_TRIGGER_DAEMON) {
+ if (_vm->_game->_triggerMode != SEQUENCE_TRIGGER_DAEMON) {
scene._action._activeAction = msg._actionDetails;
}
}
diff --git a/engines/mads/msurface.cpp b/engines/mads/msurface.cpp
index 8f40173f13..2c9d093877 100644
--- a/engines/mads/msurface.cpp
+++ b/engines/mads/msurface.cpp
@@ -516,7 +516,7 @@ int DepthSurface::getDepth(const Common::Point &pt) {
return v >> bits;
} else {
if (pt.x < 0 || pt.y < 0 || pt.x >= this->w || pt.y >= this->h)
- return 8;
+ return 0;
return *getBasePtr(pt.x, pt.y) & 0xF;
}
diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp
index ec81b5f356..bb5229ef16 100644
--- a/engines/mads/nebular/nebular_scenes1.cpp
+++ b/engines/mads/nebular/nebular_scenes1.cpp
@@ -106,7 +106,7 @@ void Scene101::setup() {
}
void Scene101::sayDang() {
- _game._triggerSetupMode = KERNEL_TRIGGER_DAEMON;
+ _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON;
_game._player._stepEnabled = false;
switch (_game._trigger) {
@@ -608,7 +608,7 @@ void Scene102::setup() {
void Scene102::addRandomMessage() {
_scene->_kernelMessages.reset();
- _game._triggerSetupMode = KERNEL_TRIGGER_DAEMON;
+ _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON;
int quoteId = _vm->getRandomNumber(65, 69);
_scene->_kernelMessages.add(Common::Point(0, 0), 0x1110, 34, 73, 120, _game.getQuote(quoteId));
_activeMsgFl = true;
@@ -838,7 +838,7 @@ void Scene102::actions() {
Common::String curQuote = _game.getQuote(quoteId);
int width = _vm->_font->getWidth(curQuote, -1);
_scene->_kernelMessages.reset();
- _game._triggerSetupMode = KERNEL_TRIGGER_DAEMON;
+ _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON;
_scene->_kernelMessages.add(Common::Point(210, 60), 0x1110, 0, 73, 120, curQuote);
_scene->_kernelMessages.add(Common::Point(214 + width, 60), 0x1110, 0, 73, 120, _game.getQuote(64));
_activeMsgFl = true;
diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp
index 36f291973b..96f6c6d400 100644
--- a/engines/mads/nebular/nebular_scenes2.cpp
+++ b/engines/mads/nebular/nebular_scenes2.cpp
@@ -455,7 +455,7 @@ void Scene202::enter() {
void Scene202::setRandomKernelMessage() {
int vocabId = _vm->getRandomNumber(92, 96);
_scene->_kernelMessages.reset();
- _game._triggerSetupMode = KERNEL_TRIGGER_DAEMON;
+ _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON;
_scene->_kernelMessages.add(Common::Point(0, 0), 0x1110, 34, 70, 120, _game.getQuote(vocabId));
_activeMsgFl = true;
}
@@ -491,7 +491,7 @@ void Scene202::step() {
_action._activeAction._verbId = VERB_LOOK;
_action._activeAction._objectNameId = 39;
_action._activeAction._indirectObjectId = 438;
- _game._triggerSetupMode = KERNEL_TRIGGER_PARSER;
+ _game._triggerSetupMode = SEQUENCE_TRIGGER_PARSER;
_scene->_sequences.addTimer(120, 2);
_globals._abortVal = -1;
} else if (_globals[kMeteorologistWatch] == 2) {
@@ -3087,7 +3087,7 @@ void Scene209::actions() {
if ((_action.isAction(NOUN_SHOOT) || _action.isAction(NOUN_HOSE_DOWN)) && _action.isAction(NOUN_MONKEY)
&& _action.isAction(NOUN_BLOWGUN) && _game._objects.isInInventory(OBJ_BLOWGUN) && _game._objects.isInInventory(OBJ_POISON_DARTS)) {
if (_action.isAction(NOUN_SHOOT, NOUN_BLOWGUN, NOUN_MONKEY) && !_startShootingInTimerFl) {
- _game._triggerSetupMode = KERNEL_TRIGGER_DAEMON;
+ _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON;
_scene->_sequences.addTimer(1, 231);
_startShootingInTimerFl = true;
_game._player._stepEnabled = false;
@@ -3097,7 +3097,7 @@ void Scene209::actions() {
}
if (_action.isAction(NOUN_HOSE_DOWN, NOUN_BLOWGUN, NOUN_MONKEY) && !_startShootingInTimerFl) {
- _game._triggerSetupMode = KERNEL_TRIGGER_DAEMON;
+ _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON;
_scene->_sequences.addTimer(1, 228);
_game._player._stepEnabled = false;
_fallFl = true;
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index a112228859..948688e7a2 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -313,7 +313,7 @@ void Scene::doFrame() {
flag = true;
}
- if (flag || (_vm->_game->_trigger && _vm->_game->_triggerMode == KERNEL_TRIGGER_PREPARE)) {
+ if (flag || (_vm->_game->_trigger && _vm->_game->_triggerMode == SEQUENCE_TRIGGER_PREPARE)) {
doPreactions();
}
@@ -324,7 +324,7 @@ void Scene::doFrame() {
// Handle parser actions as well as game triggers
if ((_action._inProgress && !player._moving && !player._needToWalk &&
(player._facing == player._turnToFacing) && !_vm->_game->_trigger) ||
- (_vm->_game->_trigger && (_vm->_game->_triggerMode == KERNEL_TRIGGER_PARSER))) {
+ (_vm->_game->_trigger && (_vm->_game->_triggerMode == SEQUENCE_TRIGGER_PARSER))) {
doAction();
}
@@ -442,11 +442,11 @@ void Scene::drawElements(ScreenTransition transitionType, bool surfaceFlag) {
void Scene::doPreactions() {
if (_vm->_game->_screenObjects._inputMode == kInputBuildingSentences ||
_vm->_game->_screenObjects._inputMode == kInputLimitedSentences) {
- _vm->_game->_triggerSetupMode = KERNEL_TRIGGER_PREPARE;
+ _vm->_game->_triggerSetupMode = SEQUENCE_TRIGGER_PREPARE;
_action.checkAction();
_sceneLogic->preActions();
- if (_vm->_game->_triggerMode == KERNEL_TRIGGER_PREPARE)
+ if (_vm->_game->_triggerMode == SEQUENCE_TRIGGER_PREPARE)
_vm->_game->_trigger = 0;
}
}
@@ -454,7 +454,7 @@ void Scene::doPreactions() {
void Scene::doAction() {
bool flag = false;
- _vm->_game->_triggerSetupMode = KERNEL_TRIGGER_PARSER;
+ _vm->_game->_triggerSetupMode = SEQUENCE_TRIGGER_PARSER;
if ((_action._inProgress || _vm->_game->_trigger) && !_action._savedFields._commandError) {
_sceneLogic->actions();
flag = !_action._inProgress;
@@ -491,17 +491,17 @@ void Scene::doAction() {
}
_action._inProgress = false;
- if (_vm->_game->_triggerMode == KERNEL_TRIGGER_PARSER)
+ if (_vm->_game->_triggerMode == SEQUENCE_TRIGGER_PARSER)
_vm->_game->_trigger = 0;
}
void Scene::doSceneStep() {
- _vm->_game->_triggerSetupMode = KERNEL_TRIGGER_DAEMON;
+ _vm->_game->_triggerSetupMode = SEQUENCE_TRIGGER_DAEMON;
_sceneLogic->step();
_vm->_game->_sectionHandler->step();
_vm->_game->step();
- if (_vm->_game->_triggerMode == KERNEL_TRIGGER_DAEMON)
+ if (_vm->_game->_triggerMode == SEQUENCE_TRIGGER_DAEMON)
_vm->_game->_trigger = 0;
}
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp
index a82f65a6f0..6eb6be2c1e 100644
--- a/engines/mads/scene_data.cpp
+++ b/engines/mads/scene_data.cpp
@@ -41,7 +41,7 @@ KernelMessage::KernelMessage() {
_frameTimer = 0;
_timeout = 0;
_trigger = 0;
- _abortMode = KERNEL_TRIGGER_PARSER;
+ _abortMode = SEQUENCE_TRIGGER_PARSER;
_actionDetails._verbId = VERB_NONE;
_actionDetails._objectNameId = 0;
_actionDetails._indirectObjectId = 0;
diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp
index 601d07d478..3c2bab5329 100644
--- a/engines/mads/sequence.cpp
+++ b/engines/mads/sequence.cpp
@@ -47,13 +47,13 @@ SequenceEntry::SequenceEntry() {
_field22 = 0;
_triggerCountdown = 0;
_doneFlag = 0;
- _triggerMode = KERNEL_TRIGGER_DAEMON;
+ _triggerMode = SEQUENCE_TRIGGER_DAEMON;
_numTicks = 0;
_extraTicks = 0;
_timeout = 0;
_entries._count = 0;
- Common::fill(&_entries._mode[0], &_entries._mode[SEQUENCE_ENTRY_SUBSET_MAX], KERNEL_TRIGGER_EXPIRE);
+ Common::fill(&_entries._mode[0], &_entries._mode[SEQUENCE_ENTRY_SUBSET_MAX], SEQUENCE_TRIGGER_EXPIRE);
Common::fill(&_entries._frameIndex[0], &_entries._frameIndex[SEQUENCE_ENTRY_SUBSET_MAX], 0);
Common::fill(&_entries._trigger[0], &_entries._trigger[SEQUENCE_ENTRY_SUBSET_MAX], 0);
}
@@ -93,7 +93,7 @@ bool SequenceList::addSubEntry(int index, SequenceTrigger mode, int frameIndex,
}
int SequenceList::add(int spriteListIndex, bool flipped, int frameIndex, int triggerCountdown, int delayTicks, int extraTicks, int numTicks,
- int msgX, int msgY, bool nonFixed, char scale, uint8 depth, int frameInc, SpriteAnimType animType, int numSprites,
+ int msgX, int msgY, bool nonFixed, int scale, int depth, int frameInc, SpriteAnimType animType, int numSprites,
int frameStart) {
Scene &scene = _vm->_game->_scene;
@@ -162,7 +162,7 @@ int SequenceList::addTimer(int time, int abortVal) {
se._entries._count = 0;
se._triggerMode = _vm->_game->_triggerSetupMode;
se._actionNouns = _vm->_game->_scene._action._activeAction;
- addSubEntry(seqIndex, KERNEL_TRIGGER_EXPIRE, 0, abortVal);
+ addSubEntry(seqIndex, SEQUENCE_TRIGGER_EXPIRE, 0, abortVal);
return seqIndex;
}
@@ -305,14 +305,14 @@ bool SequenceList::loadSprites(int seqIndex) {
for (int i = 0; i < seqEntry._entries._count; ++i) {
switch (seqEntry._entries._mode[i]) {
- case KERNEL_TRIGGER_EXPIRE:
- case KERNEL_TRIGGER_LOOP:
- if (((seqEntry._entries._mode[i] == KERNEL_TRIGGER_EXPIRE) && seqEntry._doneFlag) ||
- ((seqEntry._entries._mode[i] == KERNEL_TRIGGER_LOOP) && result))
+ case SEQUENCE_TRIGGER_EXPIRE:
+ case SEQUENCE_TRIGGER_LOOP:
+ if (((seqEntry._entries._mode[i] == SEQUENCE_TRIGGER_EXPIRE) && seqEntry._doneFlag) ||
+ ((seqEntry._entries._mode[i] == SEQUENCE_TRIGGER_LOOP) && result))
idx = i;
break;
- case KERNEL_TRIGGER_SPRITE: {
+ case SEQUENCE_TRIGGER_SPRITE: {
int v = seqEntry._entries._frameIndex[i];
if ((v == seqEntry._frameIndex) || (v == 0))
idx = i;
@@ -328,7 +328,7 @@ bool SequenceList::loadSprites(int seqIndex) {
_vm->_game->_trigger = seqEntry._entries._trigger[idx];
_vm->_game->_triggerMode = seqEntry._triggerMode;
- if (seqEntry._triggerMode != KERNEL_TRIGGER_DAEMON)
+ if (seqEntry._triggerMode != SEQUENCE_TRIGGER_DAEMON)
scene._action._activeAction = seqEntry._actionNouns;
}
diff --git a/engines/mads/sequence.h b/engines/mads/sequence.h
index 53a8afe071..6d59175ba2 100644
--- a/engines/mads/sequence.h
+++ b/engines/mads/sequence.h
@@ -101,7 +101,7 @@ public:
void clear();
bool addSubEntry(int index, SequenceTrigger mode, int frameIndex, int trigger);
int add(int spriteListIndex, bool flipped, int frameIndex, int triggerCountdown, int delayTicks,
- int extraTicks, int numTicks, int msgX, int msgY, bool nonFixed, char scale, uint8 depth,
+ int extraTicks, int numTicks, int msgX, int msgY, bool nonFixed, int scale, int depth,
int frameInc, SpriteAnimType animType, int numSprites, int frameStart);
int addTimer(int time, int abortVal);