Skip to content

Commit

Permalink
FULLPIPE: Rename is GabeObject
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Sep 4, 2016
1 parent 7e07e01 commit 2cbf7da
Show file tree
Hide file tree
Showing 25 changed files with 133 additions and 133 deletions.
10 changes: 5 additions & 5 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->_param = ani->_okeyCode;
ex->_param = ani->_odelay;
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->_param = mkQueue->ani->_okeyCode;
ex2->_param = mkQueue->ani->_odelay;

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->_param = mkQueue->ani->_okeyCode;
ex2->_param = mkQueue->ani->_odelay;

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->_param = mkQueue->ani->_okeyCode;
ex2->_param = mkQueue->ani->_odelay;

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->_param = mkQueue->ani->_okeyCode;
ex->_param = mkQueue->ani->_odelay;
ex->_field_24 = 0;
ex->_excFlags |= 3;

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->setParamInt(-1, ani->_okeyCode);
mq->setParamInt(-1, ani->_odelay);
mq->chain(ani);
}
}
Expand Down
30 changes: 15 additions & 15 deletions engines/fullpipe/gfx.cpp
Expand Up @@ -95,7 +95,7 @@ bool Background::load(MfcArchive &file) {
}

void Background::addPictureObject(PictureObject *pct) {
if (pct->_okeyCode)
if (pct->_odelay)
pct->renumPictures(&_picObjList);

bool inserted = false;
Expand Down Expand Up @@ -206,7 +206,7 @@ bool PictureObject::setPicAniInfo(PicAniInfo *picAniInfo) {
if (picAniInfo->type & 2) {
setOXY(picAniInfo->ox, picAniInfo->oy);
_priority = picAniInfo->priority;
_okeyCode = picAniInfo->field_8;
_odelay = picAniInfo->field_8;
setFlags(picAniInfo->flags);
_field_8 = picAniInfo->field_24;

Expand Down Expand Up @@ -251,7 +251,7 @@ void PictureObject::setOXY2() {
}

GameObject::GameObject() {
_okeyCode = 0;
_odelay = 0;
_flags = 0;
_id = 0;
_ox = 0;
Expand All @@ -263,7 +263,7 @@ GameObject::GameObject() {
}

GameObject::GameObject(GameObject *src) {
_okeyCode = 1;
_odelay = 1;
_flags = 0;
_id = src->_id;

Expand All @@ -283,7 +283,7 @@ GameObject::~GameObject() {

bool GameObject::load(MfcArchive &file) {
debugC(5, kDebugLoading, "GameObject::load()");
_okeyCode = 0;
_odelay = 0;
_flags = 0;
_field_20 = 0;

Expand Down Expand Up @@ -311,14 +311,14 @@ void GameObject::renumPictures(Common::Array<StaticANIObject *> *lst) {

for (uint i = 0; i < lst->size(); i++) {
if (_id == ((GameObject *)((*lst)[i]))->_id)
buf[((GameObject *)((*lst)[i]))->_okeyCode] = 1;
buf[((GameObject *)((*lst)[i]))->_odelay] = 1;
}

if (buf[_okeyCode]) {
if (buf[_odelay]) {
uint count;
for (count = 1; buf[count] && count < lst->size() + 2; count++)
;
_okeyCode = count;
_odelay = count;
}

free(buf);
Expand All @@ -329,14 +329,14 @@ void GameObject::renumPictures(Common::Array<PictureObject *> *lst) {

for (uint i = 0; i < lst->size(); i++) {
if (_id == ((GameObject *)((*lst)[i]))->_id)
buf[((GameObject *)((*lst)[i]))->_okeyCode] = 1;
buf[((GameObject *)((*lst)[i]))->_odelay] = 1;
}

if (buf[_okeyCode]) {
if (buf[_odelay]) {
uint count;
for (count = 1; buf[count] && count < lst->size() + 2; count++)
;
_okeyCode = count;
_odelay = count;
}

free(buf);
Expand All @@ -347,7 +347,7 @@ bool GameObject::getPicAniInfo(PicAniInfo *info) {
info->type = 2;
info->objectId = _id;
info->sceneId = 0;
info->field_8 = _okeyCode;
info->field_8 = _odelay;
info->flags = _flags;
info->field_24 = _field_8;
info->ox = _ox;
Expand All @@ -362,7 +362,7 @@ bool GameObject::getPicAniInfo(PicAniInfo *info) {

info->type = (ani->_messageQueueId << 16) | 1;
info->objectId = ani->_id;
info->field_8 = ani->_okeyCode;
info->field_8 = ani->_odelay;
info->sceneId = ani->_sceneId;
info->flags = ani->_flags;
info->field_24 = ani->_field_8;
Expand Down Expand Up @@ -401,7 +401,7 @@ bool GameObject::setPicAniInfo(PicAniInfo *picAniInfo) {
if (picAniInfo->type & 2) {
setOXY(picAniInfo->ox, picAniInfo->oy);
_priority = picAniInfo->priority;
_okeyCode = picAniInfo->field_8;
_odelay = picAniInfo->field_8;
setFlags(picAniInfo->flags);
_field_8 = picAniInfo->field_24;

Expand All @@ -412,7 +412,7 @@ bool GameObject::setPicAniInfo(PicAniInfo *picAniInfo) {
StaticANIObject *ani = (StaticANIObject *)this;

ani->_messageQueueId = (picAniInfo->type >> 16) & 0xffff;
ani->_okeyCode = picAniInfo->field_8;
ani->_odelay = picAniInfo->field_8;
ani->setFlags(picAniInfo->flags);
ani->_field_8 = picAniInfo->field_24;

Expand Down
2 changes: 1 addition & 1 deletion engines/fullpipe/gfx.h
Expand Up @@ -123,7 +123,7 @@ class BigPicture : public Picture {

class GameObject : public CObject {
public:
int16 _okeyCode;
int16 _odelay;
int _field_8;
int16 _flags;
int16 _id;
Expand Down
28 changes: 14 additions & 14 deletions engines/fullpipe/interaction.cpp
Expand Up @@ -188,8 +188,8 @@ 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->_param = subj ? subj->_okeyCode : 0;
ex->_y = obj->_odelay;
ex->_param = subj ? subj->_odelay : 0;
ex->_excFlags = 3;
ex->_field_14 = (obj->_objtype != kObjTypePictureObject);
ex->_field_20 = invId;
Expand All @@ -205,7 +205,7 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject
LABEL_38:
if (inter->_messageQueue) {
mq = new MessageQueue(inter->_messageQueue, 0, 1);
mq->changeParam28ForObjectId(ani->_id, -1, ani->_okeyCode);
mq->changeParam28ForObjectId(ani->_id, -1, ani->_odelay);

if (!mq->chain(0))
return false;
Expand Down Expand Up @@ -253,27 +253,27 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject
subj->setOXY(inter->_xOffs + obj->_ox, inter->_yOffs + obj->_oy);

mq = new MessageQueue(inter->_messageQueue, 0, 1);
mq->changeParam28ForObjectId(obj->_id, -1, obj->_okeyCode);
mq->changeParam28ForObjectId(obj->_id, -1, obj->_odelay);
mq->_flags |= 1;

if (!(inter->_flags & 0x10000)) {
ex = new ExCommand(obj->_id, 34, 0x80, 0, 0, 0, 1, 0, 0, 0);
ex->_param = obj->_okeyCode;
ex->_param = obj->_odelay;
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->_param = obj->_okeyCode;
ex->_param = obj->_odelay;
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->_param = subj->_okeyCode;
ex->_param = subj->_odelay;
ex->_field_14 = 0x100;
ex->_messageNum = 0;
ex->_excFlags = 3;
Expand Down Expand Up @@ -319,8 +319,8 @@ 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->_param = subj->_okeyCode;
ex->_y = obj->_odelay;
ex->_param = subj->_odelay;
ex->_excFlags = 3;
ex->_field_20 = invId;
ex->_field_14 = (obj->_objtype != kObjTypePictureObject);
Expand All @@ -334,7 +334,7 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject
ex->_excFlags |= 3;
ex->_param = 6;
ex->_field_14 = obj->_id;
ex->_field_20 = obj->_okeyCode;
ex->_field_20 = obj->_odelay;
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->_param = ani->_okeyCode;
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->_okeyCode;
ex->_param = ani->_odelay;
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->_param = subj->_okeyCode;
ex->_y = ani->_odelay;
ex->_param = subj->_odelay;
ex->_excFlags = 2;
ex->_field_14 = (obj->_objtype != kObjTypePictureObject);
ex->_field_20 = invId;
Expand Down
2 changes: 1 addition & 1 deletion engines/fullpipe/inventory.cpp
Expand Up @@ -231,7 +231,7 @@ void Inventory2::rebuildItemRects() {

for (uint j = 0; j < _itemsPool.size(); j++) {
if (_itemsPool[j]->pictureObjectNormal == pic->_id) {
if (pic->_okeyCode)
if (pic->_odelay)
_scene->deletePictureObject(pic);
else
pic->_flags &= 0xFFFB;
Expand Down
14 changes: 7 additions & 7 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->_param = _aniMan->_okeyCode;
ex->_param = _aniMan->_odelay;
ex->_excFlags |= 2;
mq->addExCommandToEnd(ex);
}

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

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

ex = new ExCommand(_aniMan->_id, 5, -1, 0, 0, 0, 1, 0, 0, 0);
ex->_param = _aniMan->_okeyCode;
ex->_param = _aniMan->_odelay;
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->_param = _lift->_okeyCode;
ex->_param = _lift->_odelay;
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->_param = _aniMan->_okeyCode;
ex->_param = _aniMan->_odelay;
ex->_excFlags |= 2;
mq->addExCommand(ex);

ex = new ExCommand(_aniMan->_id, 5, -1, 0, 0, 0, 1, 0, 0, 0);
ex->_param = _aniMan->_okeyCode;
ex->_param = _aniMan->_odelay;
ex->_field_14 = _lift->_priority + 1;
ex->_x = -1;
ex->_y = -1;
Expand Down
6 changes: 3 additions & 3 deletions engines/fullpipe/messagehandlers.cpp
Expand Up @@ -221,7 +221,7 @@ int global_messageHandler1(ExCommand *cmd) {
}

if (newex) {
newex->_param = g_fp->_aniMan->_okeyCode;
newex->_param = g_fp->_aniMan->_odelay;
newex->_excFlags |= 3;
newex->postMessage();
}
Expand Down Expand Up @@ -397,7 +397,7 @@ int global_messageHandler3(ExCommand *cmd) {
ani2 = g_fp->_currentScene->getStaticANIObject1ById(g_fp->_gameLoader->_field_FA, -1);

if (ani) {
if (g_fp->_msgObjectId2 == ani->_id && g_fp->_msgId == ani->_okeyCode) {
if (g_fp->_msgObjectId2 == ani->_id && g_fp->_msgId == ani->_odelay) {
cmd->_messageKind = 0;
return result;
}
Expand All @@ -409,7 +409,7 @@ int global_messageHandler3(ExCommand *cmd) {
int id = g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
PictureObject *pic = g_fp->_currentScene->getPictureObjectById(id, 0);
if (pic) {
if (g_fp->_msgObjectId2 == pic->_id && g_fp->_msgId == pic->_okeyCode) {
if (g_fp->_msgObjectId2 == pic->_id && g_fp->_msgId == pic->_odelay) {
cmd->_messageKind = 0;
return result;
}
Expand Down

0 comments on commit 2cbf7da

Please sign in to comment.