diff options
author | Nicola Mettifogo | 2007-03-17 07:55:16 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-03-17 07:55:16 +0000 |
commit | b515721ed84e7e6f14971d3d194769cf269a9ba2 (patch) | |
tree | 7273d94ff674599317bd18f865d7202698d1320a | |
parent | 1ef774b2ee7a74e2bbf12db7273771d0ea3b8a4c (diff) | |
download | scummvm-rg350-b515721ed84e7e6f14971d3d194769cf269a9ba2.tar.gz scummvm-rg350-b515721ed84e7e6f14971d3d194769cf269a9ba2.tar.bz2 scummvm-rg350-b515721ed84e7e6f14971d3d194769cf269a9ba2.zip |
some renaming to shorten lines
svn-id: r26159
-rw-r--r-- | engines/parallaction/animation.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/callables.cpp | 4 | ||||
-rw-r--r-- | engines/parallaction/commands.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/dialogue.cpp | 24 | ||||
-rw-r--r-- | engines/parallaction/inventory.cpp | 12 | ||||
-rw-r--r-- | engines/parallaction/location.cpp | 26 | ||||
-rw-r--r-- | engines/parallaction/parallaction.cpp | 76 | ||||
-rw-r--r-- | engines/parallaction/parallaction.h | 12 | ||||
-rw-r--r-- | engines/parallaction/saveload.cpp | 4 | ||||
-rw-r--r-- | engines/parallaction/walk.cpp | 72 | ||||
-rw-r--r-- | engines/parallaction/zone.cpp | 18 |
11 files changed, 126 insertions, 126 deletions
diff --git a/engines/parallaction/animation.cpp b/engines/parallaction/animation.cpp index c2b725562d..0af2561250 100644 --- a/engines/parallaction/animation.cpp +++ b/engines/parallaction/animation.cpp @@ -658,7 +658,7 @@ void sortAnimations() { Node v14; memset(&v14, 0, sizeof(Node)); - _vm->_char._yourself._z = _vm->_char._yourself._cnv._height + _vm->_char._yourself._zone._limits._top; + _vm->_char._ani._z = _vm->_char._ani._cnv._height + _vm->_char._ani._zone._limits._top; Animation *vC = (Animation*)_animations._next; Node *v8; diff --git a/engines/parallaction/callables.cpp b/engines/parallaction/callables.cpp index 3ff553c48d..950b8a6a24 100644 --- a/engines/parallaction/callables.cpp +++ b/engines/parallaction/callables.cpp @@ -322,7 +322,7 @@ void _c_finito(void *parm) { _vm->_menu->selectCharacter(); } - removeNode(&_vm->_char._yourself._zone._node); + removeNode(&_vm->_char._ani._zone._node); _vm->_locationNames[0][0] = '\0'; _vm->_numLocations = 0; _commandFlags = 0; @@ -339,7 +339,7 @@ void _c_finito(void *parm) { _engineFlags &= ~kEngineQuit; - addNode(&_animations, &_vm->_char._yourself._zone._node); + addNode(&_animations, &_vm->_char._ani._zone._node); _score = 0; return; diff --git a/engines/parallaction/commands.cpp b/engines/parallaction/commands.cpp index d278ee5c0d..ca8ae70085 100644 --- a/engines/parallaction/commands.cpp +++ b/engines/parallaction/commands.cpp @@ -328,7 +328,7 @@ void runCommands(Command *list, Zone *z) { break; case CMD_MOVE: { // move - if ((_vm->_char._yourself._zone._flags & kFlagsRemove) || (_vm->_char._yourself._zone._flags & kFlagsActive) == 0) { + if ((_vm->_char._ani._zone._flags & kFlagsRemove) || (_vm->_char._ani._zone._flags & kFlagsActive) == 0) { continue; } diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp index 3ef4632866..f60dd6a809 100644 --- a/engines/parallaction/dialogue.cpp +++ b/engines/parallaction/dialogue.cpp @@ -228,7 +228,7 @@ void runDialogue(SpeakData *data) { /* // the only character which can have a dialogue inside the museum location is Dino if (!scumm_stricmp(_name, "museum")) { - _vm->_gfx->freeCnv( &_characterFrames ); + _vm->_gfx->freeCnv( &_normalFrames ); debugC(1, kDebugDialogue, "runDialogue: special trick for 'museum' location"); } */ @@ -238,7 +238,7 @@ void runDialogue(SpeakData *data) { StaticCnv v5C, v48; if (!scumm_stricmp(data->_name, "yourself") || data->_name[0] == '\0') { - memcpy(&v6E, &_vm->_char._yourTalk, sizeof(Cnv)); + memcpy(&v6E, &_vm->_char._talk, sizeof(Cnv)); debugC(1, kDebugDialogue, "runDialogue: using default character head"); } else { debugC(1, kDebugDialogue, "runDialogue: loading 2nd character head '%s'", _vm->_characterName); @@ -249,8 +249,8 @@ void runDialogue(SpeakData *data) { v5C._width = v6E._width; v5C._height = v6E._height; - v48._width = _vm->_char._yourTalk._width; - v48._height = _vm->_char._yourTalk._height; + v48._width = _vm->_char._talk._width; + v48._height = _vm->_char._talk._height; bool displayedAnswers = false; int16 question_width = 0, question_height = 0; @@ -263,8 +263,8 @@ void runDialogue(SpeakData *data) { v5C._data0 = v6E._array[v60->_mood & 0xF]; v5C._data1 = NULL; // v6E.field_8[v60->_mood & 0xF]; - v48._data0 = _vm->_char._yourTalk._array[0]; - v48._data1 = NULL; // _yourTalk.field_8[0]; + v48._data0 = _vm->_char._talk._array[0]; + v48._data1 = NULL; // _talk.field_8[0]; // display Question if any if (scumm_stricmp(v60->_text, "NULL")) { @@ -502,9 +502,9 @@ void runDialogue(SpeakData *data) { // that's why this hack (with hardcoded Dino) works if (!scumm_stricmp(_name, "museum")) { _vm->_disk->selectArchive("disk1"); - _vm->_disk->loadFrames(_dinoName, &_characterFrames); + _vm->_disk->loadFrames(_dinoName, &_normalFrames); - memcpy(&_vm->_char._yourself._cnv, &_characterFrames, sizeof(Cnv)); + memcpy(&_vm->_char._ani._cnv, &_normalFrames, sizeof(Cnv)); debugC(1, kDebugDialogue, "runDialogue: special trick for 'museum' location ok"); } @@ -543,8 +543,8 @@ int16 selectAnswer(Question *q, StaticCnv *cnv) { 0 ); - cnv->_data0 = _vm->_char._yourTalk._array[q->_answer_moods[_di] & 0xF]; -// cnv->_data1 = _vm->_char._yourTalk.field_8[q->_answer_moods[_di] & 0xF]; + cnv->_data0 = _vm->_char._talk._array[q->_answer_moods[_di] & 0xF]; +// cnv->_data1 = _vm->_char._talk.field_8[q->_answer_moods[_di] & 0xF]; _vm->_gfx->flatBlitCnv( cnv, @@ -585,8 +585,8 @@ int16 selectAnswer(Question *q, StaticCnv *cnv) { 0 ); - cnv->_data0 = _vm->_char._yourTalk._array[q->_answer_moods[_si] & 0xF]; -// cnv->_data1 = _vm->_char._yourTalk.field_8[q->_answer_moods[_si] & 0xF]; + cnv->_data0 = _vm->_char._talk._array[q->_answer_moods[_si] & 0xF]; +// cnv->_data1 = _vm->_char._talk.field_8[q->_answer_moods[_si] & 0xF]; _vm->_gfx->flatBlitCnv( cnv, diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp index d1c3ca1cc9..0308266101 100644 --- a/engines/parallaction/inventory.cpp +++ b/engines/parallaction/inventory.cpp @@ -187,8 +187,8 @@ void drawInventoryItem(uint16 pos, InventoryItem *item) { uint16 col = pos % INVENTORY_ITEMS_PER_LINE; // FIXME: this will end up in a general blit function - byte* s = _vm->_char._yourObjects._array[item->_index]; - byte* d = _buffer + col * INVENTORYITEM_WIDTH + line * _vm->_char._yourObjects._height * INVENTORY_WIDTH; + byte* s = _vm->_char._objs._array[item->_index]; + byte* d = _buffer + col * INVENTORYITEM_WIDTH + line * _vm->_char._objs._height * INVENTORY_WIDTH; for (uint32 i = 0; i < INVENTORYITEM_HEIGHT; i++) { memcpy(d, s, INVENTORYITEM_WIDTH); @@ -228,8 +228,8 @@ void highlightInventoryItem(int16 pos, byte color) { uint16 line = pos / INVENTORY_ITEMS_PER_LINE; uint16 col = pos % INVENTORY_ITEMS_PER_LINE; - Common::Rect r(INVENTORYITEM_WIDTH, _vm->_char._yourObjects._height); - r.moveTo(col * INVENTORYITEM_WIDTH, line * _vm->_char._yourObjects._height); + Common::Rect r(INVENTORYITEM_WIDTH, _vm->_char._objs._height); + r.moveTo(col * INVENTORYITEM_WIDTH, line * _vm->_char._objs._height); drawBorder(r, _buffer, color); @@ -247,7 +247,7 @@ void extractInventoryGraphics(int16 pos, byte *dst) { // FIXME: this will end up in a general blit function byte* d = dst; - byte* s = _buffer + col * INVENTORYITEM_WIDTH + line * _vm->_char._yourObjects._height * INVENTORY_WIDTH; + byte* s = _buffer + col * INVENTORYITEM_WIDTH + line * _vm->_char._objs._height * INVENTORY_WIDTH; for (uint32 i = 0; i < INVENTORYITEM_HEIGHT; i++) { memcpy(d, s, INVENTORYITEM_WIDTH); @@ -357,7 +357,7 @@ void redrawInventory() { void initInventory() { _buffer = (byte*)malloc(INVENTORY_WIDTH * INVENTORY_HEIGHT); // this buffer is also used by menu so it must stay this size - _vm->_char._yourObjects._count = 0; + _vm->_char._objs._count = 0; } void cleanInventory() { diff --git a/engines/parallaction/location.cpp b/engines/parallaction/location.cpp index d17d24a7dc..e092240d81 100644 --- a/engines/parallaction/location.cpp +++ b/engines/parallaction/location.cpp @@ -92,12 +92,12 @@ void Parallaction::parseLocation(const char *filename) { switchBackground(_location._name, mask); if (_tokens[2][0] != '\0') { - _vm->_char._yourself._zone.pos._position._x = atoi(_tokens[2]); - _vm->_char._yourself._zone.pos._position._y = atoi(_tokens[3]); + _vm->_char._ani._zone.pos._position._x = atoi(_tokens[2]); + _vm->_char._ani._zone.pos._position._y = atoi(_tokens[3]); } if (_tokens[4][0] != '\0') { - _vm->_char._yourself._frame = atoi(_tokens[4]); + _vm->_char._ani._frame = atoi(_tokens[4]); } } if (!scumm_stricmp(_tokens[0], "DISK")) { @@ -237,8 +237,8 @@ void parseWalkNodes(Script& script, Node *list) { if (!scumm_stricmp(_tokens[0], "COORD")) { WalkNode *v4 = (WalkNode*)malloc(sizeof(WalkNode)); - v4->_x = atoi(_tokens[1]) - _vm->_char._yourself._cnv._width/2; - v4->_y = atoi(_tokens[2]) - _vm->_char._yourself._cnv._height; + v4->_x = atoi(_tokens[1]) - _vm->_char._ani._cnv._width/2; + v4->_y = atoi(_tokens[2]) - _vm->_char._ani._cnv._height; addNode(list, &v4->_node); @@ -342,7 +342,7 @@ void Parallaction::changeLocation(char *location) { debugC(2, kDebugLocation, "changeLocation: changed cursor"); } - removeNode(&_vm->_char._yourself._zone._node); + removeNode(&_vm->_char._ani._zone._node); debugC(2, kDebugLocation, "changeLocation: removed character from the animation list"); freeLocation(); @@ -375,7 +375,7 @@ void Parallaction::changeLocation(char *location) { } } - addNode(&_animations, &_vm->_char._yourself._zone._node); + addNode(&_animations, &_vm->_char._ani._zone._node); debugC(2, kDebugLocation, "changeLocation: new character added to the animation list"); strcpy(_saveData1, list[0].c_str()); @@ -384,14 +384,14 @@ void Parallaction::changeLocation(char *location) { _gfx->copyScreen(Gfx::kBitBack, Gfx::kBit2); debugC(1, kDebugLocation, "changeLocation: new location '%s' parsed", _saveData1); - _vm->_char._yourself._zone.pos._oldposition._x = -1000; - _vm->_char._yourself._zone.pos._oldposition._y = -1000; + _vm->_char._ani._zone.pos._oldposition._x = -1000; + _vm->_char._ani._zone.pos._oldposition._y = -1000; - _vm->_char._yourself.field_50 = 0; + _vm->_char._ani.field_50 = 0; if (_location._startPosition._x != -1000) { - _vm->_char._yourself._zone.pos._position._x = _location._startPosition._x; - _vm->_char._yourself._zone.pos._position._y = _location._startPosition._y; - _vm->_char._yourself._frame = _location._startFrame; + _vm->_char._ani._zone.pos._position._x = _location._startPosition._x; + _vm->_char._ani._zone.pos._position._y = _location._startPosition._y; + _vm->_char._ani._frame = _location._startFrame; _location._startPosition._y = -1000; _location._startPosition._x = -1000; diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index c8edac56c3..c72a6b9ad6 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -225,32 +225,32 @@ int Parallaction::init() { initWalk(); - _vm->_char._yourTalk._width = 0; - _vm->_char._yourTalk._height = 0; - _vm->_char._yourTalk._count = 0; - _vm->_char._yourTalk._array = NULL; - - _vm->_char._yourHead._width = 0; - _vm->_char._yourHead._height = 0; - _vm->_char._yourHead._data0 = NULL; - _vm->_char._yourHead._data1 = NULL; - - _vm->_char._yourself._zone.pos._position._x = 150; - _vm->_char._yourself._zone.pos._position._y = 100; + _vm->_char._talk._width = 0; + _vm->_char._talk._height = 0; + _vm->_char._talk._count = 0; + _vm->_char._talk._array = NULL; + + _vm->_char._head._width = 0; + _vm->_char._head._height = 0; + _vm->_char._head._data0 = NULL; + _vm->_char._head._data1 = NULL; + + _vm->_char._ani._zone.pos._position._x = 150; + _vm->_char._ani._zone.pos._position._y = 100; initInventory(); - _vm->_char._yourself._z = 10; + _vm->_char._ani._z = 10; - _vm->_char._yourself._zone.pos._oldposition._x = -1000; - _vm->_char._yourself._zone.pos._oldposition._y = -1000; - _vm->_char._yourself._frame = 0; + _vm->_char._ani._zone.pos._oldposition._x = -1000; + _vm->_char._ani._zone.pos._oldposition._y = -1000; + _vm->_char._ani._frame = 0; - _vm->_char._yourself._zone._flags = kFlagsActive | kFlagsNoName; - _vm->_char._yourself._zone._type = kZoneYou; + _vm->_char._ani._zone._flags = kFlagsActive | kFlagsNoName; + _vm->_char._ani._zone._type = kZoneYou; - _vm->_char._yourself._zone._label._cnv._data0 = NULL; - _vm->_char._yourself._zone._label._text = strdup("yourself"); + _vm->_char._ani._zone._label._cnv._data0 = NULL; + _vm->_char._ani._zone._label._text = strdup("yourself"); - addNode(&_animations, &_vm->_char._yourself._zone._node); + addNode(&_animations, &_vm->_char._ani._zone._node); _gfx = new Gfx(this); int midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MIDI); @@ -295,9 +295,9 @@ void Parallaction::initGame() { parseLocation(_location._name); if (_location._startPosition._x != -1000) { - _vm->_char._yourself._zone.pos._position._x = _location._startPosition._x; - _vm->_char._yourself._zone.pos._position._y = _location._startPosition._y; - _vm->_char._yourself._frame = _location._startFrame; + _vm->_char._ani._zone.pos._position._x = _location._startPosition._x; + _vm->_char._ani._zone.pos._position._y = _location._startPosition._y; + _vm->_char._ani._frame = _location._startFrame; _location._startPosition._y = -1000; _location._startPosition._x = -1000; } @@ -539,8 +539,8 @@ void Parallaction::processInput(InputData *data) { debugC(2, kDebugInput, "processInput: kEvWalk"); _hoverZone = NULL; changeCursor(kCursorArrow); - if (_vm->_char._yourself._zone._flags & kFlagsRemove) break; - if ((_vm->_char._yourself._zone._flags & kFlagsActive) == 0) break; + if (_vm->_char._ani._zone._flags & kFlagsRemove) break; + if ((_vm->_char._ani._zone._flags & kFlagsActive) == 0) break; v4 = buildWalkPath(data->_mousePos._x, data->_mousePos._y); addJob(jobWalk, v4, kPriority19); _engineFlags |= kEngineWalking; // inhibits processing of input until walking is over @@ -754,14 +754,14 @@ void Parallaction::changeCursor(int32 index) { void freeCharacterFrames() { - _vm->_gfx->freeCnv(&_vm->_char._characterFrames); + _vm->_gfx->freeCnv(&_vm->_char._normalFrames); if (!IS_DUMMY_CHARACTER(_vm->_characterName)) { - _vm->_gfx->freeCnv(&_vm->_char._miniCharacterFrames); + _vm->_gfx->freeCnv(&_vm->_char._miniFrames); _vm->freeTable(_objectsNames); - _vm->_gfx->freeCnv(&_vm->_char._yourTalk); - _vm->_gfx->freeStaticCnv(&_vm->_char._yourHead); - _vm->_gfx->freeCnv(&_vm->_char._yourObjects); + _vm->_gfx->freeCnv(&_vm->_char._talk); + _vm->_gfx->freeStaticCnv(&_vm->_char._head); + _vm->_gfx->freeCnv(&_vm->_char._objs); } return; @@ -834,15 +834,15 @@ void Parallaction::changeCharacter(const char *name) { char path[PATH_LEN]; strcpy(path, v32); - _disk->loadFrames(path, &_vm->_char._characterFrames); + _disk->loadFrames(path, &_vm->_char._normalFrames); if (!IS_DUMMY_CHARACTER(name)) { - _disk->loadHead(path, &_vm->_char._yourHead); - _disk->loadTalk(path, &_vm->_char._yourTalk); - _disk->loadObjects(name, &_vm->_char._yourObjects); + _disk->loadHead(path, &_vm->_char._head); + _disk->loadTalk(path, &_vm->_char._talk); + _disk->loadObjects(name, &_vm->_char._objs); sprintf(path, "mini%s", v32); - _disk->loadFrames(path, &_vm->_char._miniCharacterFrames); + _disk->loadFrames(path, &_vm->_char._miniFrames); sprintf(path, "%s.tab", name); initTable(path, _objectsNames); @@ -855,9 +855,9 @@ void Parallaction::changeCharacter(const char *name) { } if (miniCharacter) - memcpy(&_vm->_char._yourself._cnv, &_vm->_char._miniCharacterFrames, sizeof(Cnv)); + memcpy(&_vm->_char._ani._cnv, &_vm->_char._miniFrames, sizeof(Cnv)); else - memcpy(&_vm->_char._yourself._cnv, &_vm->_char._characterFrames, sizeof(Cnv)); + memcpy(&_vm->_char._ani._cnv, &_vm->_char._normalFrames, sizeof(Cnv)); strcpy(_characterName1, v32); diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index e103d8ad11..fdea5d404c 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -251,12 +251,12 @@ struct Location { }; struct Character { - Animation _yourself; - StaticCnv _yourHead; - Cnv _yourTalk; - Cnv _characterFrames; - Cnv _miniCharacterFrames; - Cnv _yourObjects; + Animation _ani; + StaticCnv _head; + Cnv _talk; + Cnv _normalFrames; + Cnv _miniFrames; + Cnv _objs; }; class Parallaction : public Engine { diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp index f1e5cb94c8..2b4f464258 100644 --- a/engines/parallaction/saveload.cpp +++ b/engines/parallaction/saveload.cpp @@ -175,9 +175,9 @@ void Parallaction::doSaveGame(uint16 slot, const char* name) { sprintf(s, "%s\n", _saveData1); f->writeString(s); - sprintf(s, "%d\n", _vm->_char._yourself._zone.pos._position._x); + sprintf(s, "%d\n", _vm->_char._ani._zone.pos._position._x); f->writeString(s); - sprintf(s, "%d\n", _vm->_char._yourself._zone.pos._position._y); + sprintf(s, "%d\n", _vm->_char._ani._zone.pos._position._y); f->writeString(s); sprintf(s, "%d\n", _score); f->writeString(s); diff --git a/engines/parallaction/walk.cpp b/engines/parallaction/walk.cpp index 8ee5b11ad6..d22cdb5a06 100644 --- a/engines/parallaction/walk.cpp +++ b/engines/parallaction/walk.cpp @@ -95,7 +95,7 @@ WalkNode *buildWalkPath(uint16 x, uint16 y) { if (close == right) { to_x += right; - walkData3 = (_vm->_char._yourself._cnv._count == 20) ? 7 : 9; + walkData3 = (_vm->_char._ani._cnv._count == 20) ? 7 : 9; } else if (close == left) { to_x -= left; @@ -106,7 +106,7 @@ WalkNode *buildWalkPath(uint16 x, uint16 y) { } else if (close == bottom) { to_y += bottom; - walkData3 = (_vm->_char._yourself._cnv._count == 20) ? 17 : 21; + walkData3 = (_vm->_char._ani._cnv._count == 20) ? 17 : 21; } } @@ -115,8 +115,8 @@ WalkNode *buildWalkPath(uint16 x, uint16 y) { WalkNode *v48 = (WalkNode*)malloc(sizeof(WalkNode)); WalkNode *v44 = (WalkNode*)malloc(sizeof(WalkNode)); - v48->_x = to_x - _vm->_char._yourself._cnv._width / 2; // target top left coordinates - v48->_y = to_y - _vm->_char._yourself._cnv._height; + v48->_x = to_x - _vm->_char._ani._cnv._width / 2; // target top left coordinates + v48->_y = to_y - _vm->_char._ani._cnv._height; v48->_node._next = NULL; memcpy(v44, v48, sizeof(WalkNode)); @@ -152,11 +152,11 @@ WalkNode *buildWalkPath(uint16 x, uint16 y) { v48 = &v58; - v20._x = _vm->_char._yourself._zone.pos._position._x; - v20._y = _vm->_char._yourself._zone.pos._position._y; + v20._x = _vm->_char._ani._zone.pos._position._x; + v20._y = _vm->_char._ani._zone.pos._position._y; - v8._x = _si - _vm->_char._yourself._zone.pos._position._x; - v8._y = _di - _vm->_char._yourself._zone.pos._position._y; + v8._x = _si - _vm->_char._ani._zone.pos._position._x; + v8._y = _di - _vm->_char._ani._zone.pos._position._y; v34 = v30 = dotProduct(&v8, &v8); // square distance from current position and target while (_closest_node_found != 0) { @@ -245,8 +245,8 @@ uint16 walkFunc1(int16 x, int16 y, WalkNode *Node) { Point v4 = { 0, 0 }; Point foot = { - _vm->_char._yourself._zone.pos._position._x + _vm->_char._yourself._cnv._width/2, - _vm->_char._yourself._zone.pos._position._y + _vm->_char._yourself._cnv._height + _vm->_char._ani._zone.pos._position._x + _vm->_char._ani._cnv._width/2, + _vm->_char._ani._zone.pos._position._y + _vm->_char._ani._cnv._height }; Point v8 = { @@ -297,8 +297,8 @@ uint16 walkFunc1(int16 x, int16 y, WalkNode *Node) { v8._y = foot._y; } - Node->_x = v4._x - _vm->_char._yourself._cnv._width / 2; - Node->_y = v4._y - _vm->_char._yourself._cnv._height; + Node->_x = v4._x - _vm->_char._ani._cnv._width / 2; + Node->_y = v4._y - _vm->_char._ani._cnv._height; return (x - v4._x) * (x - v4._x) + (y - v4._y) * (y - v4._y); } @@ -316,13 +316,13 @@ uint16 walkFunc1(int16 x, int16 y, WalkNode *Node) { void jobWalk(void *parm, Job *j) { WalkNode *node = (WalkNode*)parm; - int16 _si = _vm->_char._yourself._zone.pos._position._x; - int16 _di = _vm->_char._yourself._zone.pos._position._y; + int16 _si = _vm->_char._ani._zone.pos._position._x; + int16 _di = _vm->_char._ani._zone.pos._position._y; -// debugC(1, kDebugWalk, "jobWalk to (%i, %i)", node->_x + _vm->_char._yourself._cnv._width / 2, node->_y + _vm->_char._yourself._cnv._height); +// debugC(1, kDebugWalk, "jobWalk to (%i, %i)", node->_x + _vm->_char._ani._cnv._width / 2, node->_y + _vm->_char._ani._cnv._height); - _vm->_char._yourself._zone.pos._oldposition._x = _si; - _vm->_char._yourself._zone.pos._oldposition._y = _di; + _vm->_char._ani._zone.pos._oldposition._x = _si; + _vm->_char._ani._zone.pos._oldposition._y = _di; if ((node->_x == _si) && (node->_y == _di)) { if (node->_node._next == NULL) { @@ -346,8 +346,8 @@ void jobWalk(void *parm, Job *j) { } Point dist = { - node->_x - _vm->_char._yourself._zone.pos._position._x, - node->_y - _vm->_char._yourself._zone.pos._position._y + node->_x - _vm->_char._ani._zone.pos._position._x, + node->_y - _vm->_char._ani._zone.pos._position._y }; if (dist._x < 0) @@ -359,7 +359,7 @@ void jobWalk(void *parm, Job *j) { // walk frame selection int16 v16; - if (_vm->_char._yourself._cnv._count == 20) { + if (_vm->_char._ani._cnv._count == 20) { if (dist._x > dist._y) { walkData2 = (node->_x > _si) ? 0 : 7; @@ -386,36 +386,36 @@ void jobWalk(void *parm, Job *j) { } // StaticCnv v14; -// v14._width = _vm->_char._yourself._cnv._width; -// v14._height = _vm->_char._yourself._cnv._height; -// v14._data0 = _vm->_char._yourself._cnv._array[_vm->_char._yourself._frame]; -// v14._data1 = _vm->_char._yourself._cnv.field_8[_vm->_char._yourself._frame]; +// v14._width = _vm->_char._ani._cnv._width; +// v14._height = _vm->_char._ani._cnv._height; +// v14._data0 = _vm->_char._ani._cnv._array[_vm->_char._ani._frame]; +// v14._data1 = _vm->_char._ani._cnv.field_8[_vm->_char._ani._frame]; - if ((_si < node->_x) && (_si < SCREEN_WIDTH) && (queryPath(_vm->_char._yourself._cnv._width/2 + _si + 2, _vm->_char._yourself._cnv._height + _di) != 0)) { + if ((_si < node->_x) && (_si < SCREEN_WIDTH) && (queryPath(_vm->_char._ani._cnv._width/2 + _si + 2, _vm->_char._ani._cnv._height + _di) != 0)) { // printf("walk right\n"); _si = (_si + 2 < node->_x) ? _si + 2 : node->_x; } - if ((_si > node->_x) && (_si > -20) && (queryPath(_vm->_char._yourself._cnv._width/2 + _si - 2, _vm->_char._yourself._cnv._height + _di) != 0)) { + if ((_si > node->_x) && (_si > -20) && (queryPath(_vm->_char._ani._cnv._width/2 + _si - 2, _vm->_char._ani._cnv._height + _di) != 0)) { // printf("walk left\n"); _si = (_si - 2 > node->_x) ? _si - 2 :node->_x; } - if ((_di < node->_y) && (_di < (SCREEN_HEIGHT - _vm->_char._yourself._cnv._height)) && (queryPath(_vm->_char._yourself._cnv._width/2 + _si, _vm->_char._yourself._cnv._height + _di + 2) != 0)) { + if ((_di < node->_y) && (_di < (SCREEN_HEIGHT - _vm->_char._ani._cnv._height)) && (queryPath(_vm->_char._ani._cnv._width/2 + _si, _vm->_char._ani._cnv._height + _di + 2) != 0)) { // printf("walk down\n"); _di = (_di + 2 <= node->_y) ? _di + 2 : node->_y; } - if ((_di > node->_y) && (_di > -20) && (queryPath(_vm->_char._yourself._cnv._width/2 + _si, _vm->_char._yourself._cnv._height + _di - 2) != 0)) { + if ((_di > node->_y) && (_di > -20) && (queryPath(_vm->_char._ani._cnv._width/2 + _si, _vm->_char._ani._cnv._height + _di - 2) != 0)) { // printf("walk up\n"); _di = (_di - 2 >= node->_y) ? _di - 2 : node->_y; } // printf("hitZone: %i, %i\n", _si, _di); - _vm->_char._yourself._zone.pos._position._x = _si; - _vm->_char._yourself._zone.pos._position._y = _di; + _vm->_char._ani._zone.pos._position._x = _si; + _vm->_char._ani._zone.pos._position._y = _di; - if ((_si == _vm->_char._yourself._zone.pos._oldposition._x) && (_di == _vm->_char._yourself._zone.pos._oldposition._y)) { + if ((_si == _vm->_char._ani._zone.pos._oldposition._x) && (_di == _vm->_char._ani._zone.pos._oldposition._y)) { j->_finished = 1; checkDoor(); @@ -423,7 +423,7 @@ void jobWalk(void *parm, Job *j) { } else { - _vm->_char._yourself._frame = v16 + walkData2 + 1; + _vm->_char._ani._frame = v16 + walkData2 + 1; } @@ -440,7 +440,7 @@ uint16 checkDoor() { } _engineFlags &= ~kEngineWalking; - Zone *z = hitZone(kZoneDoor, _vm->_char._yourself._zone.pos._position._x + _vm->_char._yourself._cnv._width / 2, _vm->_char._yourself._zone.pos._position._y + _vm->_char._yourself._cnv._height); + Zone *z = hitZone(kZoneDoor, _vm->_char._ani._zone.pos._position._x + _vm->_char._ani._cnv._width / 2, _vm->_char._ani._zone.pos._position._y + _vm->_char._ani._cnv._height); if (z != NULL) { @@ -458,7 +458,7 @@ uint16 checkDoor() { } } - z = hitZone(kZoneTrap, _vm->_char._yourself._zone.pos._position._x + _vm->_char._yourself._cnv._width / 2, _vm->_char._yourself._zone.pos._position._y + _vm->_char._yourself._cnv._height); + z = hitZone(kZoneTrap, _vm->_char._ani._zone.pos._position._x + _vm->_char._ani._cnv._width / 2, _vm->_char._ani._zone.pos._position._y + _vm->_char._ani._cnv._height); if (z != NULL) { _localFlags[_vm->_currentLocationIndex] |= kFlagsEnter; @@ -475,8 +475,8 @@ uint16 checkDoor() { // printf("done\n"); - _vm->_char._yourself._frame = walkData2; - return _vm->_char._yourself._frame; + _vm->_char._ani._frame = walkData2; + return _vm->_char._ani._frame; } uint16 queryPath(uint16 x, uint16 y) { diff --git a/engines/parallaction/zone.cpp b/engines/parallaction/zone.cpp index a234c66123..fd8237a1ec 100644 --- a/engines/parallaction/zone.cpp +++ b/engines/parallaction/zone.cpp @@ -366,10 +366,10 @@ void displayCharacterComment(ExamineData *data) { if (data->_description == NULL) return; StaticCnv v3C; - v3C._width = _vm->_char._yourTalk._width; - v3C._height = _vm->_char._yourTalk._height; - v3C._data0 = _vm->_char._yourTalk._array[0]; - v3C._data1 = NULL; //_yourTalk.field_8[0]; + v3C._width = _vm->_char._talk._width; + v3C._height = _vm->_char._talk._height; + v3C._data0 = _vm->_char._talk._array[0]; + v3C._data1 = NULL; //_talk.field_8[0]; _vm->_gfx->setFont("comic"); _vm->_gfx->flatBlitCnv(&v3C, 190, 80, Gfx::kBitFront, v3C._data1); @@ -414,7 +414,7 @@ void displayItemComment(ExamineData *data) { Common::Rect r(v6C, v6A); r.moveTo(0, 90); _vm->_gfx->drawBalloon(r, 0); - _vm->_gfx->flatBlitCnv(&_vm->_char._yourHead, 100, 152, Gfx::kBitFront, _vm->_char._yourHead._data1); + _vm->_gfx->flatBlitCnv(&_vm->_char._head, 100, 152, Gfx::kBitFront, _vm->_char._head._data1); _vm->_gfx->displayWrappedString(data->_description, 0, 90, 130, 0); jobEraseAnimations((void*)1, NULL); @@ -608,13 +608,13 @@ Zone *hitZone(uint32 type, uint16 x, uint16 y) { if (z->_limits._left != -1) continue; - if (_si < _vm->_char._yourself._zone.pos._position._x) + if (_si < _vm->_char._ani._zone.pos._position._x) continue; - if (_si > (_vm->_char._yourself._zone.pos._position._x + _vm->_char._yourself._cnv._width)) + if (_si > (_vm->_char._ani._zone.pos._position._x + _vm->_char._ani._cnv._width)) continue; - if (_di < _vm->_char._yourself._zone.pos._position._y) + if (_di < _vm->_char._ani._zone.pos._position._y) continue; - if (_di > (_vm->_char._yourself._zone.pos._position._y + _vm->_char._yourself._cnv._height)) + if (_di > (_vm->_char._ani._zone.pos._position._y + _vm->_char._ani._cnv._height)) continue; } |