From 75f31d28c97492fbf73826fe6eb3f600875e8ea0 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 30 Dec 2004 18:45:48 +0000 Subject: o COde formatting o Improved debug output o Do not produce a lot of frameCount < 0 messages o Okk now appears after first scene o implemented yet another animation function o Renamed SF_* -> sf* for functions I know are correct svn-id: r16390 --- saga/actor.cpp | 32 ++--- saga/actor.h | 12 +- saga/actordata.cpp | 371 +++++++++++++++++++++++++++-------------------------- saga/script.h | 14 +- saga/sfuncs.cpp | 64 +++++---- 5 files changed, 247 insertions(+), 246 deletions(-) diff --git a/saga/actor.cpp b/saga/actor.cpp index f7df23fab4..746b452044 100644 --- a/saga/actor.cpp +++ b/saga/actor.cpp @@ -142,7 +142,7 @@ Actor::Actor(SagaEngine *vm) : _vm(vm) { actor = &_actors[i]; actor->actorId = ACTOR_INDEX_TO_ID(i); actor->index = i; - debug(9, "init actorId=0x%X index=0x%X", actor->actorId, actor->index); + debug(9, "init actorId=%d index=%d", actor->actorId, actor->index); actor->nameIndex = ActorTable[i].nameIndex; actor->spriteListResourceId = ActorTable[i].spriteListResourceId; actor->frameListResourceId = ActorTable[i].frameListResourceId; @@ -162,7 +162,7 @@ Actor::Actor(SagaEngine *vm) : _vm(vm) { actor->disabled = !loadActorResources(actor); if (actor->disabled) { - warning("Disabling actorId=0x%X index=0x%X", actor->actorId, actor->index); + warning("Disabling actorId=%d index=%d", actor->actorId, actor->index); } } } @@ -181,18 +181,21 @@ Actor::~Actor() { } } -bool Actor::loadActorResources(ActorData * actor) { +bool Actor::loadActorResources(ActorData *actor) { byte *resourcePointer; size_t resourceLength; int framesCount; ActorFrameSequence *framesPointer; int lastFrame; int i, orient; - int result; - debug(9, "Loading frame resource id 0x%X", actor->frameListResourceId); - result = RSC_LoadResource(_actorContext, actor->frameListResourceId, &resourcePointer, &resourceLength); - if (result != SUCCESS) { + if (actor->frameListResourceId == 0) { + warning("Frame List ID = 0 for actor index %d", actor->index); + return true; + } + + debug(9, "Loading frame resource id %d", actor->frameListResourceId); + if (RSC_LoadResource(_actorContext, actor->frameListResourceId, &resourcePointer, &resourceLength) != SUCCESS) { warning("Couldn't load sprite action index resource"); return false; } @@ -228,7 +231,7 @@ bool Actor::loadActorResources(ActorData * actor) { actor->framesCount = framesCount; - debug(9, "Loading sprite resource id 0x%X", actor->spriteListResourceId); + debug(9, "Loading sprite resource id %d", actor->spriteListResourceId); if (_vm->_sprite->loadList(actor->spriteListResourceId, &actor->spriteList) != SUCCESS) { warning("Unable to load sprite list"); return false; @@ -237,7 +240,7 @@ bool Actor::loadActorResources(ActorData * actor) { i = _vm->_sprite->getListLen(actor->spriteList); if (lastFrame >= i) { - debug(9, "Appending to sprite list 0x%X", actor->spriteListResourceId); + debug(9, "Appending to sprite list %d (+ %d)", actor->spriteListResourceId, lastFrame); if (_vm->_sprite->appendList(actor->spriteListResourceId + 1, actor->spriteList) != SUCCESS) { warning("Unable append sprite list"); return false; @@ -676,7 +679,7 @@ int Actor::direct(int msec) { return SUCCESS; } -void Actor::calcActorScreenPosition(ActorData * actor) { +void Actor::calcActorScreenPosition(ActorData *actor) { int beginSlope, endSlope, middle; if (_vm->_scene->getMode() == SCENE_MODE_ISO) { //todo: it @@ -810,7 +813,7 @@ void Actor::StoA(Point &actorPoint, const Point &screenPoint) { actorPoint.y = (screenPoint.y * ACTOR_LMULT); } -bool Actor::followProtagonist(ActorData * actor) { +bool Actor::followProtagonist(ActorData *actor) { ActorLocation protagonistLocation; ActorLocation newLocation; ActorLocation delta; @@ -951,8 +954,7 @@ bool Actor::actorWalkTo(uint16 actorId, const ActorLocation &toLocation) { _vm->_scene->setDoorState(2, 0); _vm->_scene->setDoorState(3, 0xff); } - if (actorId == 0x2002) - debug("eah"); + if (_vm->_scene->getMode() == SCENE_MODE_ISO) { //todo: it } else { @@ -1174,7 +1176,7 @@ void Actor::abortSpeech() { _activeSpeech.playingTime = 0; } -void Actor::findActorPath(ActorData * actor, const Point &fromPoint, const Point &toPoint) { +void Actor::findActorPath(ActorData *actor, const Point &fromPoint, const Point &toPoint) { Point tempPoint; Point iteratorPoint; Point bestPoint; @@ -1373,7 +1375,7 @@ int Actor::fillPathArray(const Point &fromPoint, const Point &toPoint, Point &be return pointCounter; } -void Actor::setActorPath(ActorData * actor, const Point &fromPoint, const Point &toPoint) { +void Actor::setActorPath(ActorData *actor, const Point &fromPoint, const Point &toPoint) { Point pathFromPoint; Point pathToPoint; Point *point; diff --git a/saga/actor.h b/saga/actor.h index 4ab3f07efe..c5229d8139 100644 --- a/saga/actor.h +++ b/saga/actor.h @@ -226,7 +226,7 @@ struct ActorData { } }; -typedef ActorData* ActorDataPointer; +typedef ActorData *ActorDataPointer; typedef SortedList ActorOrderList; struct SpeechData { @@ -288,12 +288,12 @@ public: } private: - bool loadActorResources(ActorData * actor); + bool loadActorResources(ActorData *actor); void createDrawOrderList(); - void calcActorScreenPosition(ActorData * actor); - bool followProtagonist(ActorData * actor); - void findActorPath(ActorData * actor, const Point &fromPoint, const Point &toPoint); + void calcActorScreenPosition(ActorData *actor); + bool followProtagonist(ActorData *actor); + void findActorPath(ActorData *actor, const Point &fromPoint, const Point &toPoint); void handleSpeech(int msec); void handleActions(int msec, bool setup); void setPathCell(const Point &testPoint, int value) { @@ -304,7 +304,7 @@ private: } bool scanPathLine(const Point &point1, const Point &point2); int fillPathArray(const Point &fromPoint, const Point &toPoint, Point &bestPoint); - void setActorPath(ActorData * actor, const Point &fromPoint, const Point &toPoint); + void setActorPath(ActorData *actor, const Point &fromPoint, const Point &toPoint); void pathToNode(); void condenseNodeList(); void removeNodes(); diff --git a/saga/actordata.cpp b/saga/actordata.cpp index 1e4a443a24..e5b8c6b69a 100644 --- a/saga/actordata.cpp +++ b/saga/actordata.cpp @@ -28,189 +28,194 @@ namespace Saga { ActorTableData ActorTable[ACTORCOUNT] = { -// flags name scene x y z spr frm scp col -// -------------- --- ---- ---- ----- ---- ---- ---- --- ---- --- -- -- - { kProtagonist , 0, 1, 0, 0, 0, 37, 135, 0, 1, 0, 0, 0}, // map party - { kFollower , 1, 0, 0, 0, 0, 0, 0, 1, 132, 0, 0, 0}, // Okk - { kFollower , 2, 0, 0, 0, 0, 48, 143, 2, 161, 0, 0, 0}, // Eeah - { 0 , 3, 0, 240, 480, 0, 115, 206, 0, 25, 0, 0, 0}, // albino ferret - { 0 , 4, 17, 368, 400, 0, 115, 206, 4, 49, 0, 0, 0}, // moneychanger - { 0 , 5, 11, 552, 412, 0, 54, 152, 1, 171, 0, 0, 0}, // Sist - { 0 , 17, 2, 1192, 888, 0, 57, 153, 17, 49, 0, 0, 0}, // worker ferret 1 - { 0 , 17, 2, 816, 1052, 0, 57, 153, 18, 49, 0, 0, 0}, // worker ferret 2 - { 0 , 17, 2, 928, 932, 0, 58, 153, 19, 49, 0, 0, 0}, // worker ferret 3 - { 0 , 17, 2, 1416, 1160, 0, 58, 153, 20, 49, 0, 0, 0}, // worker ferret 4 - { 0 , 19, 49, 1592, 1336, 0, 92, 175, 15, 162, 0, 0, 0}, // faire merchant 1 (bear) - { 0 , 20, 49, 744, 824, 0, 63, 156, 19, 112, 0, 4, 4}, // faire merchant 2 (ferret) - { 0 , 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire merchant 3 - { 0 , 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire merchant 4 - { 0 , 9, 49, 1560, 1624, 0, 94, 147, 18, 132, 0, 4, 4}, // faire goer 1a (rat) - { 0 , 56, 49, 1384, 792, 0, 95, 193, 20, 72, 0, 0, 0}, // faire goer 1b (otter) - { 0 , 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire goer 2a - { 0 , 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire goer 2b - { 0 , 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire goer 3a - { 0 , 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire goer 3b - { 0 , 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire goer 4a - { 0 , 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire goer 4b - { 0 , 18, 32, 764, 448, 0, 55, 150, 0, 48, 10, 4, 4}, // Scorry - { 0 , 35, 32, 0, 0, 0, 56, 151, 0, 112, 0, 0, 0}, // grand puzzler - { 0 , 36, 32, 0, 0, 0, 105, 142, 0, 155, 0, 0, 0}, // Rhene - { 0 , 32, 32, 0, 0, 0, 91, 190, 0, 98, 0, 0, 0}, // elk captain - { 0 , 31, 32, 0, 0, 0, 90, 189, 0, 171, 0, 0, 0}, // elk guard 1 - { 0 , 31, 32, 0, 0, 0, 90, 189, 0, 171, 0, 0, 0}, // elk guard 2 - { 0 , 31, 32, 0, 0, 0, 90, 189, 0, 171, 0, 0, 0}, // elk guard 3 - { 0 , 31, 32, 0, 0, 0, 79, 172, 0, 18, 0, 0, 0}, // boar sergeant - { 0 , 21, 50, 664, 400, 0, 76, 171, 2, 74, 0, 4, 4}, // boar sentry 1 - { 0 , 21, 50, 892, 428, 0, 76, 171, 2, 74, 0, 4, 4}, // boar sentry 2 - { 0 , 9, 51, 904, 936, 0, 51, 145, 35, 5, 0, 0, 0}, // hall rat 1 - { 0 , 9, 51, 872, 840, 0, 51, 145, 36, 5, 0, 0, 0}, // hall rat 2 - { 0 , 9, 51, 1432, 344, 0, 51, 145, 37, 5, 0, 0, 0}, // hall rat 3 - { 0 , 9, 51, 664, 472, 0, 51, 145, 38, 5, 0, 0, 0}, // hall rat 4 - { 0 , 10, 51, 1368, 1464, 0, 80, 146, 39, 147, 0, 0, 0}, // book rat 1 - { 0 , 10, 51, 1416, 1624, 0, 80, 146, 40, 147, 0, 0, 0}, // book rat 2 - { 0 , 10, 51, 1752, 120, 0, 80, 146, 41, 147, 0, 0, 0}, // book rat 3 - { 0 , 10, 51, 984, 408, 0, 80, 146, 42, 147, 0, 0, 0}, // book rat 4 - { 0 , 14, 52, 856, 376, 0, 82, 174, 8, 73, 0, 0, 0}, // grounds servant 1 - { 0 , 14, 52, 808, 664, 0, 82, 174, 9, 73, 0, 0, 0}, // grounds servant 2 - { 0 , 14, 52, 440, 568, 0, 82, 174, 10, 73, 0, 0, 0}, // grounds servant 3 - { 0 , 14, 52, 392, 776, 0, 82, 174, 11, 73, 0, 0, 0}, // grounds servant 4 - { 0 , 21, 4, 240, 384, 0, 79, 172, 0, 18, 0, 2, 2}, // boar sentry 3 (by doorway) - { 0 , 23, 4, 636, 268, 0, 77, 173, 0, 74, 0, 4, 4}, // boar courtier - { 0 , 22, 4, 900, 320, 0, 78, 179, 0, 60, 0, 4, 4}, // boar king - { 0 , 14, 4, 788, 264, 0, 75, 170, 0, 171, 0, 2, 2}, // boar servant 1 - { 0 , 14, 4, 1088, 264, 0, 75, 170, 0, 171, 0, 6, 6}, // boar servant 2 - { 0 , 24, 19, 728, 396, 0, 65, 181, 47, 146, 0, 6, 6}, // glass master - { 0 , 24, 21, -20, -20, 0, 66, 182, 0, 146, 0, 4, 4}, // glass master (with orb) - { kCycle , 25, 19, 372, 464, 0, 67, 183, 73, 146, 0, 2, 2}, // glass worker - { 0 , 26, 5, 564, 476, 27, 53, 149, 1, 5, 0, 4, 4}, // door rat - { kCycle , 27, 31, 868, 344, 0, 81, 180, 0, 171, 0, 4, 4}, // bees - { 0 , 28, 73, 568, 380, 0, 83, 176, 30, 120, 0, 4, 4}, // fortune teller - { 0 , 14, 7, 808, 480, 0, 82, 174, 9, 73, 0, 0, 0}, // orb messenger - { 0 , 29, 10, 508, 432, 0, 84, 186, 6, 112, 0, 4, 4}, // elk king - { 0 , 33, 10, 676, 420, 0, 86, 184, 6, 171, 0, 4, 4}, // elk chancellor - { 0 , 30, 10, 388, 452, 0, 88, 185, 6, 171, 0, 4, 4}, // elk courtier 1 - { 0 , 30, 10, 608, 444, 0, 89, 185, 6, 171, 0, 4, 4}, // elk courtier 2 - { 0 , 31, 10, 192, 468, 0, 90, 189, 6, 171, 0, 4, 4}, // elk throne guard 1 - { 0 , 31, 10, 772, 432, 0, 90, 189, 6, 171, 0, 4, 4}, // elk throne guard 2 - { 0 , 14, 10, 1340, 444, 0, 87, 188, 6, 171, 0, 4, 4}, // elk servant - { 0 , 20, 18, 808, 360, 7, 60, 154, 64, 88, 0, 4, 4}, // hardware ferret - { 0 , 34, 49, 1128, 1256, 0, 96, 191, 16, 35, 0, 4, 4}, // porcupine - { 0 , 34, 49, 1384, 792, 0, 93, 192, 17, 66, 0, 4, 4}, // faire ram - { 0 , 24, 21, 0, -40, 0, 65, 181, 50, 146, 0, 6, 6}, // glass master 2 - { 0 , 3, 21, 0, -40, 0, 64, 158, 49, 112, 0, 0, 0}, // Sakka - { 0 , 17, 21, 0, -40, 0, 62, 157, 74, 48, 0, 0, 0}, // lodge ferret 1 - { 0 , 17, 21, 0, -40, 0, 62, 157, 74, 49, 0, 0, 0}, // lodge ferret 2 - { 0 , 17, 21, 0, -40, 0, 62, 157, 74, 50, 0, 0, 0}, // lodge ferret 3 - { 0 , 12, 244, 1056, 504, 0, 107, 167, 21, 124, 0, 6, 6}, // Elara - { 0 , 8, 33, 248, 440, 0, 68, 169, 14, 112, 0, 0, 0}, // Tycho - { 0 , 11, 23, 308, 424, 0, 106, 166, 6, 48, 0, 2, 2}, // Alamma - { 0 , 17, 2, 1864, 1336, 0, 58, 153, 21, 49, 0, 0, 0}, // worker ferret 5 - { 0 , 17, 2, 760, 216, 0, 58, 153, 22, 49, 0, 0, 0}, // worker ferret 6 - { 0 , 44, 29, 0, 0, 0, 72, 159, 0, 112, 0, 0, 0}, // Prince - { 0 , 45, 29, 0, 0, 0, 71, 163, 0, 146, 0, 6, 6}, // harem girl 1 - { 0 , 45, 29, 0, 0, 0, 71, 163, 0, 124, 0, 2, 2}, // harem girl 2 - { 0 , 45, 29, 0, 0, 0, 71, 163, 0, 169, 0, 0, 0}, // harem girl 3 - { 0 , 7, 29, 0, 0, 0, 69, 164, 0, 4, 0, 0, 0}, // dog sergeant - { 0 , 7, 29, 0, 0, 0, 70, 165, 0, 4, 0, 0, 0}, // throne dog guard 1 - { 0 , 7, 257, 552, 408, 0, 70, 165, 0, 4, 0, 2, 2}, // throne dog guard 2 - { 0 , 7, 29, 0, 0, 0, 70, 165, 0, 4, 0, 0, 0}, // throne dog guard 3 - { 0 , 7, 29, 0, 0, 0, 70, 165, 0, 4, 0, 0, 0}, // throne dog guard 4 - { 0 , 7, 257, 712, 380, 0, 69, 164, 0, 4, 0, 4, 4}, // throne dog guard 5 - { 0 , 7, 29, 0, 0, 0, 69, 164, 0, 4, 0, 0, 0}, // throne dog guard 6 - { 0 , 7, 29, 0, 0, 0, 69, 164, 0, 4, 0, 0, 0}, // throne dog guard 7 - { 0 , 7, 29, 0, 0, 0, 69, 164, 0, 4, 0, 0, 0}, // throne dog guard 8 - { 0 , 7, 29, 0, 0, 0, 69, 164, 0, 4, 0, 0, 0}, // throne dog guard 9 - { 0 , 7, 0, 0, 0, 0, 69, 164, 0, 4, 0, 0, 0}, // throne dog guard 10 - { 0 , 7, 29, 0, 0, 0, 70, 165, 0, 4, 0, 0, 0}, // throne dog guard 11 - { 0 , 47, 30, 0, 0, 0, 102, 199, 1, 186, 0, 0, 0}, // old wolf ferryman - { 0 , 48, 69, 0, 0, 0, 109, 202, 35, 26, 0, 0, 0}, // cat village wildcat - { 0 , 49, 69, 0, 0, 0, 109, 202, 35, 26, 0, 0, 0}, // cat village attendant - { 0 , 50, 69, 0, 0, 0, 111, 203, 16, 67, 0, 0, 0}, // cat village Prowwa - { 0 , 51, 20, 0, 0, 0, 112, 204, 15, 26, 0, 0, 0}, // Prowwa hut Mirrhp - { 0 , 50, 20, 0, 0, 0, 111, 203, 14, 67, 0, 0, 0}, // Prowwa hut Prowwa - { 0 , 49, 20, 0, 0, 0, 109, 202, 35, 26, 0, 0, 0}, // Prowwa hut attendant - { 0 , 48, 256, 0, 0, 0, 109, 202, 35, 26, 0, 0, 0}, // wildcat sentry - { 0 , 21, 32, 0, 0, 0, 76, 171, 0, 171, 0, 0, 0}, // boar warrior 1 - { 0 , 21, 32, 0, 0, 0, 76, 171, 0, 171, 0, 0, 0}, // boar warrior 2 - { 0 , 21, 32, 0, 0, 0, 76, 171, 0, 171, 0, 0, 0}, // boar warrior 3 - { 0 , 52, 15, 152, 400, 0, 108, 168, 19, 48, 10, 2, 2}, // Alamma's voice - { 0 , 47, 251, 640, 360, 0, 113, 205, 5, 186, 10, 2, 2}, // ferry on ocean - { 0 , 41, 75, 152, 400, 0, 100, 197, 5, 81, 0, 0, 0}, // Shiala - { 0 , 44, 9, 0, 0, 0, 73, 160, 54, 112, 0, 0, 0}, // Prince (asleep) - { 0 , 0, 22, -20, -20, 0, 118, 209, 0, 171, 0, 0, 0}, // Rif and Eeah (at rockslide) - { 0 , 1, 22, 0, 0, 0, 119, 210, 0, 171, 0, 0, 0}, // Okk (at rockslide) - { 0 , 0, 22, -20, -20, 0, 118, 209, 0, 171, 0, 0, 0}, // Rif and Eeah (at rockslide w. rope) - { 0 , 1, 22, 0, 0, 0, 119, 210, 0, 171, 0, 0, 0}, // Okk (at rockslide w. rope) - { 0 , 53, 42, 640, 400, 0, 104, 201, 8, 141, 0, 0, 0}, // Kylas Honeyfoot - { 0 , 54, 21, -20, -20, 0, 120, 211, 48, 238, 0, 0, 0}, // Orb of Hands - { 0 , 0, 4, -20, -20, 0, 42, 140, 0, 1, 0, 0, 0}, // Rif (muddy) - { 0 , 26, 5, -20, -20, 27, 52, 148, 1, 5, 0, 4, 4}, // door rat (standing) - { 0 , 36, 4, -20, -20, 0, 116, 207, 0, 155, 0, 0, 0}, // boar with Rhene 1 - { 0 , 36, 0, -20, -20, 0, 117, 208, 0, 155, 0, 0, 0}, // boar with Rhene 2 - { 0 , 46, 252, -20, -20, 0, 74, 162, 29, 34, 0, 0, 0}, // dog jailer - { 0 , 0, 32, -20, -20, 0, 41, 137, 0, 1, 0, 0, 0}, // Rif (tourney) - { 0 , 0, 259, -20, -20, 0, 44, 138, 0, 1, 0, 0, 0}, // cliff rat - { 0 , 0, 5, -20, -20, 0, 43, 139, 0, 1, 0, 0, 0}, // Rif (cloaked) - { 0 , 0, 31, -20, -20, 0, 39, 136, 0, 1, 0, 0, 0}, // Rif (oak tree scene) - { 0 , 0, 252, -20, -20, 0, 39, 136, 0, 1, 0, 0, 0}, // Rif (jail cell scene) - { 0 , 0, 15, -20, -20, 0, 39, 136, 0, 1, 0, 0, 0}, // Rif (outside Alamma's) - { 0 , 0, 20, -20, -20, 0, 39, 136, 0, 1, 0, 0, 0}, // Rif (sick tent) - { 0 , 0, 25, -20, -20, 0, 39, 136, 0, 1, 0, 0, 0}, // Rif (gem room) - { 0 , 0, 272, -20, -20, 0, 40, 141, 0, 1, 0, 0, 0}, // Rif (dragon maze) - { 0 , 0, 50, -20, -20, 0, 39, 136, 0, 1, 0, 0, 0}, // Rif (boar entry gate) - { 0 , 50, 71, -20, -20, 0, 111, 203, 0, 67, 0, 0, 0}, // Prowwa (dog castle back) - { 0 , 50, 274, -20, -20, 0, 111, 203, 0, 67, 0, 0, 0}, // Prowwa (cat festival) - { 0 , 50, 274, -20, -20, 0, 110, 212, 0, 171, 0, 0, 0}, // cat festival dancer 1 - { 0 , 50, 274, -20, -20, 0, 110, 212, 0, 171, 0, 0, 0}, // cat festival dancer 2 - { 0 , 50, 274, -20, -20, 0, 110, 212, 0, 171, 0, 0, 0}, // cat festival dancer 3 - { 0 , 57, 272, 909, 909, 48, 121, 213, 0, 171, 0, 0, 0}, // komodo dragon - { 0 , 58, 15, -20, -20, 0, 122, 214, 0, 171, 0, 0, 0}, // letter from Elara - { 0 , 37, 246, -20, -20, 0, 97, 194, 0, 141, 0, 0, 0}, // Gar (wolves' cage) - { 0 , 38, 246, -20, -20, 0, 98, 195, 0, 27, 0, 0, 0}, // Wrah (wolves' cage) - { 0 , 59, 246, -20, -20, 0, 103, 200, 0, 26, 0, 0, 0}, // Chota (wolves' cage) - { 0 , 41, 245, -20, -20, 0, 100, 197, 0, 81, 0, 0, 0}, // Shiala (wolves' cage) - { 0 , 47, 250, 640, 360, 0, 114, 205, 0, 186, 10, 2, 2}, // ferry on ocean - { 0 , 0, 278, -20, -20, 0, 40, 141, 0, 1, 0, 0, 0}, // Rif (falling in tunnel trap door) - { 0 , 0, 272, -20, -20, 0, 40, 141, 0, 1, 0, 0, 0}, // Rif (falling in dragon maze) - { 0 , 41, 77, -20, -20, 0, 100, 197, 24, 81, 0, 0, 0}, // Shiala (grotto) - { 0 , 37, 261, -20, -20, 0, 97, 194, 0, 141, 0, 0, 0}, // Gar (ambush) - { 0 , 38, 261, -20, -20, 0, 98, 195, 0, 27, 0, 0, 0}, // Wrah (ambush) - { 0 , 39, 261, -20, -20, 0, 99, 196, 0, 5, 0, 0, 0}, // dark claw wolf (ambush) - { 0 , 39, 261, -20, -20, 0, 99, 196, 0, 5, 0, 0, 0}, // dark claw wolf (ambush) - { 0 , 39, 261, -20, -20, 0, 99, 196, 0, 5, 0, 0, 0}, // dark claw wolf (ambush) - { 0 , 39, 261, -20, -20, 0, 99, 196, 0, 5, 0, 0, 0}, // dark claw wolf (ambush) - { 0 , 59, 279, -20, -20, 0, 103, 200, 0, 26, 0, 0, 0}, // Chota (top of dam) - { 0 , 38, 279, -20, -20, 0, 98, 195, 0, 27, 0, 0, 0}, // Wrah (top of dam) - { 0 , 42, 77, -20, -20, 0, 101, 198, 25, 171, 0, 0, 0}, // Shiala's spear - { 0 , 59, 281, -20, -20, 0, 103, 200, 26, 26, 0, 0, 0}, // Chota (lab) - { 0 , 59, 279, -20, -20, 0, 123, 215, 0, 1, 0, 0, 0}, // Rif (finale) - { 0 , 59, 279, -20, -20, 0, 123, 215, 0, 132, 0, 0, 0}, // Okk (finale) - { 0 , 59, 279, -20, -20, 0, 123, 215, 0, 161, 0, 0, 0}, // Eeah (finale) - { 0 , 54, 279, -20, -20, 0, 120, 211, 0, 133, 0, 6, 6}, // Orb of Storms (top of dam) - { 0 , 44, 9, -20, -20, 0, 124, 161, 0, 171, 0, 6, 6}, // Prince's snores - { 0 , 7, 255, 588, 252, 0, 70, 165, 0, 3, 0, 2, 2}, // hall dog guard 1 - { 0 , 7, 255, 696, 252, 0, 70, 165, 0, 5, 0, 6, 6}, // hall dog guard 2 - { 0 , 36, 4, 0, 0, 0, 105, 142, 0, 155, 0, 0, 0}, // Rhene - { 0 , 44, 272, 1124, 1124, 120, 72, 159, 0, 112, 0, 0, 0}, // Prince (dragon maze) - { 0 , 7, 272, 1124, 1108, 120, 70, 165, 0, 4, 0, 0, 0}, // dog heckler 1 (dragon maze) - { 0 , 7, 272, 1108, 1124, 120, 70, 165, 0, 4, 0, 0, 0}, // dog heckler 2 (dragon maze) - { 0 , 29, 288, 508, 432, 0, 85, 187, 0, 112, 0, 4, 4}, // elk king (finale) - { 0 , 29, 0, 508, 432, 0, 84, 186, 0, 99, 0, 4, 4}, // crowd voice 1 (finale) - { 0 , 29, 0, 508, 432, 0, 84, 186, 0, 98, 0, 4, 4}, // crowd voice 2 (finale) - { 0 , 29, 0, 508, 432, 0, 84, 186, 0, 104, 0, 4, 4}, // crowd voice 3 (finale) - { 0 , 29, 0, 508, 432, 0, 84, 186, 0, 99, 0, 4, 4}, // crowd voice 4 (finale) - { 0 , 36, 288, 0, 0, 0, 105, 142, 0, 155, 0, 0, 0}, // Rhene (finale) - { 0 , 1, 27, -20, -20, 0, 47, 178, 0, 132, 0, 0, 0}, // Okk (temple gate) - { 0 , 1, 252, -20, -20, 0, 47, 178, 0, 132, 0, 0, 0}, // Okk (jail cell) - { 0 , 1, 25, -20, -20, 0, 47, 178, 0, 132, 0, 0, 0}, // Okk (gem room) - { 0 , 1, 259, -20, -20, 0, 47, 178, 0, 132, 0, 0, 0}, // Okk (cliff) - { 0 , 1, 279, -20, -20, 0, 47, 178, 0, 132, 0, 0, 0}, // Okk (dam top) - { 0 , 1, 273, -20, -20, 0, 47, 178, 0, 132, 0, 0, 0}, // Okk (human ruins) - { 0 , 1, 26, -20, -20, 0, 8, 178, 0, 171, 0, 0, 0}, // puzzle pieces - { 0 , 1, 0, -20, -20, 0, 0, 0, 0, 50, 0, 0, 0}, // poker dog 1 - { 0 , 1, 0, -20, -20, 0, 0, 0, 0, 82, 0, 0, 0}, // poker dog 2 - { 0 , 1, 0, -20, -20, 0, 0, 0, 0, 35, 0, 0, 0}, // poker dog 3 - { 0 , 9, 74, -20, -20, 0, 51, 145, 0, 5, 0, 0, 0} // sundial rat + // Original used so called permanent actors for first three and that was designed by + // EXTENDED object flag. They contained frames in more than one resource. We use + // different technique here see "Apppending to sprite list" in loadActorResources() + +// flags name scene x y z spr frm scp col +// ------------ ---- ---- ---- ----- ---- ---- ---- --- ---- -- -- -- + { kProtagonist, 0, 1, 0, 0, 0, 37, 135, 0, 1, 0, 0, 0}, // map party + // spr and frm numbers taken from permanent actors list + { kFollower, 1, 0, 0, 0, 0, 45, 177, 1, 132, 0, 0, 0}, // Okk + { kFollower, 2, 0, 0, 0, 0, 48, 143, 2, 161, 0, 0, 0}, // Eeah + { 0, 3, 0, 240, 480, 0, 115, 206, 0, 25, 0, 0, 0}, // albino ferret + { 0, 4, 17, 368, 400, 0, 115, 206, 4, 49, 0, 0, 0}, // moneychanger + { 0, 5, 11, 552, 412, 0, 54, 152, 1, 171, 0, 0, 0}, // Sist + { 0, 17, 2, 1192, 888, 0, 57, 153, 17, 49, 0, 0, 0}, // worker ferret 1 + { 0, 17, 2, 816, 1052, 0, 57, 153, 18, 49, 0, 0, 0}, // worker ferret 2 + { 0, 17, 2, 928, 932, 0, 58, 153, 19, 49, 0, 0, 0}, // worker ferret 3 + { 0, 17, 2, 1416, 1160, 0, 58, 153, 20, 49, 0, 0, 0}, // worker ferret 4 + { 0, 19, 49, 1592, 1336, 0, 92, 175, 15, 162, 0, 0, 0}, // faire merchant 1 (bear) + { 0, 20, 49, 744, 824, 0, 63, 156, 19, 112, 0, 4, 4}, // faire merchant 2 (ferret) + { 0, 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire merchant 3 + { 0, 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire merchant 4 + { 0, 9, 49, 1560, 1624, 0, 94, 147, 18, 132, 0, 4, 4}, // faire goer 1a (rat) + { 0, 56, 49, 1384, 792, 0, 95, 193, 20, 72, 0, 0, 0}, // faire goer 1b (otter) + { 0, 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire goer 2a + { 0, 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire goer 2b + { 0, 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire goer 3a + { 0, 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire goer 3b + { 0, 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire goer 4a + { 0, 19, 0, 1592, 1336, 0, 92, 175, 0, 171, 0, 0, 0}, // faire goer 4b + { 0, 18, 32, 764, 448, 0, 55, 150, 0, 48, 10, 4, 4}, // Scorry + { 0, 35, 32, 0, 0, 0, 56, 151, 0, 112, 0, 0, 0}, // grand puzzler + { 0, 36, 32, 0, 0, 0, 105, 142, 0, 155, 0, 0, 0}, // Rhene + { 0, 32, 32, 0, 0, 0, 91, 190, 0, 98, 0, 0, 0}, // elk captain + { 0, 31, 32, 0, 0, 0, 90, 189, 0, 171, 0, 0, 0}, // elk guard 1 + { 0, 31, 32, 0, 0, 0, 90, 189, 0, 171, 0, 0, 0}, // elk guard 2 + { 0, 31, 32, 0, 0, 0, 90, 189, 0, 171, 0, 0, 0}, // elk guard 3 + { 0, 31, 32, 0, 0, 0, 79, 172, 0, 18, 0, 0, 0}, // boar sergeant + { 0, 21, 50, 664, 400, 0, 76, 171, 2, 74, 0, 4, 4}, // boar sentry 1 + { 0, 21, 50, 892, 428, 0, 76, 171, 2, 74, 0, 4, 4}, // boar sentry 2 + { 0, 9, 51, 904, 936, 0, 51, 145, 35, 5, 0, 0, 0}, // hall rat 1 + { 0, 9, 51, 872, 840, 0, 51, 145, 36, 5, 0, 0, 0}, // hall rat 2 + { 0, 9, 51, 1432, 344, 0, 51, 145, 37, 5, 0, 0, 0}, // hall rat 3 + { 0, 9, 51, 664, 472, 0, 51, 145, 38, 5, 0, 0, 0}, // hall rat 4 + { 0, 10, 51, 1368, 1464, 0, 80, 146, 39, 147, 0, 0, 0}, // book rat 1 + { 0, 10, 51, 1416, 1624, 0, 80, 146, 40, 147, 0, 0, 0}, // book rat 2 + { 0, 10, 51, 1752, 120, 0, 80, 146, 41, 147, 0, 0, 0}, // book rat 3 + { 0, 10, 51, 984, 408, 0, 80, 146, 42, 147, 0, 0, 0}, // book rat 4 + { 0, 14, 52, 856, 376, 0, 82, 174, 8, 73, 0, 0, 0}, // grounds servant 1 + { 0, 14, 52, 808, 664, 0, 82, 174, 9, 73, 0, 0, 0}, // grounds servant 2 + { 0, 14, 52, 440, 568, 0, 82, 174, 10, 73, 0, 0, 0}, // grounds servant 3 + { 0, 14, 52, 392, 776, 0, 82, 174, 11, 73, 0, 0, 0}, // grounds servant 4 + { 0, 21, 4, 240, 384, 0, 79, 172, 0, 18, 0, 2, 2}, // boar sentry 3 (by doorway) + { 0, 23, 4, 636, 268, 0, 77, 173, 0, 74, 0, 4, 4}, // boar courtier + { 0, 22, 4, 900, 320, 0, 78, 179, 0, 60, 0, 4, 4}, // boar king + { 0, 14, 4, 788, 264, 0, 75, 170, 0, 171, 0, 2, 2}, // boar servant 1 + { 0, 14, 4, 1088, 264, 0, 75, 170, 0, 171, 0, 6, 6}, // boar servant 2 + { 0, 24, 19, 728, 396, 0, 65, 181, 47, 146, 0, 6, 6}, // glass master + { 0, 24, 21, -20, -20, 0, 66, 182, 0, 146, 0, 4, 4}, // glass master (with orb) + { kCycle, 25, 19, 372, 464, 0, 67, 183, 73, 146, 0, 2, 2}, // glass worker + { 0, 26, 5, 564, 476, 27, 53, 149, 1, 5, 0, 4, 4}, // door rat + { kCycle, 27, 31, 868, 344, 0, 81, 180, 0, 171, 0, 4, 4}, // bees + { 0, 28, 73, 568, 380, 0, 83, 176, 30, 120, 0, 4, 4}, // fortune teller + { 0, 14, 7, 808, 480, 0, 82, 174, 9, 73, 0, 0, 0}, // orb messenger + { 0, 29, 10, 508, 432, 0, 84, 186, 6, 112, 0, 4, 4}, // elk king + { 0, 33, 10, 676, 420, 0, 86, 184, 6, 171, 0, 4, 4}, // elk chancellor + { 0, 30, 10, 388, 452, 0, 88, 185, 6, 171, 0, 4, 4}, // elk courtier 1 + { 0, 30, 10, 608, 444, 0, 89, 185, 6, 171, 0, 4, 4}, // elk courtier 2 + { 0, 31, 10, 192, 468, 0, 90, 189, 6, 171, 0, 4, 4}, // elk throne guard 1 + { 0, 31, 10, 772, 432, 0, 90, 189, 6, 171, 0, 4, 4}, // elk throne guard 2 + { 0, 14, 10, 1340, 444, 0, 87, 188, 6, 171, 0, 4, 4}, // elk servant + { 0, 20, 18, 808, 360, 7, 60, 154, 64, 88, 0, 4, 4}, // hardware ferret + { 0, 34, 49, 1128, 1256, 0, 96, 191, 16, 35, 0, 4, 4}, // porcupine + { 0, 34, 49, 1384, 792, 0, 93, 192, 17, 66, 0, 4, 4}, // faire ram + { 0, 24, 21, 0, -40, 0, 65, 181, 50, 146, 0, 6, 6}, // glass master 2 + { 0, 3, 21, 0, -40, 0, 64, 158, 49, 112, 0, 0, 0}, // Sakka + { 0, 17, 21, 0, -40, 0, 62, 157, 74, 48, 0, 0, 0}, // lodge ferret 1 + { 0, 17, 21, 0, -40, 0, 62, 157, 74, 49, 0, 0, 0}, // lodge ferret 2 + { 0, 17, 21, 0, -40, 0, 62, 157, 74, 50, 0, 0, 0}, // lodge ferret 3 + { 0, 12, 244, 1056, 504, 0, 107, 167, 21, 124, 0, 6, 6}, // Elara + { 0, 8, 33, 248, 440, 0, 68, 169, 14, 112, 0, 0, 0}, // Tycho + { 0, 11, 23, 308, 424, 0, 106, 166, 6, 48, 0, 2, 2}, // Alamma + { 0, 17, 2, 1864, 1336, 0, 58, 153, 21, 49, 0, 0, 0}, // worker ferret 5 + { 0, 17, 2, 760, 216, 0, 58, 153, 22, 49, 0, 0, 0}, // worker ferret 6 + { 0, 44, 29, 0, 0, 0, 72, 159, 0, 112, 0, 0, 0}, // Prince + { 0, 45, 29, 0, 0, 0, 71, 163, 0, 146, 0, 6, 6}, // harem girl 1 + { 0, 45, 29, 0, 0, 0, 71, 163, 0, 124, 0, 2, 2}, // harem girl 2 + { 0, 45, 29, 0, 0, 0, 71, 163, 0, 169, 0, 0, 0}, // harem girl 3 + { 0, 7, 29, 0, 0, 0, 69, 164, 0, 4, 0, 0, 0}, // dog sergeant + { 0, 7, 29, 0, 0, 0, 70, 165, 0, 4, 0, 0, 0}, // throne dog guard 1 + { 0, 7, 257, 552, 408, 0, 70, 165, 0, 4, 0, 2, 2}, // throne dog guard 2 + { 0, 7, 29, 0, 0, 0, 70, 165, 0, 4, 0, 0, 0}, // throne dog guard 3 + { 0, 7, 29, 0, 0, 0, 70, 165, 0, 4, 0, 0, 0}, // throne dog guard 4 + { 0, 7, 257, 712, 380, 0, 69, 164, 0, 4, 0, 4, 4}, // throne dog guard 5 + { 0, 7, 29, 0, 0, 0, 69, 164, 0, 4, 0, 0, 0}, // throne dog guard 6 + { 0, 7, 29, 0, 0, 0, 69, 164, 0, 4, 0, 0, 0}, // throne dog guard 7 + { 0, 7, 29, 0, 0, 0, 69, 164, 0, 4, 0, 0, 0}, // throne dog guard 8 + { 0, 7, 29, 0, 0, 0, 69, 164, 0, 4, 0, 0, 0}, // throne dog guard 9 + { 0, 7, 0, 0, 0, 0, 69, 164, 0, 4, 0, 0, 0}, // throne dog guard 10 + { 0, 7, 29, 0, 0, 0, 70, 165, 0, 4, 0, 0, 0}, // throne dog guard 11 + { 0, 47, 30, 0, 0, 0, 102, 199, 1, 186, 0, 0, 0}, // old wolf ferryman + { 0, 48, 69, 0, 0, 0, 109, 202, 35, 26, 0, 0, 0}, // cat village wildcat + { 0, 49, 69, 0, 0, 0, 109, 202, 35, 26, 0, 0, 0}, // cat village attendant + { 0, 50, 69, 0, 0, 0, 111, 203, 16, 67, 0, 0, 0}, // cat village Prowwa + { 0, 51, 20, 0, 0, 0, 112, 204, 15, 26, 0, 0, 0}, // Prowwa hut Mirrhp + { 0, 50, 20, 0, 0, 0, 111, 203, 14, 67, 0, 0, 0}, // Prowwa hut Prowwa + { 0, 49, 20, 0, 0, 0, 109, 202, 35, 26, 0, 0, 0}, // Prowwa hut attendant + { 0, 48, 256, 0, 0, 0, 109, 202, 35, 26, 0, 0, 0}, // wildcat sentry + { 0, 21, 32, 0, 0, 0, 76, 171, 0, 171, 0, 0, 0}, // boar warrior 1 + { 0, 21, 32, 0, 0, 0, 76, 171, 0, 171, 0, 0, 0}, // boar warrior 2 + { 0, 21, 32, 0, 0, 0, 76, 171, 0, 171, 0, 0, 0}, // boar warrior 3 + { 0, 52, 15, 152, 400, 0, 108, 168, 19, 48, 10, 2, 2}, // Alamma's voice + { 0, 47, 251, 640, 360, 0, 113, 205, 5, 186, 10, 2, 2}, // ferry on ocean + { 0, 41, 75, 152, 400, 0, 100, 197, 5, 81, 0, 0, 0}, // Shiala + { 0, 44, 9, 0, 0, 0, 73, 160, 54, 112, 0, 0, 0}, // Prince (asleep) + { 0, 0, 22, -20, -20, 0, 118, 209, 0, 171, 0, 0, 0}, // Rif and Eeah (at rockslide) + { 0, 1, 22, 0, 0, 0, 119, 210, 0, 171, 0, 0, 0}, // Okk (at rockslide) + { 0, 0, 22, -20, -20, 0, 118, 209, 0, 171, 0, 0, 0}, // Rif and Eeah (at rockslide w. rope) + { 0, 1, 22, 0, 0, 0, 119, 210, 0, 171, 0, 0, 0}, // Okk (at rockslide w. rope) + { 0, 53, 42, 640, 400, 0, 104, 201, 8, 141, 0, 0, 0}, // Kylas Honeyfoot + { 0, 54, 21, -20, -20, 0, 120, 211, 48, 238, 0, 0, 0}, // Orb of Hands + { 0, 0, 4, -20, -20, 0, 42, 140, 0, 1, 0, 0, 0}, // Rif (muddy) + { 0, 26, 5, -20, -20, 27, 52, 148, 1, 5, 0, 4, 4}, // door rat (standing) + { 0, 36, 4, -20, -20, 0, 116, 207, 0, 155, 0, 0, 0}, // boar with Rhene 1 + { 0, 36, 0, -20, -20, 0, 117, 208, 0, 155, 0, 0, 0}, // boar with Rhene 2 + { 0, 46, 252, -20, -20, 0, 74, 162, 29, 34, 0, 0, 0}, // dog jailer + { 0, 0, 32, -20, -20, 0, 41, 137, 0, 1, 0, 0, 0}, // Rif (tourney) + { 0, 0, 259, -20, -20, 0, 44, 138, 0, 1, 0, 0, 0}, // cliff rat + { 0, 0, 5, -20, -20, 0, 43, 139, 0, 1, 0, 0, 0}, // Rif (cloaked) + { 0, 0, 31, -20, -20, 0, 39, 136, 0, 1, 0, 0, 0}, // Rif (oak tree scene) + { 0, 0, 252, -20, -20, 0, 39, 136, 0, 1, 0, 0, 0}, // Rif (jail cell scene) + { 0, 0, 15, -20, -20, 0, 39, 136, 0, 1, 0, 0, 0}, // Rif (outside Alamma's) + { 0, 0, 20, -20, -20, 0, 39, 136, 0, 1, 0, 0, 0}, // Rif (sick tent) + { 0, 0, 25, -20, -20, 0, 39, 136, 0, 1, 0, 0, 0}, // Rif (gem room) + { 0, 0, 272, -20, -20, 0, 40, 141, 0, 1, 0, 0, 0}, // Rif (dragon maze) + { 0, 0, 50, -20, -20, 0, 39, 136, 0, 1, 0, 0, 0}, // Rif (boar entry gate) + { 0, 50, 71, -20, -20, 0, 111, 203, 0, 67, 0, 0, 0}, // Prowwa (dog castle back) + { 0, 50, 274, -20, -20, 0, 111, 203, 0, 67, 0, 0, 0}, // Prowwa (cat festival) + { 0, 50, 274, -20, -20, 0, 110, 212, 0, 171, 0, 0, 0}, // cat festival dancer 1 + { 0, 50, 274, -20, -20, 0, 110, 212, 0, 171, 0, 0, 0}, // cat festival dancer 2 + { 0, 50, 274, -20, -20, 0, 110, 212, 0, 171, 0, 0, 0}, // cat festival dancer 3 + { 0, 57, 272, 909, 909, 48, 121, 213, 0, 171, 0, 0, 0}, // komodo dragon + { 0, 58, 15, -20, -20, 0, 122, 214, 0, 171, 0, 0, 0}, // letter from Elara + { 0, 37, 246, -20, -20, 0, 97, 194, 0, 141, 0, 0, 0}, // Gar (wolves' cage) + { 0, 38, 246, -20, -20, 0, 98, 195, 0, 27, 0, 0, 0}, // Wrah (wolves' cage) + { 0, 59, 246, -20, -20, 0, 103, 200, 0, 26, 0, 0, 0}, // Chota (wolves' cage) + { 0, 41, 245, -20, -20, 0, 100, 197, 0, 81, 0, 0, 0}, // Shiala (wolves' cage) + { 0, 47, 250, 640, 360, 0, 114, 205, 0, 186, 10, 2, 2}, // ferry on ocean + { 0, 0, 278, -20, -20, 0, 40, 141, 0, 1, 0, 0, 0}, // Rif (falling in tunnel trap door) + { 0, 0, 272, -20, -20, 0, 40, 141, 0, 1, 0, 0, 0}, // Rif (falling in dragon maze) + { 0, 41, 77, -20, -20, 0, 100, 197, 24, 81, 0, 0, 0}, // Shiala (grotto) + { 0, 37, 261, -20, -20, 0, 97, 194, 0, 141, 0, 0, 0}, // Gar (ambush) + { 0, 38, 261, -20, -20, 0, 98, 195, 0, 27, 0, 0, 0}, // Wrah (ambush) + { 0, 39, 261, -20, -20, 0, 99, 196, 0, 5, 0, 0, 0}, // dark claw wolf (ambush) + { 0, 39, 261, -20, -20, 0, 99, 196, 0, 5, 0, 0, 0}, // dark claw wolf (ambush) + { 0, 39, 261, -20, -20, 0, 99, 196, 0, 5, 0, 0, 0}, // dark claw wolf (ambush) + { 0, 39, 261, -20, -20, 0, 99, 196, 0, 5, 0, 0, 0}, // dark claw wolf (ambush) + { 0, 59, 279, -20, -20, 0, 103, 200, 0, 26, 0, 0, 0}, // Chota (top of dam) + { 0, 38, 279, -20, -20, 0, 98, 195, 0, 27, 0, 0, 0}, // Wrah (top of dam) + { 0, 42, 77, -20, -20, 0, 101, 198, 25, 171, 0, 0, 0}, // Shiala's spear + { 0, 59, 281, -20, -20, 0, 103, 200, 26, 26, 0, 0, 0}, // Chota (lab) + { 0, 59, 279, -20, -20, 0, 123, 215, 0, 1, 0, 0, 0}, // Rif (finale) + { 0, 59, 279, -20, -20, 0, 123, 215, 0, 132, 0, 0, 0}, // Okk (finale) + { 0, 59, 279, -20, -20, 0, 123, 215, 0, 161, 0, 0, 0}, // Eeah (finale) + { 0, 54, 279, -20, -20, 0, 120, 211, 0, 133, 0, 6, 6}, // Orb of Storms (top of dam) + { 0, 44, 9, -20, -20, 0, 124, 161, 0, 171, 0, 6, 6}, // Prince's snores + { 0, 7, 255, 588, 252, 0, 70, 165, 0, 3, 0, 2, 2}, // hall dog guard 1 + { 0, 7, 255, 696, 252, 0, 70, 165, 0, 5, 0, 6, 6}, // hall dog guard 2 + { 0, 36, 4, 0, 0, 0, 105, 142, 0, 155, 0, 0, 0}, // Rhene + { 0, 44, 272, 1124, 1124, 120, 72, 159, 0, 112, 0, 0, 0}, // Prince (dragon maze) + { 0, 7, 272, 1124, 1108, 120, 70, 165, 0, 4, 0, 0, 0}, // dog heckler 1 (dragon maze) + { 0, 7, 272, 1108, 1124, 120, 70, 165, 0, 4, 0, 0, 0}, // dog heckler 2 (dragon maze) + { 0, 29, 288, 508, 432, 0, 85, 187, 0, 112, 0, 4, 4}, // elk king (finale) + { 0, 29, 0, 508, 432, 0, 84, 186, 0, 99, 0, 4, 4}, // crowd voice 1 (finale) + { 0, 29, 0, 508, 432, 0, 84, 186, 0, 98, 0, 4, 4}, // crowd voice 2 (finale) + { 0, 29, 0, 508, 432, 0, 84, 186, 0, 104, 0, 4, 4}, // crowd voice 3 (finale) + { 0, 29, 0, 508, 432, 0, 84, 186, 0, 99, 0, 4, 4}, // crowd voice 4 (finale) + { 0, 36, 288, 0, 0, 0, 105, 142, 0, 155, 0, 0, 0}, // Rhene (finale) + { 0, 1, 27, -20, -20, 0, 47, 178, 0, 132, 0, 0, 0}, // Okk (temple gate) + { 0, 1, 252, -20, -20, 0, 47, 178, 0, 132, 0, 0, 0}, // Okk (jail cell) + { 0, 1, 25, -20, -20, 0, 47, 178, 0, 132, 0, 0, 0}, // Okk (gem room) + { 0, 1, 259, -20, -20, 0, 47, 178, 0, 132, 0, 0, 0}, // Okk (cliff) + { 0, 1, 279, -20, -20, 0, 47, 178, 0, 132, 0, 0, 0}, // Okk (dam top) + { 0, 1, 273, -20, -20, 0, 47, 178, 0, 132, 0, 0, 0}, // Okk (human ruins) + { 0, 1, 26, -20, -20, 0, 8, 178, 0, 171, 0, 0, 0}, // puzzle pieces + { 0, 1, 0, -20, -20, 0, 0, 0, 0, 50, 0, 0, 0}, // poker dog 1 + { 0, 1, 0, -20, -20, 0, 0, 0, 0, 82, 0, 0, 0}, // poker dog 2 + { 0, 1, 0, -20, -20, 0, 0, 0, 0, 35, 0, 0, 0}, // poker dog 3 + { 0, 9, 74, -20, -20, 0, 51, 145, 0, 5, 0, 0, 0} // sundial rat }; } // End of namespace Saga diff --git a/saga/script.h b/saga/script.h index 1b1036bed6..a6c617fde6 100644 --- a/saga/script.h +++ b/saga/script.h @@ -344,9 +344,9 @@ private: int sfScriptWalk(SCRIPTFUNC_PARAMS); int sfCycleFrames(SCRIPTFUNC_PARAMS); int sfSetFrame(SCRIPTFUNC_PARAMS); - int SF_setRightPortrait(SCRIPTFUNC_PARAMS); - int SF_setLeftPortrait(SCRIPTFUNC_PARAMS); - int SF_linkAnim(SCRIPTFUNC_PARAMS); + int sfSetPortrait(SCRIPTFUNC_PARAMS); + int sfSetProtagPortrait(SCRIPTFUNC_PARAMS); + int sfChainBgdAnim(SCRIPTFUNC_PARAMS); int SF_scriptSpecialWalk(SCRIPTFUNC_PARAMS); int sfPlaceActor(SCRIPTFUNC_PARAMS); int SF_checkUserInterrupt(SCRIPTFUNC_PARAMS); @@ -368,19 +368,19 @@ private: int SF_getActorX(SCRIPTFUNC_PARAMS); int SF_getActorY(SCRIPTFUNC_PARAMS); int SF_eraseDelta(SCRIPTFUNC_PARAMS); - int SF_playMusic(SCRIPTFUNC_PARAMS); + int sfPlayMusic(SCRIPTFUNC_PARAMS); int SF_pickClimbOutPos(SCRIPTFUNC_PARAMS); int SF_tossRif(SCRIPTFUNC_PARAMS); int SF_showControls(SCRIPTFUNC_PARAMS); int SF_showMap(SCRIPTFUNC_PARAMS); int SF_puzzleWon(SCRIPTFUNC_PARAMS); - int SF_enableEscape(SCRIPTFUNC_PARAMS); - int SF_playSound(SCRIPTFUNC_PARAMS); + int sfEnableEscape(SCRIPTFUNC_PARAMS); + int sfPlaySound(SCRIPTFUNC_PARAMS); int SF_playLoopedSound(SCRIPTFUNC_PARAMS); int SF_getDeltaFrame(SCRIPTFUNC_PARAMS); int SF_showProtect(SCRIPTFUNC_PARAMS); int SF_protectResult(SCRIPTFUNC_PARAMS); - int SF_rand(SCRIPTFUNC_PARAMS); + int sfRand(SCRIPTFUNC_PARAMS); int SF_fadeMusic(SCRIPTFUNC_PARAMS); int SF_playVoice(SCRIPTFUNC_PARAMS); }; diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp index 55e0eae7ab..20f7d5de1e 100644 --- a/saga/sfuncs.cpp +++ b/saga/sfuncs.cpp @@ -86,9 +86,9 @@ void Script::setupScriptFuncList(void) { OPCODE(sfScriptWalk), OPCODE(sfCycleFrames), OPCODE(sfSetFrame), - OPCODE(SF_setRightPortrait), - OPCODE(SF_setLeftPortrait), - OPCODE(SF_linkAnim), + OPCODE(sfSetPortrait), + OPCODE(sfSetProtagPortrait), + OPCODE(sfChainBgdAnim), OPCODE(SF_scriptSpecialWalk), OPCODE(sfPlaceActor), OPCODE(SF_checkUserInterrupt), @@ -110,19 +110,19 @@ void Script::setupScriptFuncList(void) { OPCODE(SF_getActorX), OPCODE(SF_getActorY), OPCODE(SF_eraseDelta), - OPCODE(SF_playMusic), + OPCODE(sfPlayMusic), OPCODE(SF_pickClimbOutPos), OPCODE(SF_tossRif), OPCODE(SF_showControls), OPCODE(SF_showMap), OPCODE(SF_puzzleWon), - OPCODE(SF_enableEscape), - OPCODE(SF_playSound), + OPCODE(sfEnableEscape), + OPCODE(sfPlaySound), OPCODE(SF_playLoopedSound), OPCODE(SF_getDeltaFrame), OPCODE(SF_showProtect), OPCODE(SF_protectResult), - OPCODE(SF_rand), + OPCODE(sfRand), OPCODE(SF_fadeMusic), OPCODE(SF_playVoice) }; @@ -320,13 +320,15 @@ int Script::SF_faceTowards(SCRIPTFUNC_PARAMS) { // Param1: actor id // Param2: target object int Script::sfSetFollower(SCRIPTFUNC_PARAMS) { - uint16 actorId; - uint16 targetObject; + int16 actorId; + int16 targetObject; ActorData *actor; actorId = getSWord(thread->pop()); targetObject = getSWord(thread->pop()); + + debug(1, "sfSetFollower(%d, %d) [%d]", actorId, targetObject, ACTOR_ID_TO_INDEX(actorId)); actor = _vm->_actor->getActor(actorId); actor->targetObject = targetObject; @@ -775,7 +777,7 @@ int Script::sfSetFrame(SCRIPTFUNC_PARAMS) { // Script function #39 (0x27) // Sets the right-hand portrait -int Script::SF_setRightPortrait(SCRIPTFUNC_PARAMS) { +int Script::sfSetPortrait(SCRIPTFUNC_PARAMS) { ScriptDataWord param = thread->pop(); return _vm->_interface->setRightPortrait(param); @@ -783,7 +785,7 @@ int Script::SF_setRightPortrait(SCRIPTFUNC_PARAMS) { // Script function #40 (0x28) // Sets the left-hand portrait -int Script::SF_setLeftPortrait(SCRIPTFUNC_PARAMS) { +int Script::sfSetProtagPortrait(SCRIPTFUNC_PARAMS) { ScriptDataWord param = thread->pop(); return _vm->_interface->setLeftPortrait(param); @@ -796,28 +798,20 @@ int Script::SF_setLeftPortrait(SCRIPTFUNC_PARAMS) { // Param2: total linked frame count // Param3: animation id link target // Param4: animation id link source -int Script::SF_linkAnim(SCRIPTFUNC_PARAMS) { - ScriptDataWord timer_parm; - ScriptDataWord tframes_parm; - ScriptDataWord anim1_parm; - ScriptDataWord anim2_parm; - int tframes; - uint16 anim_id1; - uint16 anim_id2; - - anim1_parm = thread->pop(); - anim2_parm = thread->pop(); - tframes_parm = thread->pop(); - timer_parm = thread->pop(); - tframes = getSWord(tframes_parm); - anim_id1 = getUWord(anim1_parm); - anim_id2 = getUWord(anim2_parm); - - if (_vm->_anim->link(anim_id1, anim_id2) != SUCCESS) { - _vm->_console->DebugPrintf(S_WARN_PREFIX "SF.41: Anim::link() failed. (%u->%u)\n", anim_id1, anim_id2); - return FAILURE; +int Script::sfChainBgdAnim(SCRIPTFUNC_PARAMS) { + int animId1 = getSWord(thread->pop()); + int animId = getSWord(thread->pop()); + int cycles = getSWord(thread->pop()); + int speed = getSWord(thread->pop()); + + if (speed >= 0) { + _vm->_anim->setCycles(animId, cycles); + _vm->_anim->stop(animId); + _vm->_anim->setFrameTime(animId, ticksToMSec(speed)); } + _vm->_anim->link(animId1, animId); + debug(1, "sfChainBgdAnim(%d, %d, %d, %d)", animId1, animId, cycles, speed); return SUCCESS; } @@ -1105,7 +1099,7 @@ int Script::SF_eraseDelta(SCRIPTFUNC_PARAMS) { } // Script function #63 (0x3F) -int Script::SF_playMusic(SCRIPTFUNC_PARAMS) { +int Script::sfPlayMusic(SCRIPTFUNC_PARAMS) { ScriptDataWord param = thread->pop() + 9; if (param >= 9 && param <= 34) @@ -1162,7 +1156,7 @@ int Script::SF_puzzleWon(SCRIPTFUNC_PARAMS) { } // Script function #69 (0x45) -int Script::SF_enableEscape(SCRIPTFUNC_PARAMS) { +int Script::sfEnableEscape(SCRIPTFUNC_PARAMS) { if (thread->pop()) _abortEnabled = true; else { @@ -1245,7 +1239,7 @@ static struct { }; // Script function #70 (0x46) -int Script::SF_playSound(SCRIPTFUNC_PARAMS) { +int Script::sfPlaySound(SCRIPTFUNC_PARAMS) { ScriptDataWord param = thread->pop() - 13; if (/* param >= 0 && */ param < ARRAYSIZE(sfxTable)) @@ -1293,7 +1287,7 @@ int Script::SF_protectResult(SCRIPTFUNC_PARAMS) { } // Script function #75 (0x4d) -int Script::SF_rand(SCRIPTFUNC_PARAMS) { +int Script::sfRand(SCRIPTFUNC_PARAMS) { ScriptDataWord param = thread->pop(); thread->retVal = (_vm->_rnd.getRandomNumber(param)); -- cgit v1.2.3