Skip to content

Commit

Permalink
FULLPIPE: Rename in ExCommand structure
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Sep 4, 2016
1 parent a3238fd commit 26f5500
Show file tree
Hide file tree
Showing 41 changed files with 248 additions and 248 deletions.
12 changes: 6 additions & 6 deletions engines/fullpipe/anihandler.cpp
Expand Up @@ -94,7 +94,7 @@ MessageQueue *AniHandler::makeQueue(StaticANIObject *ani, int staticsIndex, int
ex = new ExCommand(ani->_id, 1, _items[idx]->subItems[subidx]->movement->_id, 0, 0, 0, 1, 0, 0, 0);
}

ex->_keyCode = ani->_okeyCode;
ex->_param = ani->_okeyCode;
ex->_field_3C = 1;
ex->_field_24 = 1;

Expand Down Expand Up @@ -350,7 +350,7 @@ MessageQueue *AniHandler::makeRunQueue(MakeQueueStruct *mkQueue) {

ex2 = createCommand(s->movement, mkQueue->ani->_id, x1, y1, &x2, &y2, -1);
ex2->_parId = mq->_id;
ex2->_keyCode = mkQueue->ani->_okeyCode;
ex2->_param = mkQueue->ani->_okeyCode;

mq->addExCommandToEnd(ex2);

Expand All @@ -367,7 +367,7 @@ MessageQueue *AniHandler::makeRunQueue(MakeQueueStruct *mkQueue) {

ex2 = createCommand(mov, mkQueue->ani->_id, x1, y1, &x2, &y2, plen);
ex2->_parId = mq->_id;
ex2->_keyCode = mkQueue->ani->_okeyCode;
ex2->_param = mkQueue->ani->_okeyCode;

mq->addExCommandToEnd(ex2);
}
Expand All @@ -377,7 +377,7 @@ MessageQueue *AniHandler::makeRunQueue(MakeQueueStruct *mkQueue) {

ex2 = createCommand(s->movement, mkQueue->ani->_id, x1, y1, &x2, &y2, -1);
ex2->_parId = mq->_id;
ex2->_keyCode = mkQueue->ani->_okeyCode;
ex2->_param = mkQueue->ani->_okeyCode;

mq->addExCommandToEnd(ex2);

Expand All @@ -387,7 +387,7 @@ MessageQueue *AniHandler::makeRunQueue(MakeQueueStruct *mkQueue) {
ExCommand *ex = new ExCommand(mkQueue->ani->_id, 5, -1, mkQueue->x1, mkQueue->y1, 0, 1, 0, 0, 0);

ex->_field_14 = mkQueue->field_1C;
ex->_keyCode = mkQueue->ani->_okeyCode;
ex->_param = mkQueue->ani->_okeyCode;
ex->_field_24 = 0;
ex->_excFlags |= 3;

Expand Down Expand Up @@ -750,7 +750,7 @@ ExCommand2 *AniHandler::createCommand(Movement *mov, int objId, int x1, int y1,
ex->_messageNum = mov->_id;
ex->_field_14 = len;
ex->_field_24 = 1;
ex->_keyCode = -1;
ex->_param = -1;

for (uint i = 0; i < cnt; i++)
delete points[i];
Expand Down
2 changes: 1 addition & 1 deletion engines/fullpipe/behavior.cpp
Expand Up @@ -181,7 +181,7 @@ void BehaviorManager::updateStaticAniBehavior(StaticANIObject *ani, int delay, B
}

if (mq) {
mq->replaceKeyCode(-1, ani->_okeyCode);
mq->setParamInt(-1, ani->_okeyCode);
mq->chain(ani);
}
}
Expand Down
8 changes: 4 additions & 4 deletions engines/fullpipe/fullpipe.cpp
Expand Up @@ -347,7 +347,7 @@ void FullpipeEngine::updateEvents() {
}

ex = new ExCommand(0, 17, 36, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = 32;
ex->_param = 32;
ex->_excFlags |= 3;
ex->handle();
break;
Expand All @@ -359,7 +359,7 @@ void FullpipeEngine::updateEvents() {
}

ex = new ExCommand(0, 17, 36, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = event.kbd.keycode;
ex->_param = event.kbd.keycode;
ex->_excFlags |= 3;
ex->handle();
break;
Expand All @@ -373,7 +373,7 @@ void FullpipeEngine::updateEvents() {
getDebugger()->onFrame();
}
ex = new ExCommand(0, 17, 36, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = event.kbd.keycode;
ex->_param = event.kbd.keycode;
ex->_excFlags |= 3;
ex->handle();
break;
Expand Down Expand Up @@ -414,7 +414,7 @@ void FullpipeEngine::updateEvents() {

ex->_sceneClickX = _sceneRect.left + ex->_x;
ex->_sceneClickY = _sceneRect.top + ex->_y;
ex->_keyCode = getGameLoaderInventory()->getSelectedItemId();
ex->_param = getGameLoaderInventory()->getSelectedItemId();
ex->_excFlags |= 3;
_lastInputTicks = _updateTicks;
ex->handle();
Expand Down
2 changes: 1 addition & 1 deletion engines/fullpipe/gameloader.cpp
Expand Up @@ -398,7 +398,7 @@ bool GameLoader::preloadScene(int sceneId, int entranceId) {

ExCommand *ex = new ExCommand(_preloadItems[idx]->sceneId, 17, 62, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags = 2;
ex->_keyCode = _preloadItems[idx]->keyCode;
ex->_param = _preloadItems[idx]->keyCode;

_preloadSceneId = 0;
_preloadEntranceId = 0;
Expand Down
20 changes: 10 additions & 10 deletions engines/fullpipe/interaction.cpp
Expand Up @@ -189,7 +189,7 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject
ex = new ExCommand((subj ? subj->_id : 0), 55, 0, 0, 0, 0, 1, 0, 0, 0);
ex->_x = obj->_id;
ex->_y = obj->_okeyCode;
ex->_keyCode = subj ? subj->_okeyCode : 0;
ex->_param = subj ? subj->_okeyCode : 0;
ex->_excFlags = 3;
ex->_field_14 = (obj->_objtype != kObjTypePictureObject);
ex->_field_20 = invId;
Expand Down Expand Up @@ -258,30 +258,30 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject

if (!(inter->_flags & 0x10000)) {
ex = new ExCommand(obj->_id, 34, 0x80, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = obj->_okeyCode;
ex->_param = obj->_okeyCode;
ex->_field_14 = 0x100;
ex->_messageNum = 0;
ex->_excFlags = 3;
mq->addExCommandToEnd(ex);
}

ex = new ExCommand(obj->_id, 34, 0x100, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = obj->_okeyCode;
ex->_param = obj->_okeyCode;
ex->_field_14 = 0x100;
ex->_messageNum = 0;
ex->_excFlags = 3;
mq->addExCommandToEnd(ex);

ex = new ExCommand(subj->_id, 34, 0x100, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = subj->_okeyCode;
ex->_param = subj->_okeyCode;
ex->_field_14 = 0x100;
ex->_messageNum = 0;
ex->_excFlags = 3;
mq->addExCommandToEnd(ex);

ex = new ExCommand(subj->_id, 17, 0x40, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 3;
ex->_keyCode = 0;
ex->_param = 0;
mq->addExCommandToEnd(ex);

if (!mq->chain(subj)) {
Expand Down Expand Up @@ -320,7 +320,7 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject
ex = new ExCommand(subj->_id, 55, 0, 0, 0, 0, 1, 0, 0, 0);
ex->_x = obj->_id;
ex->_y = obj->_okeyCode;
ex->_keyCode = subj->_okeyCode;
ex->_param = subj->_okeyCode;
ex->_excFlags = 3;
ex->_field_20 = invId;
ex->_field_14 = (obj->_objtype != kObjTypePictureObject);
Expand All @@ -332,7 +332,7 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject
ex->_x = xpos;
ex->_y = ypos;
ex->_excFlags |= 3;
ex->_keyCode = 6;
ex->_param = 6;
ex->_field_14 = obj->_id;
ex->_field_20 = obj->_okeyCode;
ex->postMessage();
Expand Down Expand Up @@ -362,21 +362,21 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject
} else {
ex = new ExCommand(ani->_id, 34, 0x80, 0, 0, 0, 1, 0, 0, 0);
ex->_field_14 = 0x80;
ex->_keyCode = ani->_okeyCode;
ex->_param = ani->_okeyCode;
ex->_excFlags = 3;
mq->addExCommandToEnd(ex);
}
}
ex = new ExCommand(ani->_id, 34, 0x100, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = ani->_okeyCode;
ex->_param = ani->_okeyCode;
ex->_field_14 = 0x100;
ex->_excFlags = 3;
mq->addExCommandToEnd(ex);
} else {
ex = new ExCommand(subj->_id, 55, 0, 0, 0, 0, 1, 0, 0, 0);
ex->_x = ani->_id;
ex->_y = ani->_okeyCode;
ex->_keyCode = subj->_okeyCode;
ex->_param = subj->_okeyCode;
ex->_excFlags = 2;
ex->_field_14 = (obj->_objtype != kObjTypePictureObject);
ex->_field_20 = invId;
Expand Down
20 changes: 10 additions & 10 deletions engines/fullpipe/lift.cpp
Expand Up @@ -240,23 +240,23 @@ void FullpipeEngine::lift_exitSeq(ExCommand *cmd) {

if (!cmd) {
ex = new ExCommand(_aniMan->_id, 2, 40, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = _aniMan->_okeyCode;
ex->_param = _aniMan->_okeyCode;
ex->_excFlags |= 2;
mq->addExCommandToEnd(ex);
}

ex = new ExCommand(_lift->_id, 1, MV_LFT_OPEN, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = _lift->_okeyCode;
ex->_param = _lift->_okeyCode;
ex->_excFlags |= 2;
mq->addExCommandToEnd(ex);

ex = new ExCommand(_aniMan->_id, 1, MV_MAN_STARTD, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = _aniMan->_okeyCode;
ex->_param = _aniMan->_okeyCode;
ex->_excFlags |= 2;
mq->addExCommandToEnd(ex);

ex = new ExCommand(_aniMan->_id, 5, -1, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = _aniMan->_okeyCode;
ex->_param = _aniMan->_okeyCode;
ex->_field_14 = 10;
ex->_x = -1;
ex->_y = -1;
Expand All @@ -274,7 +274,7 @@ void FullpipeEngine::lift_exitSeq(ExCommand *cmd) {
mq->addExCommandToEnd(ex);

ex = new ExCommand(_lift->_id, 1, MV_LFT_CLOSE, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = _lift->_okeyCode;
ex->_param = _lift->_okeyCode;
ex->_excFlags |= 2;

mq->addExCommandToEnd(ex);
Expand Down Expand Up @@ -340,12 +340,12 @@ void FullpipeEngine::lift_walkAndGo() {
mq->setFlags(mq->getFlags() | 1);

ex = new ExCommand(_aniMan->_id, 2, 15, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = _aniMan->_okeyCode;
ex->_param = _aniMan->_okeyCode;
ex->_excFlags |= 2;
mq->addExCommand(ex);

ex = new ExCommand(_aniMan->_id, 5, -1, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = _aniMan->_okeyCode;
ex->_param = _aniMan->_okeyCode;
ex->_field_14 = _lift->_priority + 1;
ex->_x = -1;
ex->_y = -1;
Expand Down Expand Up @@ -410,15 +410,15 @@ void FullpipeEngine::lift_goAnimation() {

ExCommand *ex = new ExCommand(ANI_MAN, 1, (pre->keyCode != LiftDown ? MV_MAN_LIFTDOWN : MV_MAN_LIFTUP), 0, 0, 0, 1, 0, 0, 0);

ex->_keyCode = -1;
ex->_param = -1;
ex->_field_24 = 1;
ex->_excFlags |= 2;

mq->addExCommandToEnd(ex);

ex = new ExCommand(parentId, 17, 61, 0, 0, 0, 1, 0, 0, 0);

ex->_keyCode = buttonId;
ex->_param = buttonId;
ex->_excFlags |= 3;

mq->addExCommandToEnd(ex);
Expand Down Expand Up @@ -488,7 +488,7 @@ void FullpipeEngine::lift_startExitQueue() {

void FullpipeEngine::lift_hoverButton(ExCommand *cmd) {
if (_lastLiftButton) {
if (!(cmd->_keyCode & 2) || _liftX != cmd->_x || _liftY != cmd->_y) {
if (!(cmd->_param & 2) || _liftX != cmd->_x || _liftY != cmd->_y) {
_lastLiftButton->_statics = _lastLiftButton->getStaticsById(lift_getButtonIdN(_lastLiftButton->_statics->_staticsId));
_lastLiftButton = 0;
}
Expand Down

0 comments on commit 26f5500

Please sign in to comment.