Permalink
Browse files

FULLPIPE: Renames in ExCommand

  • Loading branch information...
sev- committed Dec 3, 2017
1 parent 26747d0 commit 20fb25d58a732a7d6b750595cd7f4d310f5d0b2e
@@ -394,7 +394,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->_z = mkQueue->field_1C;
ex->_param = mkQueue->ani->_odelay;
ex->_field_24 = 0;
ex->_excFlags |= 3;
@@ -741,7 +741,7 @@ ExCommand2 *AniHandler::createCommand(Movement *mov, int objId, int x1, int y1,
ExCommand2 *ex = new ExCommand2(20, objId, points);
ex->_excFlags = 2;
ex->_messageNum = mov->_id;
ex->_field_14 = len;
ex->_z = len;
ex->_field_24 = 1;
ex->_param = -1;
@@ -226,7 +226,7 @@ bool GameLoader::gotoScene(int sceneId, int entranceId) {
ExCommand *ex = new ExCommand(stobj->_id, 34, 256, 0, 0, 0, 1, 0, 0, 0);
ex->_field_14 = 256;
ex->_z = 256;
ex->_messageNum = 0;
ex->_excFlags |= 3;
@@ -188,7 +188,7 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject
ex->_y = obj->_odelay;
ex->_param = subj ? subj->_odelay : 0;
ex->_excFlags = 3;
ex->_field_14 = (obj->_objtype != kObjTypePictureObject);
ex->_z = (obj->_objtype != kObjTypePictureObject);
ex->_field_20 = invId;
mq->addExCommandToEnd(ex);
@@ -261,22 +261,22 @@ 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->_param = obj->_odelay;
ex->_field_14 = 0x80;
ex->_z = 0x80;
ex->_messageNum = 0;
ex->_excFlags = 3;
mq->addExCommandToEnd(ex);
}
ex = new ExCommand(obj->_id, 34, 0x100, 0, 0, 0, 1, 0, 0, 0);
ex->_param = obj->_odelay;
ex->_field_14 = 0x100;
ex->_z = 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->_param = subj->_odelay;
ex->_field_14 = 0x100;
ex->_z = 0x100;
ex->_messageNum = 0;
ex->_excFlags = 3;
mq->addExCommandToEnd(ex);
@@ -325,7 +325,7 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject
ex->_param = subj->_odelay;
ex->_excFlags = 3;
ex->_field_20 = invId;
ex->_field_14 = (obj->_objtype != kObjTypePictureObject);
ex->_z = (obj->_objtype != kObjTypePictureObject);
mq->addExCommandToEnd(ex);
someFlag = true;
@@ -335,7 +335,7 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject
ex->_y = ypos;
ex->_excFlags |= 3;
ex->_param = 6;
ex->_field_14 = obj->_id;
ex->_z = obj->_id;
ex->_field_20 = obj->_odelay;
ex->postMessage();
}
@@ -366,15 +366,15 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject
ani->_flags |= 0x80u;
} else {
ex = new ExCommand(ani->_id, 34, 0x80, 0, 0, 0, 1, 0, 0, 0);
ex->_field_14 = 0x80;
ex->_z = 0x80;
ex->_param = ani->_odelay;
ex->_excFlags = 3;
mq->addExCommandToEnd(ex);
}
}
ex = new ExCommand(ani->_id, 34, 0x100, 0, 0, 0, 1, 0, 0, 0);
ex->_param = ani->_odelay;
ex->_field_14 = 0x100;
ex->_z = 0x100;
ex->_excFlags = 3;
mq->addExCommandToEnd(ex);
} else {
@@ -383,7 +383,7 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject
ex->_y = ani->_odelay;
ex->_param = subj->_odelay;
ex->_excFlags = 2;
ex->_field_14 = (obj->_objtype != kObjTypePictureObject);
ex->_z = (obj->_objtype != kObjTypePictureObject);
ex->_field_20 = invId;
mq->addExCommandToEnd(ex);
@@ -361,7 +361,7 @@ void Inventory2::slideIn() {
ExCommand *ex = new ExCommand(0, 17, 65, 0, 0, 0, 1, 0, 0, 0);
ex->_field_2C = 10;
ex->_field_14 = _isInventoryOut;
ex->_z = _isInventoryOut;
ex->_field_20 = !_isInventoryOut;
ex->_excFlags |= 3;
ex->postMessage();
@@ -373,7 +373,7 @@ void Inventory2::slideOut() {
ExCommand *ex = new ExCommand(0, 17, 65, 0, 0, 0, 1, 0, 0, 0);
ex->_field_2C = 10;
ex->_field_14 = _isInventoryOut;
ex->_z = _isInventoryOut;
ex->_field_20 = !_isInventoryOut;
ex->_excFlags |= 3;
ex->postMessage();
@@ -396,7 +396,7 @@ bool Inventory2::handleLeftClick(ExCommand *cmd) {
if (getItemFlags(icon.inventoryItemId) & 1) {
ExCommand *ex = new ExCommand(0, 17, 65, 0, 0, 0, 1, 0, 0, 0);
ex->_field_2C = 11;
ex->_field_14 = _inventoryIcons[i].inventoryItemId;
ex->_z = _inventoryIcons[i].inventoryItemId;
ex->_excFlags |= 3;
ex->postMessage();
}
View
@@ -233,7 +233,7 @@ void FullpipeEngine::lift_exitSeq(ExCommand *cmd) {
ExCommand *ex = new ExCommand(_aniMan->_id, 34, 256, 0, 0, 0, 1, 0, 0, 0);
ex->_field_14 = 256;
ex->_z = 256;
ex->_messageNum = 256;
ex->_excFlags |= 3;
mq->addExCommandToEnd(ex);
@@ -257,15 +257,15 @@ void FullpipeEngine::lift_exitSeq(ExCommand *cmd) {
ex = new ExCommand(_aniMan->_id, 5, -1, 0, 0, 0, 1, 0, 0, 0);
ex->_param = _aniMan->_odelay;
ex->_field_14 = 10;
ex->_z = 10;
ex->_x = -1;
ex->_y = -1;
ex->_excFlags |= 3;
mq->addExCommandToEnd(ex);
ex = new ExCommand(_aniMan->_id, 34, 256, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 3;
ex->_field_14 = 256;
ex->_z = 256;
ex->_messageNum = 0;
mq->addExCommandToEnd(ex);
@@ -346,7 +346,7 @@ void FullpipeEngine::lift_walkAndGo() {
ex = new ExCommand(_aniMan->_id, 5, -1, 0, 0, 0, 1, 0, 0, 0);
ex->_param = _aniMan->_odelay;
ex->_field_14 = _lift->_priority + 1;
ex->_z = _lift->_priority + 1;
ex->_x = -1;
ex->_y = -1;
ex->_excFlags |= 3;
@@ -465,7 +465,7 @@ void FullpipeEngine::lift_animateButton(StaticANIObject *button) {
ExCommand *ex = new ExCommand(0, 35, SND_CMN_032, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 3;
ex->_field_14 = 1;
ex->_z = 1;
ex->postMessage();
int id = lift_getButtonIdH(_lastLiftButton->_statics->_staticsId);
@@ -250,7 +250,7 @@ int global_messageHandler1(ExCommand *cmd) {
g_fp->setCursor(g_fp->_cursorId);
break;
case 65: // open map
if (cmd->_field_2C == 11 && cmd->_field_14 == ANI_INV_MAP && g_fp->_flgCanOpenMap)
if (cmd->_field_2C == 11 && cmd->_z == ANI_INV_MAP && g_fp->_flgCanOpenMap)
g_fp->openMap();
break;
default:
@@ -263,7 +263,7 @@ int global_messageHandler1(ExCommand *cmd) {
ExCommand *newex = new ExCommand(0, 35, SND_CMN_031, 0, 0, 0, 1, 0, 0, 0);
newex->_field_14 = 1;
newex->_z = 1;
newex->_excFlags |= 3;
newex->postMessage();
@@ -291,19 +291,19 @@ int global_messageHandler2(ExCommand *cmd) {
switch (cmd->_messageNum) {
case 0x44c8:
error("0x44c8");
// Unk3_sub_4477A0(&unk3, _parentId, _field_14 != 0);
// Unk3_sub_4477A0(&unk3, _parentId, _z != 0);
break;
case 28:
ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_param);
if (ani)
ani->_priority = cmd->_field_14;
ani->_priority = cmd->_z;
break;
case 25:
ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_param);
if (ani) {
if (cmd->_field_14) {
if (cmd->_z) {
ani->setFlags40(true);
ani->_callback2 = staticANIObjectCallback;
} else {
@@ -379,7 +379,7 @@ int global_messageHandler3(ExCommand *cmd) {
return g_fp->_gameLoader->gotoScene(cmd->_parentId, cmd->_param);
case 64:
if (g_fp->_currentScene && g_fp->_msgObjectId2
&& (!(cmd->_param & 4) || g_fp->_msgObjectId2 != cmd->_field_14 || g_fp->_msgId != cmd->_field_20)) {
&& (!(cmd->_param & 4) || g_fp->_msgObjectId2 != cmd->_z || g_fp->_msgId != cmd->_field_20)) {
ani = g_fp->_currentScene->getStaticANIObject1ById(g_fp->_msgObjectId2, g_fp->_msgId);
if (ani) {
ani->_flags &= 0xFF7F;
@@ -396,7 +396,7 @@ int global_messageHandler3(ExCommand *cmd) {
g_fp->_msgY = cmd->_y;
}
if (cmd->_param & 4) {
g_fp->_msgObjectId2 = cmd->_field_14;
g_fp->_msgObjectId2 = cmd->_z;
g_fp->_msgId = cmd->_field_20;
}
return result;
@@ -479,13 +479,13 @@ int global_messageHandler3(ExCommand *cmd) {
case 57:
if (cmd->_field_2C) {
if (!cmd->_field_20) {
getGameLoaderInventory()->removeItem2(g_fp->_currentScene, cmd->_parentId, cmd->_x, cmd->_y, cmd->_field_14);
getGameLoaderInventory()->removeItem2(g_fp->_currentScene, cmd->_parentId, cmd->_x, cmd->_y, cmd->_z);
getGameLoaderInventory()->rebuildItemRects();
return 1;
}
ani = g_fp->_currentScene->getStaticANIObject1ById(g_fp->_gameLoader->_field_FA, -1);
if (ani) {
getGameLoaderInventory()->removeItem2(g_fp->_currentScene, cmd->_parentId, ani->_ox + cmd->_x, ani->_oy + cmd->_y, ani->_priority + cmd->_field_14);
getGameLoaderInventory()->removeItem2(g_fp->_currentScene, cmd->_parentId, ani->_ox + cmd->_x, ani->_oy + cmd->_y, ani->_priority + cmd->_z);
getGameLoaderInventory()->rebuildItemRects();
return 1;
}
@@ -497,7 +497,7 @@ int global_messageHandler3(ExCommand *cmd) {
case 55:
if (g_fp->_currentScene) {
GameObject *obj;
if (cmd->_field_14)
if (cmd->_z)
obj = g_fp->_currentScene->getStaticANIObject1ById(cmd->_x, cmd->_y);
else
obj = g_fp->_currentScene->getPictureObjectById(cmd->_x, cmd->_y);
@@ -557,7 +557,7 @@ int global_messageHandler4(ExCommand *cmd) {
if (!ani)
break;
int flags = cmd->_field_14;
int flags = cmd->_z;
if (flags <= 0)
flags = -1;
@@ -587,7 +587,7 @@ int global_messageHandler4(ExCommand *cmd) {
if (!ani)
break;
int flags = cmd->_field_14;
int flags = cmd->_z;
if (flags <= 0)
flags = -1;
@@ -681,8 +681,8 @@ int global_messageHandler4(ExCommand *cmd) {
if (!ani)
break;
if (cmd->_field_14 >= 0)
ani->_priority = cmd->_field_14;
if (cmd->_z >= 0)
ani->_priority = cmd->_z;
ani->show1(cmd->_x, cmd->_y, cmd->_messageNum, cmd->_parId);
break;
@@ -695,8 +695,8 @@ int global_messageHandler4(ExCommand *cmd) {
if (!ani)
break;
if (cmd->_field_14 >= 0)
ani->_priority = cmd->_field_14;
if (cmd->_z >= 0)
ani->_priority = cmd->_z;
ani->show2(cmd->_x, cmd->_y, cmd->_messageNum, cmd->_parId);
break;
@@ -733,7 +733,7 @@ int global_messageHandler4(ExCommand *cmd) {
if (!ani)
break;
ani->_flags = cmd->_messageNum | (ani->_flags & ~cmd->_field_14);
ani->_flags = cmd->_messageNum | (ani->_flags & ~cmd->_z);
break;
@@ -790,12 +790,12 @@ int MovGraph::messageHandler(ExCommand *cmd) {
MovGraphNode *node = link->_graphSrc;
double sq = (ani->_oy - node->_y) * (ani->_oy - node->_y) + (ani->_ox - node->_x) * (ani->_ox - node->_x);
int off = (node->_field_14 >> 16) & 0xFF;
double off2 = ((link->_graphDst->_field_14 >> 8) & 0xff) - off;
int off = (node->_z >> 16) & 0xFF;
double off2 = ((link->_graphDst->_z >> 8) & 0xff) - off;
top = off + (int)(sqrt(sq) * off2 / link->_length);
} else {
top = (gr->calcOffset(ani->_ox, ani->_oy)->_field_14 >> 8) & 0xff;
top = (gr->calcOffset(ani->_ox, ani->_oy)->_z >> 8) & 0xff;
}
if (ani->_movement) {
@@ -86,7 +86,7 @@ bool ExCommand::load(MfcArchive &file) {
_messageKind = file.readUint32LE();
_x = file.readSint32LE();
_y = file.readSint32LE();
_field_14 = file.readUint32LE();
_z = file.readUint32LE();
_sceneClickX = file.readUint32LE();
_sceneClickY = file.readUint32LE();
_field_20 = file.readUint32LE();
@@ -108,7 +108,7 @@ bool ExCommand::load(MfcArchive &file) {
_objtype = kObjTypeExCommand;
debugC(6, kDebugLoading, "%% <COMMAND parent=%d cmd=%s x=%d y=%d f14=%d sceneX=%d sceneY=%d f20=%d f24=%d param=%d f2c=%d f30=%d f34=%d num=%d flags=%d parId=%d />",
_parentId, exCommandType2str(_messageKind), _x, _y, _field_14, _sceneClickX, _sceneClickY, _field_20, _field_24, _param, _field_2C,
_parentId, exCommandType2str(_messageKind), _x, _y, _z, _sceneClickX, _sceneClickY, _field_20, _field_24, _param, _field_2C,
_field_30, _field_34, _messageNum, _excFlags, _parId);
return true;
@@ -190,7 +190,7 @@ Message::Message() {
_x = 0;
_y = 0;
_field_14 = 0;
_z = 0;
_sceneClickX = 0;
_sceneClickY = 0;
_field_20 = 0;
@@ -201,12 +201,12 @@ Message::Message() {
_field_34 = 0;
}
Message::Message(int16 parentId, int messageKind, int x, int y, int a6, int a7, int sceneClickX, int sceneClickY, int a10) {
Message::Message(int16 parentId, int messageKind, int x, int y, int z, int a7, int sceneClickX, int sceneClickY, int a10) {
_messageKind = messageKind;
_parentId = parentId;
_x = x;
_y = y;
_field_14 = a6;
_z = z;
_sceneClickX = sceneClickX;
_sceneClickY = sceneClickY;
_field_24 = a7;
@@ -582,8 +582,8 @@ int MessageQueue::calcDuration(StaticANIObject *obj) {
if (ex->_parentId == obj->_id) {
if (ex->_messageKind == 1 || ex->_messageKind == 20) {
if ((mov = obj->getMovementById(ex->_messageNum)) != 0) {
if (ex->_field_14 >= 1)
res += ex->_field_14;
if (ex->_z >= 1)
res += ex->_z;
else
res += mov->calcDuration();
}
@@ -958,7 +958,7 @@ void postExCommand(int parentId, int keyCode, int x, int y, int f20, int f14) {
ex->_x = x;
ex->_y = y;
ex->_field_20 = f20;
ex->_field_14 = f14;
ex->_z = f14;
ex->postMessage();
}
@@ -41,7 +41,7 @@ class Message : public CObject {
int16 _parentId;
int _x;
int _y;
int _field_14;
int _z;
int _sceneClickX;
int _sceneClickY;
int _field_20;
Oops, something went wrong.

0 comments on commit 20fb25d

Please sign in to comment.