diff options
author | Kamil Zbróg | 2013-12-02 12:45:34 +0000 |
---|---|---|
committer | Kamil Zbróg | 2013-12-02 12:45:34 +0000 |
commit | f19f61a56da04e0dbd6e46ff9a303fdfb68d8390 (patch) | |
tree | b10cbf38568e8cace510308ce0893541719ee775 /engines | |
parent | 0f013bf6e1bed6a1e18aa1a4ea16ed1c0105f33d (diff) | |
parent | ccc92b2e707643915efc575cd43fdd11169dc733 (diff) | |
download | scummvm-rg350-f19f61a56da04e0dbd6e46ff9a303fdfb68d8390.tar.gz scummvm-rg350-f19f61a56da04e0dbd6e46ff9a303fdfb68d8390.tar.bz2 scummvm-rg350-f19f61a56da04e0dbd6e46ff9a303fdfb68d8390.zip |
Merge remote-tracking branch 'sync/master' into prince-malik
Diffstat (limited to 'engines')
26 files changed, 2084 insertions, 1903 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 2e15423055..76739b6632 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -187,10 +187,12 @@ namespace Fullpipe { #define QU_EGTR_MD2_SHOW 4698 #define QU_EGTR_MD1_SHOW 4697 #define QU_EGTR_SLIMSHOW 4883 +#define QU_HND_TAKEBOTTLE 1443 #define QU_IN2_DO 5144 #define QU_INTR_FINISH 5138 #define QU_INTR_GETUPMAN 5136 #define QU_INTR_STARTINTRO 5133 +#define QU_KOZAW_WALK 505 #define QU_PNK_CLICK 550 #define QU_SC3_ENTERLIFT 2779 #define QU_SC3_EXITLIFT 2808 @@ -258,6 +260,7 @@ namespace Fullpipe { #define ST_EGTR_MID1 2863 #define ST_EGTR_MID2 2869 #define ST_EGTR_SLIM 336 +#define ST_HND_EMPTY 603 #define ST_IN1MAN_SLEEP 5112 #define ST_KZW_EMPTY 498 #define ST_LBN_0N 2832 diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 63dde5042b..00d2863c94 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -142,6 +142,7 @@ public: void toggleMute(); void playSound(int id, int flag); void startSceneTrack(); + void stopSoundStream2(); int _sfxVolume; diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 2e89bd6003..fba7e402d2 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -464,6 +464,8 @@ Picture::~Picture() { } void Picture::freePicture() { + debug(5, "Picture::freePicture(): file: %s", _memfilename); + if (_bitmap) { if (testFlags() && !_field_54) { freeData(); @@ -519,7 +521,7 @@ bool Picture::load(MfcArchive &file) { getData(); - debug(5, "Picture::load: <%s>", _memfilename); + debug(5, "Picture::load: loaded <%s>", _memfilename); return true; } @@ -539,6 +541,10 @@ void Picture::setAOIDs() { } void Picture::init() { + debug(5, "Picture::init(), %s", _memfilename); + + MemoryObject::getData(); + _bitmap = new Bitmap(); getDibInfo(); @@ -567,6 +573,12 @@ void Picture::getDibInfo() { warning("Uneven data size: 0x%x", _dataSize); } + if (!_data) { + warning("Picture::getDibInfo: data is empty <%s>", _memfilename); + + MemoryObject::load(); + } + Common::MemoryReadStream *s = new Common::MemoryReadStream(_data + off - 32, 32); _bitmap->load(s); diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index c1977c0ac3..f67011a50f 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -765,7 +765,7 @@ MessageQueue *MovGraph2::buildMovInfo1MessageQueue(MovInfo1 *movInfo) { MessageQueue *mq2 = genMovement(&movinfo); - if (mq2) { + if (!mq2) { delete mq; return 0; } @@ -979,6 +979,8 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int if (minPath < 0.0 || ((linkInfoSource.node != linkInfoDest.node || !linkInfoSource.node) && !tempLinkList.size())) return 0; + memset(&movInfo1, 0, sizeof(movInfo1)); + movInfo1.subIndex = idxsub; movInfo1.pt1.x = obj->_ox; movInfo1.pt1.y = obj->_oy; diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 6771fe8ec8..014459e847 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -76,10 +76,13 @@ Vars::Vars() { scene04_sceneClickX = 0; scene04_sceneClickY = 0; + scene04_dudePosX = 0; + scene04_dudePosY = 0; + scene04_var01 = 0; scene04_var02 = 0; scene04_var04 = 0; - scene04_var05 = 0; + scene04_walkingKozyawka = 0; scene04_var06 = 0; scene04_var07 = 0; scene04_var08 = 0; @@ -90,12 +93,13 @@ Vars::Vars() { scene04_var13 = 0; scene04_var14 = 0; scene04_var15 = 0; - scene04_var16 = 0; - scene04_var17 = 0; + scene04_speakerVariant = 0; + scene04_speakerPhase = 0; scene04_var18 = 0; scene04_var19 = 0; scene04_var20 = 0; scene04_var24 = 0; + scene04_bottleY = 0; selector = 0; } diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h index 277beb0083..670b94a839 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -89,9 +89,9 @@ public: Common::Point scene04_jumpingKozyawki[20]; Common::Point scene04_jumpRotateKozyawki[20]; - Common::Array<StaticANIObject *> scene04_kozyawkiObjList; - Common::Array<GameObject *> scene04_bottleObjList; - Common::Array<StaticANIObject *> scene04_kozyawkiAni; + Common::List<StaticANIObject *> scene04_kozyawkiObjList; + Common::List<GameObject *> scene04_bottleObjList; + Common::List<StaticANIObject *> scene04_kozyawkiAni; int scene04_ladder; bool scene04_coinPut; @@ -105,7 +105,7 @@ public: int scene04_var01; int scene04_var02; int scene04_var04; - StaticANIObject *scene04_var05; + StaticANIObject *scene04_walkingKozyawka; int scene04_var06; int scene04_var07; int scene04_var08; @@ -116,12 +116,13 @@ public: int scene04_var13; int scene04_var14; int scene04_var15; - int scene04_var16; - int scene04_var17; + int scene04_speakerVariant; + int scene04_speakerPhase; int scene04_var18; int scene04_var19; int scene04_var20; StaticANIObject *scene04_var24; + int scene04_bottleY; PictureObject *selector; }; diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp index dab2131e04..d642ebfcd2 100644 --- a/engines/fullpipe/scenes/scene04.cpp +++ b/engines/fullpipe/scenes/scene04.cpp @@ -33,11 +33,31 @@ #include "fullpipe/interaction.h" #include "fullpipe/gameloader.h" #include "fullpipe/behavior.h" +#include "fullpipe/motion.h" namespace Fullpipe { -void scene04_callback(int *param) { - warning("STUB: scene04_callback"); +static const int scene04_speakerPhases[] = { + 0, 1, 2, 3, -1, -1, + 0, 2, 3, -1, -1, -1, + 0, 2, -1, -1, -1, -1 +}; + +void scene04_speakerCallback(int *phase) { + if (g_vars->scene04_soundPlaying) { + if (g_vars->scene04_speakerPhase >= 0) { + *phase = scene04_speakerPhases[g_vars->scene04_speakerPhase + 6 * g_vars->scene04_speakerVariant]; + + g_vars->scene04_speakerPhase++; + + if (scene04_speakerPhases[g_vars->scene04_speakerPhase + 6 * g_vars->scene04_speakerVariant] < 0) { + g_vars->scene04_speakerPhase = 0; + g_vars->scene04_speakerVariant = g_fullpipe->_rnd->getRandomNumber(2); + } + } else { + ++g_vars->scene04_speakerPhase; + } + } } void scene04_initScene(Scene *sc) { @@ -141,9 +161,9 @@ void scene04_initScene(Scene *sc) { } g_vars->scene04_var02 = 0; - g_vars->scene04_soundPlaying = 0; + g_vars->scene04_soundPlaying = false; g_vars->scene04_var04 = 0; - g_vars->scene04_var05 = 0; + g_vars->scene04_walkingKozyawka = 0; g_vars->scene04_var06 = 2; g_vars->scene04_dynamicPhaseIndex = 0; @@ -166,11 +186,11 @@ void scene04_initScene(Scene *sc) { g_vars->scene04_mamasha->hide(); g_vars->scene04_speaker = sc->getStaticANIObject1ById(ANI_SPEAKER_4, -1); - g_vars->scene04_speaker->_callback2 = scene04_callback; + g_vars->scene04_speaker->_callback2 = scene04_speakerCallback; g_vars->scene04_speaker->startAnim(MV_SPK4_PLAY, 0, -1); - g_vars->scene04_var16 = 0; - g_vars->scene04_var17 = 0; + g_vars->scene04_speakerVariant = 0; + g_vars->scene04_speakerPhase = 0; g_fullpipe->initArcadeKeys("SC_4"); } @@ -264,7 +284,30 @@ void sceneHandler04_clickPlank() { } void sceneHandler04_dropBottle() { - warning("sceneHandler04_dropBottle()"); + g_vars->scene04_var12 = 1; + g_vars->scene04_bottleY = 10; + g_vars->scene04_var06 = 0; + + while (g_vars->scene04_kozyawkiAni.size()) { + StaticANIObject *koz = g_vars->scene04_kozyawkiAni.front(); + g_vars->scene04_kozyawkiAni.pop_front(); + + for (Common::List<GameObject *>::iterator it = g_vars->scene04_bottleObjList.begin(); it != g_vars->scene04_bottleObjList.end(); ++it) + if (*it == koz) { + g_vars->scene04_bottleObjList.erase(it); + break; + } + + koz->queueMessageQueue(0); + koz->hide(); + + g_vars->scene04_kozyawkiObjList.push_back(koz); + } + + g_vars->scene04_hand->changeStatics2(ST_HND_EMPTY); + + g_vars->scene04_hand->setOXY(429, 21); + g_vars->scene04_hand->_priority = 15; } void sceneHandler04_gotoLadder(int par) { @@ -327,8 +370,15 @@ void sceneHandler04_sub1(ExCommand *ex) { g_fullpipe->_behaviorManager->setFlagByStaticAniObject(g_fullpipe->_aniMan, 1); } -void sceneHandler04_sub3() { - warning("sceneHandler04_sub3()"); +void sceneHandler04_walkKozyawka() { + if (g_vars->scene04_kozyawkiObjList.size()) { + g_vars->scene04_walkingKozyawka = g_vars->scene04_kozyawkiObjList.front(); + g_vars->scene04_kozyawkiObjList.pop_front(); + + MessageQueue *mq = new MessageQueue(g_fullpipe->_currentScene->getMessageQueueById(QU_KOZAW_WALK), 0, 1); + mq->replaceKeyCode(-1, g_vars->scene04_walkingKozyawka->_okeyCode); + mq->chain(0); + } } void sceneHandler04_sub4() { @@ -339,8 +389,36 @@ void sceneHandler04_sub5() { warning("sceneHandler04_sub5()"); } -void sceneHandler04_sub6() { - warning("sceneHandler04_sub6()"); +void sceneHandler04_bottleUpdateObjects(int off) { + for (Common::List<GameObject *>::iterator it = g_vars->scene04_bottleObjList.begin(); it != g_vars->scene04_bottleObjList.end(); ++it) { + GameObject *obj = *it; + + obj->setOXY(obj->_field_8 + 20, off + obj->_field_8 + 24); + } +} + +void sceneHandler04_liftBottle() { + int newy = g_vars->scene04_bottleY + g_vars->scene04_spring->_oy; + + g_vars->scene04_bottleY += 5; + + sceneHandler04_bottleUpdateObjects(newy - g_vars->scene04_spring->_oy); + + g_vars->scene04_spring->setOXY(g_vars->scene04_spring->_ox, newy); + + if (g_vars->scene04_bottle->_oy >= 226) { + sceneHandler04_bottleUpdateObjects(226 - g_vars->scene04_bottle->_oy); + + g_vars->scene04_spring->setOXY(g_vars->scene04_spring->_ox, 437); + g_vars->scene04_var12 = 0; + g_vars->scene04_var09 = 0; + g_vars->scene04_var19 = 1; + g_vars->scene04_var06 = 2; + g_vars->scene04_var20 = 10; + g_vars->scene04_var02 = 0; + + g_fullpipe->setObjectState(sO_LowerPipe, g_fullpipe->getObjectEnumState(sO_LowerPipe, sO_IsClosed)); + } } void sceneHandler04_sub7() { @@ -375,10 +453,6 @@ void sceneHandler04_testPlank(ExCommand *ex) { warning("sceneHandler04_testPlank()"); } -void sceneHandler04_bottleUpdateObjects(int off) { - warning("sceneHandler04_bottleUpdateObjects()"); -} - void sceneHandler04_updateBottle() { Common::Point point; @@ -397,7 +471,30 @@ void sceneHandler04_updateBottle() { } void sceneHandler04_winArcade() { - warning("sceneHandler04_winArcade()"); + if (g_fullpipe->getObjectState(sO_LowerPipe) == g_fullpipe->getObjectEnumState(sO_LowerPipe, sO_IsClosed) + && g_vars->scene04_soundPlaying) { + g_vars->scene04_clock->changeStatics2(ST_CLK_CLOSED); + g_vars->scene04_hand->changeStatics2(ST_HND_EMPTY); + + chainQueue(QU_HND_TAKEBOTTLE, 1); + + if (g_vars->scene04_walkingKozyawka) { + g_vars->scene04_kozyawkiObjList.push_back(g_vars->scene04_walkingKozyawka); + + g_vars->scene04_walkingKozyawka->changeStatics2(ST_KZW_EMPTY); + g_vars->scene04_walkingKozyawka->hide(); + g_vars->scene04_walkingKozyawka = 0; + } + + g_vars->scene04_var19 = 0; + g_vars->scene04_soundPlaying = 0; + + getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->setEnabled(); + + getGameLoaderInteractionController()->enableFlag24(); + + g_fullpipe->stopSoundStream2(); + } } int sceneHandler04(ExCommand *ex) { @@ -450,13 +547,14 @@ int sceneHandler04(ExCommand *ex) { break; case MSG_KOZAWRESTART: - if (g_vars->scene04_var05) { - g_vars->scene04_kozyawkiObjList.push_back(g_vars->scene04_var05); - g_vars->scene04_var05->hide(); - g_vars->scene04_var05 = 0; + if (g_vars->scene04_walkingKozyawka) { + g_vars->scene04_kozyawkiObjList.push_back(g_vars->scene04_walkingKozyawka); + g_vars->scene04_walkingKozyawka->hide(); + g_vars->scene04_walkingKozyawka = 0; } + if (g_vars->scene04_soundPlaying) - sceneHandler04_sub3(); + sceneHandler04_walkKozyawka(); break; @@ -507,7 +605,7 @@ int sceneHandler04(ExCommand *ex) { sceneHandler04_sub5(); if (g_vars->scene04_var12) - sceneHandler04_sub6(); + sceneHandler04_liftBottle(); if (g_vars->scene04_var08) sceneHandler04_clickLadder(); diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index 6da848a621..b4a864d164 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -135,6 +135,9 @@ void global_messageHandler_handleSound(ExCommand *cmd) { debug(0, "STUB: global_messageHandler_handleSound()"); } +void FullpipeEngine::stopSoundStream2() { + warning("STUB: FullpipeEngine::stopSoundStream2()"); +} } // End of namespace Fullpipe diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index c86d5abd08..b82875f638 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -152,15 +152,19 @@ StaticANIObject::StaticANIObject(StaticANIObject *src) : GameObject(src) { _statics = 0; for (uint i = 0; i < src->_movements.size(); i++) { - Movement *mov; - if (((Movement *)src->_movements[i])->_currMovement) { - mov = new Movement(getMovementById(src->getMovementIdById(((Movement *)src->_movements[i])->_id)), this); - mov->_id = ((Movement *)src->_movements[i])->_id; + Movement *newmov; + Movement *mov = (Movement *)src->_movements[i]; + + if (mov->_currMovement) { + // WORKAROUND: Original uses weird construction here: + // new Movement(getMovementById(src->getMovementIdById(mov->_id)), this); + newmov = new Movement(src->getMovementById(src->getMovementIdById(mov->_id)), this); + newmov->_id = mov->_id; } else { - mov = new Movement(((Movement *)src->_movements[i]), 0, -1, this); + newmov = new Movement(mov, 0, -1, this); } - _movements.push_back(mov); + _movements.push_back(newmov); } } @@ -1231,7 +1235,7 @@ Movement::Movement(Movement *src, int *oldIdxs, int newSize, StaticANIObject *an _m2y = src->_m2y; if (newSize != -1) { - if (newSize >= src->_dynamicPhases.size() + 1) + if (newSize >= (int)src->_dynamicPhases.size() + 1) newSize = src->_dynamicPhases.size() + 1; } else { newSize = src->_dynamicPhases.size(); diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 3304a93667..3a65801951 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -148,7 +148,16 @@ bool MemoryObject::load(MfcArchive &file) { void MemoryObject::loadFile(char *filename) { debug(5, "MemoryObject::loadFile(<%s>)", filename); + + if (!*filename) + return; + if (!_data) { + NGIArchive *arr = g_fullpipe->_currArchive; + + if (g_fullpipe->_currArchive != _libHandle && _libHandle) + g_fullpipe->_currArchive = _libHandle; + Common::SeekableReadStream *s = g_fullpipe->_currArchive->createReadStreamForMember(filename); if (s) { @@ -161,7 +170,11 @@ void MemoryObject::loadFile(char *filename) { s->read(_data, _dataSize); delete s; + } else { + warning("MemoryObject::loadFile(): reading failure"); } + + g_fullpipe->_currArchive = arr; } } @@ -181,6 +194,8 @@ byte *MemoryObject::loadData() { } void MemoryObject::freeData() { + debug(8, "MemoryObject::freeData(): file: %s", _memfilename); + if (_data) free(_data); diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 170ca0993c..aa7e60930a 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -1223,8 +1223,8 @@ const char *ScummMetaEngine::getOriginalCopyright() const { } namespace Scumm { - extern bool getSavegameName(Common::InSaveFile *in, Common::String &desc, int heversion); -} +bool getSavegameName(Common::InSaveFile *in, Common::String &desc, int heversion); +} // End of namespace Scumm int ScummMetaEngine::getMaximumSaveSlot() const { return 99; } @@ -1262,25 +1262,21 @@ void ScummMetaEngine::removeSaveState(const char *target, int slot) const { } SaveStateDescriptor ScummMetaEngine::querySaveMetaInfos(const char *target, int slot) const { - Common::String filename = ScummEngine::makeSavegameName(target, slot, false); - Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename); - - if (!in) - return SaveStateDescriptor(); - Common::String saveDesc; - Scumm::getSavegameName(in, saveDesc, 0); // FIXME: heversion?!? - delete in; + Graphics::Surface *thumbnail = nullptr; + SaveStateMetaInfos infos; + memset(&infos, 0, sizeof(infos)); + SaveStateMetaInfos *infoPtr = &infos; - // TODO: Cleanup - Graphics::Surface *thumbnail = ScummEngine::loadThumbnailFromSlot(target, slot); + // FIXME: heversion?!? + if (!ScummEngine::querySaveMetaInfos(target, slot, 0, saveDesc, thumbnail, infoPtr)) { + return SaveStateDescriptor(); + } SaveStateDescriptor desc(slot, saveDesc); desc.setThumbnail(thumbnail); - SaveStateMetaInfos infos; - memset(&infos, 0, sizeof(infos)); - if (ScummEngine::loadInfosFromSlot(target, slot, &infos)) { + if (infoPtr) { int day = (infos.date >> 24) & 0xFF; int month = (infos.date >> 16) & 0xFF; int year = infos.date & 0xFFFF; diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index 8170a032d9..5197e07819 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -634,100 +634,83 @@ bool ScummEngine::getSavegameName(int slot, Common::String &desc) { return result; } -bool getSavegameName(Common::InSaveFile *in, Common::String &desc, int heversion) { - SaveGameHeader hdr; - +namespace { +bool loadAndCheckSaveGameHeader(Common::InSaveFile *in, int heversion, SaveGameHeader &hdr, Common::String *error = nullptr) { if (!loadSaveGameHeader(in, hdr)) { - desc = "Invalid savegame"; + if (error) { + *error = "Invalid savegame"; + } return false; } - if (hdr.ver > CURRENT_VER) + if (hdr.ver > CURRENT_VER) { hdr.ver = TO_LE_32(hdr.ver); + } + if (hdr.ver < VER(7) || hdr.ver > CURRENT_VER) { - desc = "Invalid version"; + if (error) { + *error = "Invalid version"; + } return false; } // We (deliberately) broke HE savegame compatibility at some point. if (hdr.ver < VER(57) && heversion >= 60) { - desc = "Unsupported version"; + if (error) { + *error = "Unsupported version"; + } return false; } hdr.name[sizeof(hdr.name) - 1] = 0; - desc = hdr.name; return true; } +} // End of anonymous namespace -Graphics::Surface *ScummEngine::loadThumbnailFromSlot(const char *target, int slot) { - Common::SeekableReadStream *in; +bool getSavegameName(Common::InSaveFile *in, Common::String &desc, int heversion) { SaveGameHeader hdr; - if (slot < 0) - return 0; - - Common::String filename = ScummEngine::makeSavegameName(target, slot, false); - if (!(in = g_system->getSavefileManager()->openForLoading(filename))) { - return 0; - } - - if (!loadSaveGameHeader(in, hdr)) { - delete in; - return 0; + if (!loadAndCheckSaveGameHeader(in, heversion, hdr, &desc)) { + return false; } - if (hdr.ver > CURRENT_VER) - hdr.ver = TO_LE_32(hdr.ver); - if (hdr.ver < VER(52)) { - delete in; - return 0; - } + desc = hdr.name; + return true; +} - Graphics::Surface *thumb = 0; - if (Graphics::checkThumbnailHeader(*in)) { - thumb = Graphics::loadThumbnail(*in); +bool ScummEngine::querySaveMetaInfos(const char *target, int slot, int heversion, Common::String &desc, Graphics::Surface *&thumbnail, SaveStateMetaInfos *&timeInfos) { + if (slot < 0) { + return false; } - delete in; - return thumb; -} - -bool ScummEngine::loadInfosFromSlot(const char *target, int slot, SaveStateMetaInfos *stuff) { - Common::SeekableReadStream *in; SaveGameHeader hdr; + const Common::String filename = ScummEngine::makeSavegameName(target, slot, false); + Common::ScopedPtr<Common::SeekableReadStream> in(g_system->getSavefileManager()->openForLoading(filename)); - if (slot < 0) - return 0; - - Common::String filename = makeSavegameName(target, slot, false); - if (!(in = g_system->getSavefileManager()->openForLoading(filename))) { + if (!in) { return false; } - if (!loadSaveGameHeader(in, hdr)) { - delete in; + if (!loadAndCheckSaveGameHeader(in.get(), heversion, hdr)) { return false; } - if (hdr.ver > CURRENT_VER) - hdr.ver = TO_LE_32(hdr.ver); - if (hdr.ver < VER(56)) { - delete in; - return false; - } + desc = hdr.name; - if (!Graphics::skipThumbnail(*in)) { - delete in; - return false; - } + if (hdr.ver > VER(52)) { + if (Graphics::checkThumbnailHeader(*in)) { + thumbnail = Graphics::loadThumbnail(*in); + } - if (!loadInfos(in, stuff)) { - delete in; - return false; + if (hdr.ver > VER(57)) { + if (!loadInfos(in.get(), timeInfos)) { + return false; + } + } else { + timeInfos = nullptr; + } } - delete in; return true; } @@ -781,7 +764,7 @@ bool ScummEngine::loadInfos(Common::SeekableReadStream *file, SaveStateMetaInfos return true; } -void ScummEngine::saveInfos(Common::WriteStream* file) { +void ScummEngine::saveInfos(Common::WriteStream *file) { SaveInfoSection section; section.type = MKTAG('I','N','F','O'); section.version = INFOSECTION_VERSION; diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index ca05c90936..f192a1e256 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -620,15 +620,10 @@ public: // thumbnail + info stuff public: - Graphics::Surface *loadThumbnailFromSlot(int slot) { - return loadThumbnailFromSlot(_targetName.c_str(), slot); - } - static Graphics::Surface *loadThumbnailFromSlot(const char *target, int slot); - - static bool loadInfosFromSlot(const char *target, int slot, SaveStateMetaInfos *stuff); + static bool querySaveMetaInfos(const char *target, int slot, int heversion, Common::String &desc, Graphics::Surface *&thumbnail, SaveStateMetaInfos *&timeInfos); protected: - void saveInfos(Common::WriteStream* file); + void saveInfos(Common::WriteStream *file); static bool loadInfos(Common::SeekableReadStream *file, SaveStateMetaInfos *stuff); protected: diff --git a/engines/tsage/blue_force/blueforce_logic.h b/engines/tsage/blue_force/blueforce_logic.h index c6c6dc6315..0045980820 100644 --- a/engines/tsage/blue_force/blueforce_logic.h +++ b/engines/tsage/blue_force/blueforce_logic.h @@ -145,7 +145,7 @@ public: virtual Common::String getClassName() { return "NamedObject2"; } virtual void synchronize(Serializer &s) { NamedObject::synchronize(s); - if (s.getVersion() < 11) { + if (s.getVersion() < 12) { int useless = 0; s.syncAsSint16LE(useless); } diff --git a/engines/tsage/blue_force/blueforce_scenes4.cpp b/engines/tsage/blue_force/blueforce_scenes4.cpp index 072761b5ac..e4a349bc93 100644 --- a/engines/tsage/blue_force/blueforce_scenes4.cpp +++ b/engines/tsage/blue_force/blueforce_scenes4.cpp @@ -136,11 +136,11 @@ void Scene410::Action5::signal() { switch (_actionIndex++) { case 0: - if (scene->_harrisonMovedFl == 0) { + if (!scene->_harrisonMovedFl) { ADD_PLAYER_MOVER(114, 133); } else { ADD_PLAYER_MOVER(195, 139); - } + } break; case 1: BF_GLOBALS._player.updateAngle(scene->_passenger._position); @@ -167,7 +167,7 @@ void Scene410::Action6::signal() { switch (_actionIndex++) { case 0: - if (scene->_harrisonMovedFl == 0) { + if (!scene->_harrisonMovedFl) { ADD_PLAYER_MOVER(114, 133); } else { ADD_PLAYER_MOVER(126, 99); @@ -243,7 +243,7 @@ bool Scene410::Motorcycle::startAction(CursorType action, Event &event) { } else if (BF_GLOBALS.getFlag(fSearchedTruck) && !BF_GLOBALS._sceneObjects->contains(&scene->_harrison)) { scene->_sceneMode = 4103; scene->signal(); - } else if (scene->_cuffedDriverFl != 0) { + } else if (scene->_cuffedDriverFl) { SceneItem::display2(410, 12); } else { scene->_sceneMode = 4103; @@ -260,7 +260,7 @@ bool Scene410::TruckFront::startAction(CursorType action, Event &event) { switch (action) { case CURSOR_USE: - if ((BF_GLOBALS._bookmark < bStoppedFrankie) && (!scene->_cuffedDriverFl || !scene->_field1FBA)) + if ((BF_GLOBALS._bookmark < bStoppedFrankie) && (!scene->_cuffedDriverFl || !scene->_harrissonTalkFl)) break; else if (BF_GLOBALS.getFlag(fSearchedTruck)) SceneItem::display2(410, 13); @@ -297,7 +297,7 @@ bool Scene410::Driver::startAction(CursorType action, Event &event) { SceneItem::display2(410, 7); } else if (!scene->_field1FC0) { scene->_sceneMode = 4124; - scene->_field1FC0 = 1; + scene->_field1FC0 = true; T2_GLOBALS._uiElements.addScore(30); scene->signal(); } else { @@ -309,13 +309,13 @@ bool Scene410::Driver::startAction(CursorType action, Event &event) { return true; case INV_HANDCUFFS: if (BF_GLOBALS.getFlag(fCalledBackup)) { - if ((scene->_talkCount < 5) || (scene->_action1Count < 1) || (scene->_cuffedDriverFl != 0)) + if ((scene->_talkCount < 5) || (scene->_action1Count < 1) || scene->_cuffedDriverFl) break; BF_GLOBALS._player.disableControl(); scene->_sceneMode = 4123; scene->_stripManager.start(4125, scene); - scene->_cuffedDriverFl = 1; + scene->_cuffedDriverFl = true; T2_GLOBALS._uiElements.addScore(30); } else { if (BF_GLOBALS.getFlag(fTalkedDriverNoBkup)) { @@ -332,10 +332,10 @@ bool Scene410::Driver::startAction(CursorType action, Event &event) { BF_GLOBALS._player.disableControl(); scene->_sceneMode = 2; scene->setAction(&scene->_sequenceManager1, scene, 4120, &scene->_passenger, &BF_GLOBALS._player, NULL); - } else if ((scene->_cuffedDriverFl != 0) || (scene->_field1FC2 != 0)) { + } else if (scene->_cuffedDriverFl || scene->_driverOutOfTruckFl) { break; } else { - scene->_field1FC2 = 1; + scene->_driverOutOfTruckFl = true; T2_GLOBALS._uiElements.addScore(30); BF_GLOBALS._player.disableControl(); scene->_sceneMode = 4127; @@ -343,7 +343,7 @@ bool Scene410::Driver::startAction(CursorType action, Event &event) { } return true; case INV_MIRANDA_CARD: - if (scene->_cuffedDriverFl == 0) + if (!scene->_cuffedDriverFl) return false; if (BF_GLOBALS.getFlag(readFrankRights)) { @@ -379,15 +379,15 @@ bool Scene410::Passenger::startAction(CursorType action, Event &event) { SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 96, SET_EXT_BGCOLOR, 99, SET_EXT_FGCOLOR, 13, LIST_END); - } else if (!scene->_field1FBA) { + } else if (!scene->_harrissonTalkFl) { SceneItem::display(410, 5, SET_WIDTH, 300, SET_X, 10 + GLOBALS._sceneManager._scene->_sceneBounds.left, SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 96, SET_EXT_BGCOLOR, 99, SET_EXT_FGCOLOR, 13, LIST_END); - } else if (!scene->_field1FBE) { + } else if (!scene->_cuffedPassengerFl) { scene->_sceneMode = 4121; - scene->_field1FBE = 1; + scene->_cuffedPassengerFl = true; T2_GLOBALS._uiElements.addScore(50); scene->signal(); } else @@ -398,7 +398,7 @@ bool Scene410::Passenger::startAction(CursorType action, Event &event) { return true; case INV_HANDCUFFS: if (BF_GLOBALS.getFlag(fCalledBackup)) { - if ((scene->_talkCount < 5) || (scene->_field1FBA != 0)) + if ((scene->_talkCount < 5) || (scene->_harrissonTalkFl)) break; BF_GLOBALS._player.disableControl(); @@ -413,7 +413,7 @@ bool Scene410::Passenger::startAction(CursorType action, Event &event) { } return true; case INV_MIRANDA_CARD: - if (!scene->_field1FBA) + if (!scene->_harrissonTalkFl) break; if (BF_GLOBALS.getFlag(readFrankRights)) { @@ -455,7 +455,7 @@ bool Scene410::Harrison::startAction(CursorType action, Event &event) { SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 32, SET_EXT_BGCOLOR, 49, SET_EXT_FGCOLOR, 13, LIST_END); } - } else if ((scene->_field1FBA != 0) && (scene->_cuffedDriverFl != 0)) { + } else if (scene->_harrissonTalkFl && scene->_cuffedDriverFl) { BF_GLOBALS._player.disableControl(); scene->_sceneMode = 4112; scene->_stripManager.start(4113, scene); @@ -463,27 +463,27 @@ bool Scene410::Harrison::startAction(CursorType action, Event &event) { BF_GLOBALS.set2Flags(f1098Frankie); BF_GLOBALS.clearFlag(f1098Marina); } else if ((BF_INVENTORY.getObjectScene(INV_HANDCUFFS) == 1) || - (!scene->_field1FBA && (scene->_talkCount < 5))) { + (!scene->_harrissonTalkFl && (scene->_talkCount < 5))) { SceneItem::display(350, 13, SET_WIDTH, 300, SET_X, 10 + GLOBALS._sceneManager._scene->_sceneBounds.left, SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 32, SET_EXT_BGCOLOR, 49, SET_EXT_FGCOLOR, 13, LIST_END); - } else if (!scene->_field1FBA) { + } else if (!scene->_harrissonTalkFl) { BF_GLOBALS._player.disableControl(); - scene->_field1FBA = 1; - scene->_field1FBE = 1; + scene->_harrissonTalkFl = true; + scene->_cuffedPassengerFl = true; BF_GLOBALS._walkRegions.enableRegion(22); scene->_sceneMode = 4122; scene->_stripManager.start(4112, scene); } else if (scene->_action1Count < 1) { break; - } else if (scene->_cuffedDriverFl != 0) { + } else if (scene->_cuffedDriverFl) { error("Error - want to cuff driver, but he's cuffed already"); } else { BF_GLOBALS._player.disableControl(); - scene->_cuffedDriverFl = 1; - scene->_field1FC0 = 1; + scene->_cuffedDriverFl = true; + scene->_field1FC0 = true; BF_GLOBALS._walkRegions.enableRegion(22); scene->_sceneMode = 4109; scene->_stripManager.start(4112, scene); @@ -500,19 +500,23 @@ bool Scene410::Harrison::startAction(CursorType action, Event &event) { /*--------------------------------------------------------------------------*/ Scene410::Scene410(): SceneExt() { - _action1Count = _talkCount = _field1FBA = _cuffedDriverFl = 0; - _field1FBE = _field1FC0 = _field1FC2 = _harrisonMovedFl = 0; + _cuffedDriverFl = _harrissonTalkFl = _driverOutOfTruckFl = false; + _harrisonMovedFl = false; + + _action1Count = _talkCount = 0; + _cuffedPassengerFl = false; + _field1FC0 = false; } void Scene410::synchronize(Serializer &s) { SceneExt::synchronize(s); s.syncAsSint16LE(_action1Count); s.syncAsSint16LE(_talkCount); - s.syncAsSint16LE(_field1FBA); + s.syncAsSint16LE(_harrissonTalkFl); s.syncAsSint16LE(_cuffedDriverFl); - s.syncAsSint16LE(_field1FBE); + s.syncAsSint16LE(_cuffedPassengerFl); s.syncAsSint16LE(_field1FC0); - s.syncAsSint16LE(_field1FC2); + s.syncAsSint16LE(_driverOutOfTruckFl); s.syncAsSint16LE(_harrisonMovedFl); } @@ -593,7 +597,7 @@ void Scene410::postInit(SceneObjectList *OwnerList) { _patrolCar.fixPriority(148); _patrolCar.setPosition(Common::Point(39, 168)); - _harrisonMovedFl = 1; + _harrisonMovedFl = true; _sceneMode = 0; signal(); break; @@ -604,7 +608,7 @@ void Scene410::postInit(SceneObjectList *OwnerList) { _sceneMode = 0; } else { _harrisonMovedFl = BF_GLOBALS._scene410HarrisonMovedFl; - _field1FBA = BF_GLOBALS._v50CC2; + _harrissonTalkFl = BF_GLOBALS._scene410HarrisonTalkFl; _talkCount = BF_GLOBALS._scene410TalkCount; _action1Count = BF_GLOBALS._scene410Action1Count; @@ -617,7 +621,7 @@ void Scene410::postInit(SceneObjectList *OwnerList) { _passenger.setStrip(2); _passenger.setFrame(5); } - if (_field1FBA) { + if (_harrissonTalkFl) { _passenger.setVisage(415); _passenger.setStrip(6); _passenger.setFrame(8); @@ -664,7 +668,7 @@ void Scene410::postInit(SceneObjectList *OwnerList) { _sceneMode = 0; } - _harrisonMovedFl = 1; + _harrisonMovedFl = true; } break; case 50: @@ -687,7 +691,7 @@ void Scene410::signal() { BF_GLOBALS.clearFlag(f1097Marina); BF_GLOBALS._scene410HarrisonMovedFl = _harrisonMovedFl; - BF_GLOBALS._v50CC2 = _field1FBA; + BF_GLOBALS._scene410HarrisonTalkFl = _harrissonTalkFl; BF_GLOBALS._scene410TalkCount = _talkCount; BF_GLOBALS._scene410Action1Count = _action1Count; BF_GLOBALS._sceneManager.changeScene(60); @@ -730,7 +734,7 @@ void Scene410::signal() { case 9: _sceneMode = 4106; _stripManager.start(4111, this); - _field1FBA = 1; + _harrissonTalkFl = true; BF_GLOBALS.setFlag(fCuffedFrankie); T2_GLOBALS._uiElements.addScore(30); break; @@ -760,7 +764,7 @@ void Scene410::signal() { break; case 4104: // After call for backup, patrol car is coming - _harrisonMovedFl = 1; + _harrisonMovedFl = true; BF_GLOBALS._player.disableControl(); _sceneMode = 0; setAction(&_sequenceManager1, this, 4104, &_patrolCar, &_harrison, NULL); @@ -1432,21 +1436,21 @@ bool Scene450::Manager::startAction(CursorType action, Event &event) { } else { animate(ANIM_MODE_8, 1, NULL); - if (scene->_field19AC) { + if (scene->_managerCallsWeaselFl) { scene->_sceneMode = 2; - if (scene->_field19AE) { + if (scene->_talkManagerFl) { scene->_stripManager.start(4521, scene); } else { - scene->_field19AE = 1; + scene->_talkManagerFl = true; scene->_stripManager.start(4512, scene); } } else { scene->_sceneMode = 4506; - if (scene->_field19AE) { + if (scene->_talkManagerFl) { scene->setAction(&scene->_sequenceManager, scene, 4518, &BF_GLOBALS._player, this, NULL); } else { scene->_sceneMode = 4506; - scene->_field19AE = 1; + scene->_talkManagerFl = true; scene->setAction(&scene->_sequenceManager, scene, 4506, &BF_GLOBALS._player, this, NULL); } } @@ -1524,13 +1528,13 @@ bool Scene450::Exit::startAction(CursorType action, Event &event) { /*--------------------------------------------------------------------------*/ Scene450::Scene450(): SceneExt() { - _field19AC = _field19AE = 0; + _managerCallsWeaselFl = _talkManagerFl = false; } void Scene450::synchronize(Serializer &s) { SceneExt::synchronize(s); - s.syncAsSint16LE(_field19AC); - s.syncAsSint16LE(_field19AE); + s.syncAsSint16LE(_managerCallsWeaselFl); + s.syncAsSint16LE(_talkManagerFl); } void Scene450::postInit(SceneObjectList *OwnerList) { @@ -1654,7 +1658,7 @@ void Scene450::signal() { case 4510: case 4511: BF_GLOBALS.setFlag(fMgrCallsWeasel); - _field19AC = 1; + _managerCallsWeaselFl = true; _sceneMode = 4503; setAction(&_sequenceManager, this, 4503, &_weasel, &_door, &_manager, NULL); break; diff --git a/engines/tsage/blue_force/blueforce_scenes4.h b/engines/tsage/blue_force/blueforce_scenes4.h index 895970e4ee..92e91c93b2 100644 --- a/engines/tsage/blue_force/blueforce_scenes4.h +++ b/engines/tsage/blue_force/blueforce_scenes4.h @@ -116,10 +116,12 @@ public: SpeakerDriver _driverSpeaker; SpeakerShooter _shooterSpeaker; ASoundExt _sound1; - int _action1Count, _talkCount, _field1FBA; - int _cuffedDriverFl, _field1FBE; - int _field1FC0; - int _field1FC2, _harrisonMovedFl; + int _action1Count, _talkCount; + bool _harrissonTalkFl; + bool _cuffedDriverFl; + bool _cuffedPassengerFl; + bool _field1FC0; + bool _driverOutOfTruckFl, _harrisonMovedFl; Scene410(); virtual void postInit(SceneObjectList *OwnerList = NULL); @@ -255,7 +257,8 @@ public: NamedObject _door, _counterDoor; Exit _exit; NamedHotspot _interior, _shelf, _counter; - int _field19AC, _field19AE; + bool _managerCallsWeaselFl; + bool _talkManagerFl; Scene450(); virtual void synchronize(Serializer &s); diff --git a/engines/tsage/blue_force/blueforce_scenes9.cpp b/engines/tsage/blue_force/blueforce_scenes9.cpp index cef9e8135c..2b42dc8625 100644 --- a/engines/tsage/blue_force/blueforce_scenes9.cpp +++ b/engines/tsage/blue_force/blueforce_scenes9.cpp @@ -840,14 +840,14 @@ bool Scene910::Nico::startAction(CursorType action, Event &event) { if (BF_GLOBALS._nico910State >= 4) return NamedObject::startAction(action, event); - if (BF_GLOBALS._v4CEE6 < 4) - BF_GLOBALS._v4CEE6++; + if (BF_GLOBALS._nico910Talk < 4) + BF_GLOBALS._nico910Talk++; - if (BF_GLOBALS._v4CEE6 == 2) { + if (BF_GLOBALS._nico910Talk == 2) { scene->_sceneMode = 13; scene->_stripManager.start(9105, scene); } else - scene->_stripManager.start(9103 + BF_GLOBALS._v4CEE6, &BF_GLOBALS._stripProxy); + scene->_stripManager.start(9103 + BF_GLOBALS._nico910Talk, &BF_GLOBALS._stripProxy); return true; break; case INV_COLT45: @@ -887,14 +887,14 @@ bool Scene910::Nico::startAction(CursorType action, Event &event) { if (BF_GLOBALS._nico910State >= 4) return NamedObject::startAction(action, event); - if (BF_GLOBALS._v4CEE6 < 4) - BF_GLOBALS._v4CEE6++; + if (BF_GLOBALS._nico910Talk < 4) + BF_GLOBALS._nico910Talk++; - if (BF_GLOBALS._v4CEE6 == 2) { + if (BF_GLOBALS._nico910Talk == 2) { scene->_sceneMode = 13; scene->_stripManager.start(9105, scene); } else - scene->_stripManager.start(9103 + BF_GLOBALS._v4CEE6, &BF_GLOBALS._stripProxy); + scene->_stripManager.start(9103 + BF_GLOBALS._nico910Talk, &BF_GLOBALS._stripProxy); return true; break; @@ -966,16 +966,16 @@ bool Scene910::Stuart::startAction(CursorType action, Event &event) { return true; break; case CURSOR_TALK: - if (BF_GLOBALS._v4CEE8 < 3) - BF_GLOBALS._v4CEE8++; + if (BF_GLOBALS._stuart910Talk < 3) + BF_GLOBALS._stuart910Talk++; - scene->_stripManager.start(9107 + BF_GLOBALS._v4CEE8, &BF_GLOBALS._stripProxy); + scene->_stripManager.start(9107 + BF_GLOBALS._stuart910Talk, &BF_GLOBALS._stripProxy); return true; break; case INV_COLT45: if ((BF_GLOBALS.getFlag(gunDrawn)) && (BF_GLOBALS.getFlag(fGunLoaded)) && (BF_GLOBALS.getHasBullets())){ BF_GLOBALS._player.disableControl(); - if (BF_GLOBALS._v4CEE4 == 2) { + if (BF_GLOBALS._stuart910State == 2) { scene->_sceneMode = 9132; scene->setAction(&scene->_sequenceManager1, scene, 9132, &scene->_stuart, NULL); return NamedObject::startAction(action, event); @@ -1878,7 +1878,7 @@ bool Scene910::Item2::startAction(CursorType action, Event &event) { bool Scene910::Item3::startAction(CursorType action, Event &event) { Scene910 *scene = (Scene910 *)BF_GLOBALS._sceneManager._scene; - if ((action == CURSOR_TALK) && (BF_GLOBALS._nico910State == 4) && (BF_GLOBALS._v4CEE4 == 0)) { + if ((action == CURSOR_TALK) && (BF_GLOBALS._nico910State == 4) && (BF_GLOBALS._stuart910State == 0)) { BF_GLOBALS._player.disableControl(); scene->_sceneMode = 15; scene->_stripManager.start(9102, scene); @@ -2057,7 +2057,7 @@ void Scene910::postInit(SceneObjectList *OwnerList) { || (BF_GLOBALS._sceneManager._previousScene == 300)) { BF_GLOBALS._sceneManager._previousScene = 900; BF_GLOBALS._nico910State = 0; - BF_GLOBALS._v4CEE4 = 0; + BF_GLOBALS._stuart910State = 0; } _field2DE0 = 0; @@ -2149,7 +2149,7 @@ void Scene910::postInit(SceneObjectList *OwnerList) { _nico.setVisage(913); _nico.setPosition(Common::Point(262, 124)); _nico.setStrip(6); - BF_GLOBALS._v4CEE6 = 0; + BF_GLOBALS._nico910Talk = 0; BF_GLOBALS._nico910State = 1; _nico.setDetails(910, 63, 64, 67, 5, &_item4); BF_GLOBALS._v4CECA = 2; @@ -2309,7 +2309,7 @@ void Scene910::signal() { case 15: _stuart.postInit(); _stuart.setDetails(910, 66, 67, 68, 5, &_nico); - BF_GLOBALS._v4CEE8 = 0; + BF_GLOBALS._stuart910Talk = 0; _sceneMode = 9121; setAction(&_sequenceManager1, this, 9121, &_stuart, NULL); break; @@ -2349,7 +2349,7 @@ void Scene910::signal() { case 18: BF_GLOBALS._player._strip = 7; BF_GLOBALS._player._frame = 1; - if (BF_GLOBALS._v4CEE4 == 3) { + if (BF_GLOBALS._stuart910State == 3) { if (_field2DE4 == 0) { _field2DE4 = 1; _sceneMode = 9142; @@ -2460,7 +2460,7 @@ void Scene910::signal() { BF_GLOBALS._player.disableControl(); _nico.postInit(); _nico.setDetails(910, 63, 64, 65, 5, &_item4); - BF_GLOBALS._v4CEE6 = 0; + BF_GLOBALS._nico910Talk = 0; _shadow.postInit(); _action2.remove(); _sceneMode = 9116; @@ -2498,7 +2498,7 @@ void Scene910::signal() { break; case 9121: _item3.setDetails(7, 910, 96, 60, 61, 3); - BF_GLOBALS._v4CEE4 = 2; + BF_GLOBALS._stuart910State = 2; if (BF_GLOBALS._nico910State == 4) { _sceneMode = 20; _stripManager.start(9115, this); @@ -2582,7 +2582,7 @@ void Scene910::signal() { _yellowCord.hide(); _sceneMode = 9136; setAction(&_sequenceManager1, this, 9136, &BF_GLOBALS._player, &_stuart, &_yellowCord, NULL); - BF_GLOBALS._v4CEE4 = 3; + BF_GLOBALS._stuart910State = 3; break; case 11: _sceneMode = 9137; @@ -2605,13 +2605,13 @@ void Scene910::signal() { _stuart.postInit(); _nico.setDetails(910, 72, 73, 74, 3, (SceneItem *)NULL); _stuart.setDetails(910, 66, 67, 68, 5, &_nico); - BF_GLOBALS._v4CEE8 = 0; + BF_GLOBALS._stuart910Talk = 0; _sceneMode = 9121; setAction(&_sequenceManager1, this, 9121, &_stuart, NULL); break; case 9126: _sceneMode = 19; - if (BF_GLOBALS._v4CEE4 == 0) + if (BF_GLOBALS._stuart910State == 0) signal(); else _stripManager.start(9115, this); @@ -2630,7 +2630,7 @@ void Scene910::signal() { break; case 9132: BF_GLOBALS._player.enableControl(); - BF_GLOBALS._v4CEE4 = 4; + BF_GLOBALS._stuart910State = 4; BF_GLOBALS._deathReason = 13; BF_GLOBALS._sceneManager.changeScene(666); break; diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 88f2c85ffd..596f056bfe 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -1547,7 +1547,7 @@ void ScenePalette::synchronize(Serializer &s) { if (s.getVersion() < 12) { int useless = 0; - s.syncAsSint16LE(useless); + s.syncAsSint32LE(useless); } s.syncAsByte(_redColor); @@ -2748,6 +2748,12 @@ GfxSurface SceneObject::getFrame() { } void SceneObject::reposition() { + if (g_vm->getGameID() == GType_Ringworld2) { + if (!(_flags & OBJFLAG_ZOOMED)) { + setZoom(g_globals->_sceneManager._scene->_zoomPercents[MIN(_position.y, (int16)255)]); + } + } + GfxSurface frame = getFrame(); _bounds.resize(frame, _position.x, _position.y - _yDiff, _percent); diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp index c7da5f5d30..e81e5cddb3 100644 --- a/engines/tsage/debugger.cpp +++ b/engines/tsage/debugger.cpp @@ -30,18 +30,19 @@ namespace TsAGE { Debugger::Debugger() : GUI::Debugger() { - DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit)); - DCmd_Register("scene", WRAP_METHOD(Debugger, Cmd_Scene)); - DCmd_Register("walk_regions", WRAP_METHOD(Debugger, Cmd_WalkRegions)); - DCmd_Register("priority_regions", WRAP_METHOD(Debugger, Cmd_PriorityRegions)); - DCmd_Register("scene_regions", WRAP_METHOD(Debugger, Cmd_SceneRegions)); - DCmd_Register("setflag", WRAP_METHOD(Debugger, Cmd_SetFlag)); - DCmd_Register("getflag", WRAP_METHOD(Debugger, Cmd_GetFlag)); - DCmd_Register("clearflag", WRAP_METHOD(Debugger, Cmd_ClearFlag)); - DCmd_Register("listobjects", WRAP_METHOD(Debugger, Cmd_ListObjects)); - DCmd_Register("moveobject", WRAP_METHOD(Debugger, Cmd_MoveObject)); - DCmd_Register("hotspots", WRAP_METHOD(Debugger, Cmd_Hotspots)); - DCmd_Register("sound", WRAP_METHOD(Debugger, Cmd_Sound)); + DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit)); + DCmd_Register("scene", WRAP_METHOD(Debugger, Cmd_Scene)); + DCmd_Register("walk_regions", WRAP_METHOD(Debugger, Cmd_WalkRegions)); + DCmd_Register("priority_regions", WRAP_METHOD(Debugger, Cmd_PriorityRegions)); + DCmd_Register("scene_regions", WRAP_METHOD(Debugger, Cmd_SceneRegions)); + DCmd_Register("setflag", WRAP_METHOD(Debugger, Cmd_SetFlag)); + DCmd_Register("getflag", WRAP_METHOD(Debugger, Cmd_GetFlag)); + DCmd_Register("clearflag", WRAP_METHOD(Debugger, Cmd_ClearFlag)); + DCmd_Register("listobjects", WRAP_METHOD(Debugger, Cmd_ListObjects)); + DCmd_Register("moveobject", WRAP_METHOD(Debugger, Cmd_MoveObject)); + DCmd_Register("hotspots", WRAP_METHOD(Debugger, Cmd_Hotspots)); + DCmd_Register("sound", WRAP_METHOD(Debugger, Cmd_Sound)); + DCmd_Register("setdebug", WRAP_METHOD(Debugger, Cmd_SetDebug)); } static int strToInt(const char *s) { @@ -340,6 +341,14 @@ bool Debugger::Cmd_Sound(int argc, const char **argv) { return false; } +/** + * Activate internal debugger, when available + */ +bool Debugger::Cmd_SetDebug(int argc, const char **argv) { + DebugPrintf("Not available in this game\n"); + return true; +} + /* * This command lists the objects available, and their ID */ @@ -707,4 +716,19 @@ bool Ringworld2Debugger::Cmd_MoveObject(int argc, const char **argv) { return true; } + +/** + * Activate internal debugger, when available + */ +bool Ringworld2Debugger::Cmd_SetDebug(int argc, const char **argv) { + if (argc != 1) { + DebugPrintf("Usage: %s\n", argv[0]); + return true; + } + + // Set the internal debugger flag(s?) to true + // _debugCardGame is reset by scene1337::subPostInit() + R2_GLOBALS._debugCardGame = true; + return true; +} } // End of namespace TsAGE diff --git a/engines/tsage/debugger.h b/engines/tsage/debugger.h index bf826a3f77..c9b7e75039 100644 --- a/engines/tsage/debugger.h +++ b/engines/tsage/debugger.h @@ -45,6 +45,7 @@ protected: bool Cmd_Sound(int argc, const char **argv); virtual bool Cmd_ListObjects(int argc, const char **argv) = 0; virtual bool Cmd_MoveObject(int argc, const char **argv) = 0; + virtual bool Cmd_SetDebug(int argc, const char **argv); }; class DemoDebugger : public Debugger { @@ -69,6 +70,7 @@ class Ringworld2Debugger : public Debugger { protected: virtual bool Cmd_ListObjects(int argc, const char **argv); virtual bool Cmd_MoveObject(int argc, const char **argv); + virtual bool Cmd_SetDebug(int argc, const char **argv); }; } // End of namespace TsAGE diff --git a/engines/tsage/detection_tables.h b/engines/tsage/detection_tables.h index b374dbc98b..0f7f1e49bb 100644 --- a/engines/tsage/detection_tables.h +++ b/engines/tsage/detection_tables.h @@ -165,7 +165,7 @@ static const tSageGameDescription gameDescriptions[] = { AD_ENTRY1s("r2rw.rlb", "df6c25622387007788ca36d99362c1f0", 47586928), Common::EN_ANY, Common::kPlatformDOS, - ADGF_CD | ADGF_UNSTABLE, + ADGF_CD | ADGF_TESTING, GUIO0() }, GType_Ringworld2, diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index 768c51ca16..0f271649b3 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -241,19 +241,19 @@ namespace BlueForce { BlueForceGlobals::BlueForceGlobals(): TsAGE2Globals() { _hiddenDoorStatus = 0; _nico910State = 0; - _v4CEE4 = 0; - _v4CEE6 = 0; - _v4CEE8 = 0; + _stuart910State = 0; + _nico910Talk = 0; + _stuart910Talk = 0; _deziTopic = 0; _deathReason = 0; _driveFromScene = 300; _driveToScene = 0; _subFlagBitArr1 = 0; _subFlagBitArr2 = 0; - _v50CC2 = 0; + _scene410HarrisonTalkFl = false; _scene410Action1Count = 0; _scene410TalkCount = 0; - _scene410HarrisonMovedFl = 0; + _scene410HarrisonMovedFl = false; _bookmark = bNone; _mapLocationId = 1; _clip1Bullets = 8; @@ -296,9 +296,9 @@ void BlueForceGlobals::synchronize(Serializer &s) { s.syncAsByte(_breakerBoxStatusArr[i]); s.syncAsSint16LE(_hiddenDoorStatus); s.syncAsSint16LE(_nico910State); - s.syncAsSint16LE(_v4CEE4); - s.syncAsSint16LE(_v4CEE6); - s.syncAsSint16LE(_v4CEE8); + s.syncAsSint16LE(_stuart910State); + s.syncAsSint16LE(_nico910Talk); + s.syncAsSint16LE(_stuart910Talk); s.syncAsSint16LE(_deziTopic); s.syncAsSint16LE(_deathReason); s.syncAsSint16LE(_driveFromScene); @@ -312,7 +312,7 @@ void BlueForceGlobals::synchronize(Serializer &s) { } s.syncAsSint16LE(_subFlagBitArr1); s.syncAsSint16LE(_subFlagBitArr2); - s.syncAsSint16LE(_v50CC2); + s.syncAsSint16LE(_scene410HarrisonTalkFl); s.syncAsSint16LE(_scene410Action1Count); s.syncAsSint16LE(_scene410TalkCount); s.syncAsSint16LE(_scene410HarrisonMovedFl); @@ -372,17 +372,17 @@ void BlueForceGlobals::reset() { _breakerBoxStatusArr[17] = 0; _hiddenDoorStatus = 0; _nico910State = 0; - _v4CEE4 = 0; - _v4CEE6 = 0; - _v4CEE8 = 0; + _stuart910State = 0; + _nico910Talk = 0; + _stuart910Talk = 0; _deziTopic = 0; _deathReason = 0; _subFlagBitArr1 = 0; _subFlagBitArr2 = 0; - _v50CC2 = 0; + _scene410HarrisonTalkFl = false; _scene410Action1Count = 0; _scene410TalkCount = 0; - _scene410HarrisonMovedFl = 0; + _scene410HarrisonMovedFl = false; _clip1Bullets = 8; _clip2Bullets = 8; } @@ -457,6 +457,8 @@ Ringworld2Globals::Ringworld2Globals() { _foodCount = 0; _rimLocation = 0; _rimTransportLocation = 0; + + _debugCardGame = false; } Ringworld2Globals::~Ringworld2Globals() { @@ -583,6 +585,8 @@ void Ringworld2Globals::reset() { _player._characterScene[R2_QUINN] = 100; _player._characterScene[R2_SEEKER] = 300; _player._characterScene[R2_MIRANDA] = 300; + + _debugCardGame = false; } void Ringworld2Globals::synchronize(Serializer &s) { diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index 4523a7bca0..f5543af345 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -200,19 +200,19 @@ public: int8 _breakerBoxStatusArr[18]; int _hiddenDoorStatus; int _nico910State; - int _v4CEE4; - int _v4CEE6; - int _v4CEE8; + int _stuart910State; + int _nico910Talk; + int _stuart910Talk; int _deziTopic; int _deathReason; int _driveFromScene; int _driveToScene; uint8 _subFlagBitArr1; uint8 _subFlagBitArr2; - int _v50CC2; + bool _scene410HarrisonTalkFl; int _scene410Action1Count; int _scene410TalkCount; - int _scene410HarrisonMovedFl; + bool _scene410HarrisonMovedFl; Bookmark _bookmark; int _mapLocationId; int _clip1Bullets, _clip2Bullets; @@ -292,6 +292,7 @@ public: byte _stripManager_lookupList[12]; byte _scene1550JunkLocations[508]; Common::Point _balloonPosition; + bool _debugCardGame; // moved from scene 1337 so it can be easily set in the debugger ScannerDialog *_scannerDialog; diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index 3f1cecc301..e1d6e79423 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -1598,12 +1598,13 @@ void MazeUI::draw() { (_cellSize.y - 1)) / _cellSize.y; // Loop to handle the cell rows of the visible display area one at a time - for (int yCtr = 0; yCtr < _cellsVisible.y; ++yCtr, yPos += ySize) { + for (int yCtr = 0; yCtr <= _cellsVisible.y; ++yCtr, yPos += ySize) { int cellY = _mapOffset.y / _cellSize.y + yCtr; // Loop to iterate through the horizontal visible cells to build up - // an entire cell high horizontal slice of the map - for (int xCtr = 0; xCtr < _cellsVisible.x; ++xCtr) { + // an entire cell high horizontal slice of the map, plus one extra cell + // to allow for partial cell scrolling on-screen on the left/right sides + for (int xCtr = 0; xCtr <= _cellsVisible.x; ++xCtr) { int cellX = _mapOffset.x / _cellSize.x + xCtr; // Get the type of content to display in the cell diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp index ef4136a343..d174d6fa4d 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp @@ -20,6 +20,8 @@ * */ +#include "graphics/cursorman.h" + #include "tsage/scenes.h" #include "tsage/tsage.h" #include "tsage/staticres.h" @@ -2211,8 +2213,8 @@ void Scene1200::startCrawling(CrawlDirection dir) { *--------------------------------------------------------------------------*/ Scene1337::unkObj1337sub1::unkObj1337sub1() { - _field34 = 0; - _field36 = Common::Point(0, 0); + _cardId = 0; + _stationPos = Common::Point(0, 0); } void Scene1337::unkObj1337sub1::synchronize(Serializer &s) { @@ -2233,47 +2235,53 @@ void Scene1337::unkObj1337_1::synchronize(Serializer &s) { Scene1337::Scene1337() { _autoplay = false; - _field3E24 = 0; + _cardsAvailableNumb = 0; _field3E26 = 0; for (int i = 0; i < 100; i++) - _field3E28[i] = 0; + _availableCardsPile[i] = 0; - _field423C = 0; - _field423E = 0; + _shuffleEndedFl = false; + _currentPlayerNumb = 0; _field4240 = 0; _field4242 = 0; - _field4244 = 0; - _field4246 = 0; - _field4248 = 0; + _field4244 = false; + _field4246 = false; _field424A = 0; - _field424C = 0; - _field424E = 0; + _instructionsDisplayedFl = 0; + _instructionsWaitCount = 0; _unkFctPtr412 = nullptr; _field3EF0 = nullptr; _field3EF4 = nullptr; _field3EF8 = nullptr; + + _cursorCurRes = 0; + _cursorCurStrip = 0; + _cursorCurFrame = 0; } void Scene1337::synchronize(Serializer &s) { warning("STUBBED: Scene1337::synchronize()"); } -void Scene1337::Action1337::subD18B5(int resNum, int stripNum, int frameNum) { - warning("STUBBED: Action1337::subD18B5()"); -} - -void Scene1337::Action1337::skipFrames(int32 skipCount) { +void Scene1337::Action1337::waitFrames(int32 frameCount) { uint32 firstFrameNumber = g_globals->_events.getFrameNumber(); - uint32 tmpFrameNumber = firstFrameNumber; + uint32 curFrame = firstFrameNumber; + uint32 destFrame = firstFrameNumber + frameCount; - while (tmpFrameNumber < firstFrameNumber + skipCount) - tmpFrameNumber = g_globals->_events.getFrameNumber(); - - warning("_eventManager.waitEvent(-1)"); + while ((curFrame < destFrame) && !g_vm->shouldQuit()) { + TsAGE::Event event; + g_globals->_events.getEvent(event); + curFrame = g_globals->_events.getFrameNumber(); + } + + // CHECKME: The original is calling _eventManager.waitEvent(); } +/** + * Display instructions + */ void Scene1337::Action1::signal() { Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene; @@ -2284,393 +2292,392 @@ void Scene1337::Action1::signal() { scene->actionDisplay(1331, 7, 159, 10, 1, 200, 0, 7, 0, 154, 154); scene->actionDisplay(1331, 8, 159, 10, 1, 200, 0, 7, 0, 154, 154); - scene->_arrunkObj1337[1]._arr2[0]._field34 = 2; - scene->_arrunkObj1337[1]._arr2[0]._object1.postInit(); - scene->_arrunkObj1337[1]._arr2[0]._object1.setVisage(1332); - scene->_arrunkObj1337[1]._arr2[0]._object1.setPosition(scene->_arrunkObj1337[1]._arr2[0]._field36, 0); - scene->_arrunkObj1337[1]._arr2[0]._object1.setStrip(2); - scene->_arrunkObj1337[1]._arr2[0]._object1.setFrame(scene->_arrunkObj1337[1]._arr2[0]._field34); - scene->_arrunkObj1337[1]._arr2[0]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[1]._arr2[0]); - - scene->_arrunkObj1337[1]._arr2[1]._field34 = 3; - scene->_arrunkObj1337[1]._arr2[1]._object1.postInit(); - scene->_arrunkObj1337[1]._arr2[1]._object1.setVisage(1332); - scene->_arrunkObj1337[1]._arr2[1]._object1.setPosition(scene->_arrunkObj1337[1]._arr2[1]._field36, 0); - scene->_arrunkObj1337[1]._arr2[1]._object1.setStrip(2); - scene->_arrunkObj1337[1]._arr2[1]._object1.setFrame(scene->_arrunkObj1337[1]._arr2[1]._field34); - scene->_arrunkObj1337[1]._arr2[1]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[1]._arr2[1]); - - scene->_arrunkObj1337[2]._arr2[0]._field34 = 4; - scene->_arrunkObj1337[2]._arr2[0]._object1.postInit(); - scene->_arrunkObj1337[2]._arr2[0]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr2[0]._object1.setPosition(scene->_arrunkObj1337[2]._arr2[0]._field36, 0); - scene->_arrunkObj1337[2]._arr2[0]._object1.setStrip(2); - scene->_arrunkObj1337[2]._arr2[0]._object1.setFrame(scene->_arrunkObj1337[2]._arr2[0]._field34); - scene->_arrunkObj1337[2]._arr2[0]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr2[0]); - - scene->_arrunkObj1337[3]._arr2[0]._field34 = 5; - scene->_arrunkObj1337[3]._arr2[0]._object1.postInit(); - scene->_arrunkObj1337[3]._arr2[0]._object1.setVisage(1332); - scene->_arrunkObj1337[3]._arr2[0]._object1.setPosition(scene->_arrunkObj1337[3]._arr2[0]._field36, 0); - scene->_arrunkObj1337[3]._arr2[0]._object1.setStrip(2); - scene->_arrunkObj1337[3]._arr2[0]._object1.setFrame(scene->_arrunkObj1337[3]._arr2[0]._field34); - scene->_arrunkObj1337[3]._arr2[0]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[3]._arr2[0]); - - scene->_arrunkObj1337[3]._arr2[1]._field34 = 6; - scene->_arrunkObj1337[3]._arr2[1]._object1.postInit(); - scene->_arrunkObj1337[3]._arr2[1]._object1.setVisage(1332); - scene->_arrunkObj1337[3]._arr2[1]._object1.setPosition(scene->_arrunkObj1337[3]._arr2[1]._field36, 0); - scene->_arrunkObj1337[3]._arr2[1]._object1.setStrip(2); - scene->_arrunkObj1337[3]._arr2[1]._object1.setFrame(scene->_arrunkObj1337[3]._arr2[1]._field34); - scene->_arrunkObj1337[3]._arr2[1]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[3]._arr2[1]); - - scene->_arrunkObj1337[3]._arr2[2]._field34 = 7; - scene->_arrunkObj1337[3]._arr2[2]._object1.postInit(); - scene->_arrunkObj1337[3]._arr2[2]._object1.setVisage(1332); - scene->_arrunkObj1337[3]._arr2[2]._object1.setPosition(scene->_arrunkObj1337[3]._arr2[2]._field36, 0); - scene->_arrunkObj1337[3]._arr2[2]._object1.setStrip(2); - scene->_arrunkObj1337[3]._arr2[2]._object1.setFrame(scene->_arrunkObj1337[3]._arr2[2]._field34); - scene->_arrunkObj1337[3]._arr2[2]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[3]._arr2[2]); - - scene->_arrunkObj1337[0]._arr2[0]._field34 = 8; - scene->_arrunkObj1337[0]._arr2[0]._object1.postInit(); - scene->_arrunkObj1337[0]._arr2[0]._object1.setVisage(1332); - scene->_arrunkObj1337[0]._arr2[0]._object1.setPosition(scene->_arrunkObj1337[0]._arr2[0]._field36, 0); - scene->_arrunkObj1337[0]._arr2[0]._object1.setStrip(2); - scene->_arrunkObj1337[0]._arr2[0]._object1.setFrame(scene->_arrunkObj1337[0]._arr2[0]._field34); - scene->_arrunkObj1337[0]._arr2[0]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[0]._arr2[0]); - - scene->_arrunkObj1337[0]._arr2[1]._field34 = 9; - scene->_arrunkObj1337[0]._arr2[1]._object1.postInit(); - scene->_arrunkObj1337[0]._arr2[1]._object1.setVisage(1332); - scene->_arrunkObj1337[0]._arr2[1]._object1.setPosition(scene->_arrunkObj1337[0]._arr2[1]._field36, 0); - scene->_arrunkObj1337[0]._arr2[1]._object1.setStrip(2); - scene->_arrunkObj1337[0]._arr2[1]._object1.setFrame(scene->_arrunkObj1337[0]._arr2[1]._field34); - scene->_arrunkObj1337[0]._arr2[1]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[0]._arr2[1]); + scene->_gameBoardSide[1]._outpostStation[0]._cardId = 2; + scene->_gameBoardSide[1]._outpostStation[0]._card.postInit(); + scene->_gameBoardSide[1]._outpostStation[0]._card.setVisage(1332); + scene->_gameBoardSide[1]._outpostStation[0]._card.setPosition(scene->_gameBoardSide[1]._outpostStation[0]._stationPos, 0); + scene->_gameBoardSide[1]._outpostStation[0]._card.setStrip(2); + scene->_gameBoardSide[1]._outpostStation[0]._card.setFrame(scene->_gameBoardSide[1]._outpostStation[0]._cardId); + scene->_gameBoardSide[1]._outpostStation[0]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[1]._outpostStation[0]); + + scene->_gameBoardSide[1]._outpostStation[1]._cardId = 3; + scene->_gameBoardSide[1]._outpostStation[1]._card.postInit(); + scene->_gameBoardSide[1]._outpostStation[1]._card.setVisage(1332); + scene->_gameBoardSide[1]._outpostStation[1]._card.setPosition(scene->_gameBoardSide[1]._outpostStation[1]._stationPos, 0); + scene->_gameBoardSide[1]._outpostStation[1]._card.setStrip(2); + scene->_gameBoardSide[1]._outpostStation[1]._card.setFrame(scene->_gameBoardSide[1]._outpostStation[1]._cardId); + scene->_gameBoardSide[1]._outpostStation[1]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[1]._outpostStation[1]); + + scene->_gameBoardSide[2]._outpostStation[0]._cardId = 4; + scene->_gameBoardSide[2]._outpostStation[0]._card.postInit(); + scene->_gameBoardSide[2]._outpostStation[0]._card.setVisage(1332); + scene->_gameBoardSide[2]._outpostStation[0]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[0]._stationPos, 0); + scene->_gameBoardSide[2]._outpostStation[0]._card.setStrip(2); + scene->_gameBoardSide[2]._outpostStation[0]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[0]._cardId); + scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[0]); + + scene->_gameBoardSide[3]._outpostStation[0]._cardId = 5; + scene->_gameBoardSide[3]._outpostStation[0]._card.postInit(); + scene->_gameBoardSide[3]._outpostStation[0]._card.setVisage(1332); + scene->_gameBoardSide[3]._outpostStation[0]._card.setPosition(scene->_gameBoardSide[3]._outpostStation[0]._stationPos, 0); + scene->_gameBoardSide[3]._outpostStation[0]._card.setStrip(2); + scene->_gameBoardSide[3]._outpostStation[0]._card.setFrame(scene->_gameBoardSide[3]._outpostStation[0]._cardId); + scene->_gameBoardSide[3]._outpostStation[0]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[3]._outpostStation[0]); + + scene->_gameBoardSide[3]._outpostStation[1]._cardId = 6; + scene->_gameBoardSide[3]._outpostStation[1]._card.postInit(); + scene->_gameBoardSide[3]._outpostStation[1]._card.setVisage(1332); + scene->_gameBoardSide[3]._outpostStation[1]._card.setPosition(scene->_gameBoardSide[3]._outpostStation[1]._stationPos, 0); + scene->_gameBoardSide[3]._outpostStation[1]._card.setStrip(2); + scene->_gameBoardSide[3]._outpostStation[1]._card.setFrame(scene->_gameBoardSide[3]._outpostStation[1]._cardId); + scene->_gameBoardSide[3]._outpostStation[1]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[3]._outpostStation[1]); + + scene->_gameBoardSide[3]._outpostStation[2]._cardId = 7; + scene->_gameBoardSide[3]._outpostStation[2]._card.postInit(); + scene->_gameBoardSide[3]._outpostStation[2]._card.setVisage(1332); + scene->_gameBoardSide[3]._outpostStation[2]._card.setPosition(scene->_gameBoardSide[3]._outpostStation[2]._stationPos, 0); + scene->_gameBoardSide[3]._outpostStation[2]._card.setStrip(2); + scene->_gameBoardSide[3]._outpostStation[2]._card.setFrame(scene->_gameBoardSide[3]._outpostStation[2]._cardId); + scene->_gameBoardSide[3]._outpostStation[2]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[3]._outpostStation[2]); + + scene->_gameBoardSide[0]._outpostStation[0]._cardId = 8; + scene->_gameBoardSide[0]._outpostStation[0]._card.postInit(); + scene->_gameBoardSide[0]._outpostStation[0]._card.setVisage(1332); + scene->_gameBoardSide[0]._outpostStation[0]._card.setPosition(scene->_gameBoardSide[0]._outpostStation[0]._stationPos, 0); + scene->_gameBoardSide[0]._outpostStation[0]._card.setStrip(2); + scene->_gameBoardSide[0]._outpostStation[0]._card.setFrame(scene->_gameBoardSide[0]._outpostStation[0]._cardId); + scene->_gameBoardSide[0]._outpostStation[0]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[0]._outpostStation[0]); + + scene->_gameBoardSide[0]._outpostStation[1]._cardId = 9; + scene->_gameBoardSide[0]._outpostStation[1]._card.postInit(); + scene->_gameBoardSide[0]._outpostStation[1]._card.setVisage(1332); + scene->_gameBoardSide[0]._outpostStation[1]._card.setPosition(scene->_gameBoardSide[0]._outpostStation[1]._stationPos, 0); + scene->_gameBoardSide[0]._outpostStation[1]._card.setStrip(2); + scene->_gameBoardSide[0]._outpostStation[1]._card.setFrame(scene->_gameBoardSide[0]._outpostStation[1]._cardId); + scene->_gameBoardSide[0]._outpostStation[1]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[0]._outpostStation[1]); R2_GLOBALS._sceneObjects->draw(); - skipFrames(60); + waitFrames(60); scene->actionDisplay(1331, 9, 159, 10, 1, 200, 0, 7, 0, 154, 154); - scene->_arrunkObj1337[2]._arr2[1]._field34 = 2; - scene->_arrunkObj1337[2]._arr2[1]._object1.postInit(); - scene->_arrunkObj1337[2]._arr2[1]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr2[1]._object1.setPosition(scene->_arrunkObj1337[2]._arr2[1]._field36, 0); - scene->_arrunkObj1337[2]._arr2[1]._object1.setStrip(2); - scene->_arrunkObj1337[2]._arr2[1]._object1.setFrame(scene->_arrunkObj1337[2]._arr2[1]._field34); - scene->_arrunkObj1337[2]._arr2[1]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr2[1]); - - scene->_arrunkObj1337[2]._arr2[2]._field34 = 3; - scene->_arrunkObj1337[2]._arr2[2]._object1.postInit(); - scene->_arrunkObj1337[2]._arr2[2]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr2[2]._object1.setPosition(scene->_arrunkObj1337[2]._arr2[2]._field36, 0); - scene->_arrunkObj1337[2]._arr2[2]._object1.setStrip(2); - scene->_arrunkObj1337[2]._arr2[2]._object1.setFrame(scene->_arrunkObj1337[2]._arr2[2]._field34); - scene->_arrunkObj1337[2]._arr2[2]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr2[2]); - - scene->_arrunkObj1337[2]._arr2[3]._field34 = 5; - scene->_arrunkObj1337[2]._arr2[3]._object1.postInit(); - scene->_arrunkObj1337[2]._arr2[3]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr2[3]._object1.setPosition(scene->_arrunkObj1337[2]._arr2[3]._field36, 0); - scene->_arrunkObj1337[2]._arr2[3]._object1.setStrip(2); - scene->_arrunkObj1337[2]._arr2[3]._object1.setFrame(scene->_arrunkObj1337[2]._arr2[3]._field34); - scene->_arrunkObj1337[2]._arr2[3]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr2[3]); - - scene->_arrunkObj1337[2]._arr2[4]._field34 = 6; - scene->_arrunkObj1337[2]._arr2[4]._object1.postInit(); - scene->_arrunkObj1337[2]._arr2[4]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr2[4]._object1.setPosition(scene->_arrunkObj1337[2]._arr2[4]._field36, 0); - scene->_arrunkObj1337[2]._arr2[4]._object1.setStrip(2); - scene->_arrunkObj1337[2]._arr2[4]._object1.setFrame(scene->_arrunkObj1337[2]._arr2[4]._field34); - scene->_arrunkObj1337[2]._arr2[4]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr2[4]); - - scene->_arrunkObj1337[2]._arr2[5]._field34 = 7; - scene->_arrunkObj1337[2]._arr2[5]._object1.postInit(); - scene->_arrunkObj1337[2]._arr2[5]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr2[5]._object1.setPosition(scene->_arrunkObj1337[2]._arr2[5]._field36, 0); - scene->_arrunkObj1337[2]._arr2[5]._object1.setStrip(2); - scene->_arrunkObj1337[2]._arr2[5]._object1.setFrame(scene->_arrunkObj1337[2]._arr2[5]._field34); - scene->_arrunkObj1337[2]._arr2[5]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr2[5]); - - scene->_arrunkObj1337[2]._arr2[6]._field34 = 8; - scene->_arrunkObj1337[2]._arr2[6]._object1.postInit(); - scene->_arrunkObj1337[2]._arr2[6]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr2[6]._object1.setPosition(scene->_arrunkObj1337[2]._arr2[6]._field36, 0); - scene->_arrunkObj1337[2]._arr2[6]._object1.setStrip(2); - scene->_arrunkObj1337[2]._arr2[6]._object1.setFrame(scene->_arrunkObj1337[2]._arr2[6]._field34); - scene->_arrunkObj1337[2]._arr2[6]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr2[6]); - - scene->_arrunkObj1337[2]._arr2[7]._field34 = 9; - scene->_arrunkObj1337[2]._arr2[7]._object1.postInit(); - scene->_arrunkObj1337[2]._arr2[7]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr2[7]._object1.setPosition(scene->_arrunkObj1337[2]._arr2[7]._field36, 0); - scene->_arrunkObj1337[2]._arr2[7]._object1.setStrip(2); - scene->_arrunkObj1337[2]._arr2[7]._object1.setFrame(scene->_arrunkObj1337[2]._arr2[7]._field34); - scene->_arrunkObj1337[2]._arr2[7]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr2[7]); + scene->_gameBoardSide[2]._outpostStation[1]._cardId = 2; + scene->_gameBoardSide[2]._outpostStation[1]._card.postInit(); + scene->_gameBoardSide[2]._outpostStation[1]._card.setVisage(1332); + scene->_gameBoardSide[2]._outpostStation[1]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[1]._stationPos, 0); + scene->_gameBoardSide[2]._outpostStation[1]._card.setStrip(2); + scene->_gameBoardSide[2]._outpostStation[1]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[1]._cardId); + scene->_gameBoardSide[2]._outpostStation[1]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[1]); + + scene->_gameBoardSide[2]._outpostStation[2]._cardId = 3; + scene->_gameBoardSide[2]._outpostStation[2]._card.postInit(); + scene->_gameBoardSide[2]._outpostStation[2]._card.setVisage(1332); + scene->_gameBoardSide[2]._outpostStation[2]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[2]._stationPos, 0); + scene->_gameBoardSide[2]._outpostStation[2]._card.setStrip(2); + scene->_gameBoardSide[2]._outpostStation[2]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[2]._cardId); + scene->_gameBoardSide[2]._outpostStation[2]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[2]); + + scene->_gameBoardSide[2]._outpostStation[3]._cardId = 5; + scene->_gameBoardSide[2]._outpostStation[3]._card.postInit(); + scene->_gameBoardSide[2]._outpostStation[3]._card.setVisage(1332); + scene->_gameBoardSide[2]._outpostStation[3]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[3]._stationPos, 0); + scene->_gameBoardSide[2]._outpostStation[3]._card.setStrip(2); + scene->_gameBoardSide[2]._outpostStation[3]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[3]._cardId); + scene->_gameBoardSide[2]._outpostStation[3]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[3]); + + scene->_gameBoardSide[2]._outpostStation[4]._cardId = 6; + scene->_gameBoardSide[2]._outpostStation[4]._card.postInit(); + scene->_gameBoardSide[2]._outpostStation[4]._card.setVisage(1332); + scene->_gameBoardSide[2]._outpostStation[4]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[4]._stationPos, 0); + scene->_gameBoardSide[2]._outpostStation[4]._card.setStrip(2); + scene->_gameBoardSide[2]._outpostStation[4]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[4]._cardId); + scene->_gameBoardSide[2]._outpostStation[4]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[4]); + + scene->_gameBoardSide[2]._outpostStation[5]._cardId = 7; + scene->_gameBoardSide[2]._outpostStation[5]._card.postInit(); + scene->_gameBoardSide[2]._outpostStation[5]._card.setVisage(1332); + scene->_gameBoardSide[2]._outpostStation[5]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[5]._stationPos, 0); + scene->_gameBoardSide[2]._outpostStation[5]._card.setStrip(2); + scene->_gameBoardSide[2]._outpostStation[5]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[5]._cardId); + scene->_gameBoardSide[2]._outpostStation[5]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[5]); + + scene->_gameBoardSide[2]._outpostStation[6]._cardId = 8; + scene->_gameBoardSide[2]._outpostStation[6]._card.postInit(); + scene->_gameBoardSide[2]._outpostStation[6]._card.setVisage(1332); + scene->_gameBoardSide[2]._outpostStation[6]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[6]._stationPos, 0); + scene->_gameBoardSide[2]._outpostStation[6]._card.setStrip(2); + scene->_gameBoardSide[2]._outpostStation[6]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[6]._cardId); + scene->_gameBoardSide[2]._outpostStation[6]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[6]); + + scene->_gameBoardSide[2]._outpostStation[7]._cardId = 9; + scene->_gameBoardSide[2]._outpostStation[7]._card.postInit(); + scene->_gameBoardSide[2]._outpostStation[7]._card.setVisage(1332); + scene->_gameBoardSide[2]._outpostStation[7]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[7]._stationPos, 0); + scene->_gameBoardSide[2]._outpostStation[7]._card.setStrip(2); + scene->_gameBoardSide[2]._outpostStation[7]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[7]._cardId); + scene->_gameBoardSide[2]._outpostStation[7]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[7]); scene->_aSound1.play(62); R2_GLOBALS._sceneObjects->draw(); - skipFrames(120); - scene->_arrunkObj1337[2]._arr2[0]._object1.remove(); - scene->_arrunkObj1337[2]._arr2[1]._object1.remove(); - scene->_arrunkObj1337[2]._arr2[2]._object1.remove(); - scene->_arrunkObj1337[2]._arr2[3]._object1.remove(); - scene->_arrunkObj1337[2]._arr2[4]._object1.remove(); - scene->_arrunkObj1337[2]._arr2[5]._object1.remove(); - scene->_arrunkObj1337[2]._arr2[6]._object1.remove(); - scene->_arrunkObj1337[2]._arr2[7]._object1.remove(); + waitFrames(120); + scene->_gameBoardSide[2]._outpostStation[0]._card.remove(); + scene->_gameBoardSide[2]._outpostStation[1]._card.remove(); + scene->_gameBoardSide[2]._outpostStation[2]._card.remove(); + scene->_gameBoardSide[2]._outpostStation[3]._card.remove(); + scene->_gameBoardSide[2]._outpostStation[4]._card.remove(); + scene->_gameBoardSide[2]._outpostStation[5]._card.remove(); + scene->_gameBoardSide[2]._outpostStation[6]._card.remove(); + scene->_gameBoardSide[2]._outpostStation[7]._card.remove(); - scene->_arrunkObj1337[1]._arr2[0]._object1.remove(); - scene->_arrunkObj1337[1]._arr2[1]._object1.remove(); + scene->_gameBoardSide[1]._outpostStation[0]._card.remove(); + scene->_gameBoardSide[1]._outpostStation[1]._card.remove(); - scene->_arrunkObj1337[3]._arr2[0]._object1.remove(); - scene->_arrunkObj1337[3]._arr2[1]._object1.remove(); - scene->_arrunkObj1337[3]._arr2[2]._object1.remove(); + scene->_gameBoardSide[3]._outpostStation[0]._card.remove(); + scene->_gameBoardSide[3]._outpostStation[1]._card.remove(); + scene->_gameBoardSide[3]._outpostStation[2]._card.remove(); - scene->_arrunkObj1337[0]._arr2[0]._object1.remove(); - scene->_arrunkObj1337[0]._arr2[1]._object1.remove(); + scene->_gameBoardSide[0]._outpostStation[0]._card.remove(); + scene->_gameBoardSide[0]._outpostStation[1]._card.remove(); scene->_background2.setup2(1332, 5, 1, 165, 95, 110, 1); - scene->_arrunkObj1337[1]._arr1[0]._object1.postInit(); - scene->_arrunkObj1337[1]._arr1[0]._object1.setVisage(1332); - scene->_arrunkObj1337[1]._arr1[0]._object1.setPosition(scene->_arrunkObj1337[1]._arr1[0]._field36, 0); - scene->_arrunkObj1337[1]._arr1[0]._object1.setStrip(1); - scene->_arrunkObj1337[1]._arr1[0]._object1.setFrame(4); - scene->_arrunkObj1337[1]._arr1[0]._object1.fixPriority(170); - - scene->_arrunkObj1337[1]._arr1[1]._object1.postInit(); - scene->_arrunkObj1337[1]._arr1[1]._object1.setVisage(1332); - scene->_arrunkObj1337[1]._arr1[1]._object1.setPosition(scene->_arrunkObj1337[1]._arr1[1]._field36, 0); - scene->_arrunkObj1337[1]._arr1[1]._object1.setStrip(1); - scene->_arrunkObj1337[1]._arr1[1]._object1.setFrame(4); - scene->_arrunkObj1337[1]._arr1[1]._object1.fixPriority(170); - - scene->_arrunkObj1337[1]._arr1[2]._object1.postInit(); - scene->_arrunkObj1337[1]._arr1[2]._object1.setVisage(1332); - scene->_arrunkObj1337[1]._arr1[2]._object1.setPosition(scene->_arrunkObj1337[1]._arr1[2]._field36, 0); - scene->_arrunkObj1337[1]._arr1[2]._object1.setStrip(1); - scene->_arrunkObj1337[1]._arr1[2]._object1.setFrame(4); - scene->_arrunkObj1337[1]._arr1[2]._object1.fixPriority(170); - - scene->_arrunkObj1337[2]._arr1[0]._field34 = 30; - scene->_arrunkObj1337[2]._arr1[0]._object1.postInit(); - scene->_arrunkObj1337[2]._arr1[0]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr1[0]._object1.setPosition(scene->_arrunkObj1337[2]._arr1[0]._field36, 0); - scene->_arrunkObj1337[2]._arr1[0]._object1.setStrip(1); - scene->_arrunkObj1337[2]._arr1[0]._object1.setFrame(2); - scene->_arrunkObj1337[2]._arr1[0]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr1[0]); - - scene->_arrunkObj1337[2]._arr1[1]._field34 = 16; - scene->_arrunkObj1337[2]._arr1[1]._object1.postInit(); - scene->_arrunkObj1337[2]._arr1[1]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr1[1]._object1.setPosition(scene->_arrunkObj1337[2]._arr1[1]._field36, 0); - scene->_arrunkObj1337[2]._arr1[1]._object1.setStrip(1); - scene->_arrunkObj1337[2]._arr1[1]._object1.setFrame(2); - scene->_arrunkObj1337[2]._arr1[1]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr1[1]); - - scene->_arrunkObj1337[2]._arr1[2]._field34 = 1; - scene->_arrunkObj1337[2]._arr1[2]._object1.postInit(); - scene->_arrunkObj1337[2]._arr1[2]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr1[2]._object1.setPosition(scene->_arrunkObj1337[2]._arr1[2]._field36, 0); - scene->_arrunkObj1337[2]._arr1[2]._object1.setStrip(1); - scene->_arrunkObj1337[2]._arr1[2]._object1.setFrame(2); - scene->_arrunkObj1337[2]._arr1[2]._object1.fixPriority(170); - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr1[2]); - - scene->_arrunkObj1337[3]._arr1[0]._object1.postInit(); - scene->_arrunkObj1337[3]._arr1[0]._object1.setVisage(1332); - scene->_arrunkObj1337[3]._arr1[0]._object1.setPosition(scene->_arrunkObj1337[3]._arr1[0]._field36, 0); - scene->_arrunkObj1337[3]._arr1[0]._object1.setStrip(1); - scene->_arrunkObj1337[3]._arr1[0]._object1.setFrame(3); - scene->_arrunkObj1337[3]._arr1[0]._object1.fixPriority(170); - - scene->_arrunkObj1337[3]._arr1[1]._object1.postInit(); - scene->_arrunkObj1337[3]._arr1[1]._object1.setVisage(1332); - scene->_arrunkObj1337[3]._arr1[1]._object1.setPosition(scene->_arrunkObj1337[3]._arr1[1]._field36, 0); - scene->_arrunkObj1337[3]._arr1[1]._object1.setStrip(1); - scene->_arrunkObj1337[3]._arr1[1]._object1.setFrame(3); - scene->_arrunkObj1337[3]._arr1[1]._object1.fixPriority(170); - - scene->_arrunkObj1337[3]._arr1[2]._object1.postInit(); - scene->_arrunkObj1337[3]._arr1[2]._object1.setVisage(1332); - scene->_arrunkObj1337[3]._arr1[2]._object1.setPosition(scene->_arrunkObj1337[3]._arr1[2]._field36, 0); - scene->_arrunkObj1337[3]._arr1[2]._object1.setStrip(1); - scene->_arrunkObj1337[3]._arr1[2]._object1.setFrame(3); - scene->_arrunkObj1337[3]._arr1[2]._object1.fixPriority(170); - - scene->_arrunkObj1337[0]._arr1[0]._object1.postInit(); - scene->_arrunkObj1337[0]._arr1[0]._object1.setVisage(1332); - scene->_arrunkObj1337[0]._arr1[0]._object1.setPosition(scene->_arrunkObj1337[0]._arr1[0]._field36, 0); - scene->_arrunkObj1337[0]._arr1[0]._object1.setStrip(1); - scene->_arrunkObj1337[0]._arr1[0]._object1.setFrame(2); - scene->_arrunkObj1337[0]._arr1[0]._object1.fixPriority(170); - - scene->_arrunkObj1337[0]._arr1[1]._object1.postInit(); - scene->_arrunkObj1337[0]._arr1[1]._object1.setVisage(1332); - scene->_arrunkObj1337[0]._arr1[1]._object1.setPosition(scene->_arrunkObj1337[0]._arr1[1]._field36, 0); - scene->_arrunkObj1337[0]._arr1[1]._object1.setStrip(1); - scene->_arrunkObj1337[0]._arr1[1]._object1.setFrame(2); - scene->_arrunkObj1337[0]._arr1[1]._object1.fixPriority(170); - - scene->_arrunkObj1337[0]._arr1[2]._object1.postInit(); - scene->_arrunkObj1337[0]._arr1[2]._object1.setVisage(1332); - scene->_arrunkObj1337[0]._arr1[2]._object1.setPosition(scene->_arrunkObj1337[0]._arr1[2]._field36, 0); - scene->_arrunkObj1337[0]._arr1[2]._object1.setStrip(1); - scene->_arrunkObj1337[0]._arr1[2]._object1.setFrame(2); - scene->_arrunkObj1337[0]._arr1[2]._object1.fixPriority(170); + scene->_gameBoardSide[1]._handCard[0]._card.postInit(); + scene->_gameBoardSide[1]._handCard[0]._card.setVisage(1332); + scene->_gameBoardSide[1]._handCard[0]._card.setPosition(scene->_gameBoardSide[1]._handCard[0]._stationPos, 0); + scene->_gameBoardSide[1]._handCard[0]._card.setStrip(1); + scene->_gameBoardSide[1]._handCard[0]._card.setFrame(4); + scene->_gameBoardSide[1]._handCard[0]._card.fixPriority(170); + + scene->_gameBoardSide[1]._handCard[1]._card.postInit(); + scene->_gameBoardSide[1]._handCard[1]._card.setVisage(1332); + scene->_gameBoardSide[1]._handCard[1]._card.setPosition(scene->_gameBoardSide[1]._handCard[1]._stationPos, 0); + scene->_gameBoardSide[1]._handCard[1]._card.setStrip(1); + scene->_gameBoardSide[1]._handCard[1]._card.setFrame(4); + scene->_gameBoardSide[1]._handCard[1]._card.fixPriority(170); + + scene->_gameBoardSide[1]._handCard[2]._card.postInit(); + scene->_gameBoardSide[1]._handCard[2]._card.setVisage(1332); + scene->_gameBoardSide[1]._handCard[2]._card.setPosition(scene->_gameBoardSide[1]._handCard[2]._stationPos, 0); + scene->_gameBoardSide[1]._handCard[2]._card.setStrip(1); + scene->_gameBoardSide[1]._handCard[2]._card.setFrame(4); + scene->_gameBoardSide[1]._handCard[2]._card.fixPriority(170); + + scene->_gameBoardSide[2]._handCard[0]._cardId = 30; + scene->_gameBoardSide[2]._handCard[0]._card.postInit(); + scene->_gameBoardSide[2]._handCard[0]._card.setVisage(1332); + scene->_gameBoardSide[2]._handCard[0]._card.setPosition(scene->_gameBoardSide[2]._handCard[0]._stationPos, 0); + scene->_gameBoardSide[2]._handCard[0]._card.setStrip(1); + scene->_gameBoardSide[2]._handCard[0]._card.setFrame(2); + scene->_gameBoardSide[2]._handCard[0]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[2]._handCard[0]); + + scene->_gameBoardSide[2]._handCard[1]._cardId = 16; + scene->_gameBoardSide[2]._handCard[1]._card.postInit(); + scene->_gameBoardSide[2]._handCard[1]._card.setVisage(1332); + scene->_gameBoardSide[2]._handCard[1]._card.setPosition(scene->_gameBoardSide[2]._handCard[1]._stationPos, 0); + scene->_gameBoardSide[2]._handCard[1]._card.setStrip(1); + scene->_gameBoardSide[2]._handCard[1]._card.setFrame(2); + scene->_gameBoardSide[2]._handCard[1]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[2]._handCard[1]); + + scene->_gameBoardSide[2]._handCard[2]._cardId = 1; + scene->_gameBoardSide[2]._handCard[2]._card.postInit(); + scene->_gameBoardSide[2]._handCard[2]._card.setVisage(1332); + scene->_gameBoardSide[2]._handCard[2]._card.setPosition(scene->_gameBoardSide[2]._handCard[2]._stationPos, 0); + scene->_gameBoardSide[2]._handCard[2]._card.setStrip(1); + scene->_gameBoardSide[2]._handCard[2]._card.setFrame(2); + scene->_gameBoardSide[2]._handCard[2]._card.fixPriority(170); + scene->setAnimationInfo(&scene->_gameBoardSide[2]._handCard[2]); + + scene->_gameBoardSide[3]._handCard[0]._card.postInit(); + scene->_gameBoardSide[3]._handCard[0]._card.setVisage(1332); + scene->_gameBoardSide[3]._handCard[0]._card.setPosition(scene->_gameBoardSide[3]._handCard[0]._stationPos, 0); + scene->_gameBoardSide[3]._handCard[0]._card.setStrip(1); + scene->_gameBoardSide[3]._handCard[0]._card.setFrame(3); + scene->_gameBoardSide[3]._handCard[0]._card.fixPriority(170); + + scene->_gameBoardSide[3]._handCard[1]._card.postInit(); + scene->_gameBoardSide[3]._handCard[1]._card.setVisage(1332); + scene->_gameBoardSide[3]._handCard[1]._card.setPosition(scene->_gameBoardSide[3]._handCard[1]._stationPos, 0); + scene->_gameBoardSide[3]._handCard[1]._card.setStrip(1); + scene->_gameBoardSide[3]._handCard[1]._card.setFrame(3); + scene->_gameBoardSide[3]._handCard[1]._card.fixPriority(170); + + scene->_gameBoardSide[3]._handCard[2]._card.postInit(); + scene->_gameBoardSide[3]._handCard[2]._card.setVisage(1332); + scene->_gameBoardSide[3]._handCard[2]._card.setPosition(scene->_gameBoardSide[3]._handCard[2]._stationPos, 0); + scene->_gameBoardSide[3]._handCard[2]._card.setStrip(1); + scene->_gameBoardSide[3]._handCard[2]._card.setFrame(3); + scene->_gameBoardSide[3]._handCard[2]._card.fixPriority(170); + + scene->_gameBoardSide[0]._handCard[0]._card.postInit(); + scene->_gameBoardSide[0]._handCard[0]._card.setVisage(1332); + scene->_gameBoardSide[0]._handCard[0]._card.setPosition(scene->_gameBoardSide[0]._handCard[0]._stationPos, 0); + scene->_gameBoardSide[0]._handCard[0]._card.setStrip(1); + scene->_gameBoardSide[0]._handCard[0]._card.setFrame(2); + scene->_gameBoardSide[0]._handCard[0]._card.fixPriority(170); + + scene->_gameBoardSide[0]._handCard[1]._card.postInit(); + scene->_gameBoardSide[0]._handCard[1]._card.setVisage(1332); + scene->_gameBoardSide[0]._handCard[1]._card.setPosition(scene->_gameBoardSide[0]._handCard[1]._stationPos, 0); + scene->_gameBoardSide[0]._handCard[1]._card.setStrip(1); + scene->_gameBoardSide[0]._handCard[1]._card.setFrame(2); + scene->_gameBoardSide[0]._handCard[1]._card.fixPriority(170); + + scene->_gameBoardSide[0]._handCard[2]._card.postInit(); + scene->_gameBoardSide[0]._handCard[2]._card.setVisage(1332); + scene->_gameBoardSide[0]._handCard[2]._card.setPosition(scene->_gameBoardSide[0]._handCard[2]._stationPos, 0); + scene->_gameBoardSide[0]._handCard[2]._card.setStrip(1); + scene->_gameBoardSide[0]._handCard[2]._card.setFrame(2); + scene->_gameBoardSide[0]._handCard[2]._card.fixPriority(170); R2_GLOBALS._sceneObjects->draw(); scene->actionDisplay(1331, 10, 159, 10, 1, 200, 0, 7, 0, 154, 154); - scene->_item2._object1.setPosition(Common::Point(162, 95), 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(Common::Point(162, 95), 0); + scene->_animatedCard._card.show(); scene->_aSound2.play(61); Common::Point pt(91, 174); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &pt, this); + scene->_animatedCard._card.addMover(mover, &pt, this); } break; case 2: { - scene->_arrunkObj1337[2]._arr1[3]._field34 = 2; - scene->_arrunkObj1337[2]._arr1[3]._object1.postInit(); - scene->_arrunkObj1337[2]._arr1[3]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr1[3]._object1.setPosition(scene->_arrunkObj1337[2]._arr1[3]._field36, 0); - scene->_arrunkObj1337[2]._arr1[3]._object1.setStrip(1); - scene->_arrunkObj1337[2]._arr1[3]._object1.setFrame(2); - scene->_arrunkObj1337[2]._arr1[3]._object1.fixPriority(170); + scene->_gameBoardSide[2]._handCard[3]._cardId = 2; + scene->_gameBoardSide[2]._handCard[3]._card.postInit(); + scene->_gameBoardSide[2]._handCard[3]._card.setVisage(1332); + scene->_gameBoardSide[2]._handCard[3]._card.setPosition(scene->_gameBoardSide[2]._handCard[3]._stationPos, 0); + scene->_gameBoardSide[2]._handCard[3]._card.setStrip(1); + scene->_gameBoardSide[2]._handCard[3]._card.setFrame(2); + scene->_gameBoardSide[2]._handCard[3]._card.fixPriority(170); - scene->_item2._object1.hide(); - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr1[3]); + scene->_animatedCard._card.hide(); + scene->setAnimationInfo(&scene->_gameBoardSide[2]._handCard[3]); R2_GLOBALS._sceneObjects->draw(); - skipFrames(60); + waitFrames(60); scene->actionDisplay(1331, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154); scene->actionDisplay(1331, 12, 159, 10, 1, 200, 0, 7, 0, 154, 154); - scene->_arrunkObj1337[2]._arr2[1]._field34 = 1; - scene->_arrunkObj1337[2]._arr2[1]._object1.postInit(); - scene->_arrunkObj1337[2]._arr2[1]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr2[1]._object1.setPosition(scene->_arrunkObj1337[2]._arr2[1]._field36, 0); - scene->_arrunkObj1337[2]._arr2[1]._object1.hide(); + scene->_gameBoardSide[2]._outpostStation[1]._cardId = 1; + scene->_gameBoardSide[2]._outpostStation[1]._card.postInit(); + scene->_gameBoardSide[2]._outpostStation[1]._card.setVisage(1332); + scene->_gameBoardSide[2]._outpostStation[1]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[1]._stationPos, 0); + scene->_gameBoardSide[2]._outpostStation[1]._card.hide(); - scene->_item2._object1.setStrip(scene->_arrunkObj1337[2]._arr1[2]._object1._strip); - scene->_item2._object1.setFrame(scene->_arrunkObj1337[2]._arr1[2]._object1._frame); - scene->_item2._object1.animate(ANIM_MODE_NONE, NULL); + scene->_animatedCard._card.setStrip(scene->_gameBoardSide[2]._handCard[2]._card._strip); + scene->_animatedCard._card.setFrame(scene->_gameBoardSide[2]._handCard[2]._card._frame); + scene->_animatedCard._card.animate(ANIM_MODE_NONE, NULL); - scene->_arrunkObj1337[2]._arr1[2]._field34 = 0; - scene->_arrunkObj1337[2]._arr1[2]._object1.remove(); + scene->_gameBoardSide[2]._handCard[2]._cardId = 0; + scene->_gameBoardSide[2]._handCard[2]._card.remove(); - scene->_item2._object1.setPosition(scene->_arrunkObj1337[2]._arr1[2]._field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._handCard[2]._stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_arrunkObj1337[2]._arr2[1]._field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[2]._outpostStation[1]._stationPos, this); } break; case 3: { - scene->_item2._object1.hide(); - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr2[1]); + scene->_animatedCard._card.hide(); + scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[1]); scene->_aSound1.play(59); R2_GLOBALS._sceneObjects->draw(); - skipFrames(60); + waitFrames(60); scene->actionDisplay(1331, 13, 159, 10, 1, 200, 0, 7, 0, 154, 154); - scene->_arrunkObj1337[2]._arr2[1]._field34 = scene->_arrunkObj1337[2]._arr1[3]._field34; + scene->_gameBoardSide[2]._outpostStation[1]._cardId = scene->_gameBoardSide[2]._handCard[3]._cardId; - scene->_item2._object1.setStrip(scene->_arrunkObj1337[2]._arr1[3]._object1._strip); - scene->_item2._object1.setFrame(scene->_arrunkObj1337[2]._arr1[3]._object1._frame); + scene->_animatedCard._card.setStrip(scene->_gameBoardSide[2]._handCard[3]._card._strip); + scene->_animatedCard._card.setFrame(scene->_gameBoardSide[2]._handCard[3]._card._frame); - scene->_arrunkObj1337[2]._arr1[3]._field34 = 0; - scene->_arrunkObj1337[2]._arr1[3]._object1.remove(); + scene->_gameBoardSide[2]._handCard[3]._cardId = 0; + scene->_gameBoardSide[2]._handCard[3]._card.remove(); - scene->_item2._object1.setPosition(scene->_arrunkObj1337[2]._arr1[3]._field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._handCard[3]._stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_arrunkObj1337[2]._arr2[1]._field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[2]._outpostStation[1]._stationPos, this); } break; case 4: { - scene->_item2._object1.hide(); - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr2[1]); + scene->_animatedCard._card.hide(); + scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[1]); scene->_aSound1.play(59); - scene->_item7._field34 = 1; - scene->_item7._object1.hide(); + scene->_discardPile._cardId = 1; + scene->_discardPile._card.hide(); - scene->_item2._object1.setStrip(5); - scene->_item2._object1.setFrame(1); - scene->_item2._object1.animate(ANIM_MODE_2, NULL); - scene->_item2._object1.setPosition(scene->_arrunkObj1337[2]._arr2[1]._field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setStrip(5); + scene->_animatedCard._card.setFrame(1); + scene->_animatedCard._card.animate(ANIM_MODE_2, NULL); + scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._outpostStation[1]._stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_item7._field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_discardPile._stationPos, this); } break; case 5: { - scene->_item2._object1.hide(); + scene->_animatedCard._card.hide(); - scene->_item7._object1.postInit(); - scene->_item7._object1.setVisage(1332); - scene->_item7._object1.setPosition(scene->_item7._field36, 0); - scene->setAnimationInfo(&scene->_item7); + scene->_discardPile._card.postInit(); + scene->_discardPile._card.setVisage(1332); + scene->_discardPile._card.setPosition(scene->_discardPile._stationPos, 0); + scene->setAnimationInfo(&scene->_discardPile); scene->_aSound2.play(61); R2_GLOBALS._sceneObjects->draw(); - skipFrames(60); + waitFrames(60); scene->actionDisplay(1331, 14, 159, 10, 1, 200, 0, 7, 0, 154, 154); - scene->_arrunkObj1337[2]._arr3[0]._object1.postInit(); - scene->_arrunkObj1337[2]._arr3[0]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr3[0]._object1.setPosition(scene->_arrunkObj1337[2]._arr3[0]._field36, 0); - scene->_arrunkObj1337[2]._arr3[0]._object1.hide(); + scene->_gameBoardSide[2]._delayPile[0]._card.postInit(); + scene->_gameBoardSide[2]._delayPile[0]._card.setVisage(1332); + scene->_gameBoardSide[2]._delayPile[0]._card.setPosition(scene->_gameBoardSide[2]._delayPile[0]._stationPos, 0); + scene->_gameBoardSide[2]._delayPile[0]._card.hide(); - scene->_arrunkObj1337[3]._arr1[2]._field34 = 0; - scene->_arrunkObj1337[3]._arr1[2].remove(); + scene->_gameBoardSide[3]._handCard[2]._cardId = 0; + scene->_gameBoardSide[3]._handCard[2].remove(); - scene->_item2._object1.setPosition(scene->_arrunkObj1337[3]._arr1[2]._field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_gameBoardSide[3]._handCard[2]._stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_arrunkObj1337[2]._arr3[0]._field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[2]._delayPile[0]._stationPos, this); } break; case 6: { - scene->_item2._object1.hide(); - scene->_arrunkObj1337[2]._arr3[0]._field34 = 21; - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr3[0]); + scene->_animatedCard._card.hide(); + scene->_gameBoardSide[2]._delayPile[0]._cardId = 21; + scene->setAnimationInfo(&scene->_gameBoardSide[2]._delayPile[0]); scene->_aSound1.play(57); R2_GLOBALS._sceneObjects->draw(); - skipFrames(60); + waitFrames(60); scene->actionDisplay(1331, 15, 159, 10, 1, 200, 0, 7, 0, 154, 154); int tmpVal = 15; @@ -2679,89 +2686,89 @@ void Scene1337::Action1::signal() { for (i = 0; i <= 7; i++) { tmpVal += 29; - scene->_arrObject1[i].postInit(); - scene->_arrObject1[i].setVisage(1332); - scene->_arrObject1[i].setPosition(Common::Point(tmpVal, 90), 0); - scene->_arrObject1[i].setStrip(3); - scene->_arrObject1[i].fixPriority(190); - - scene->_arrObject2[i].postInit(); - scene->_arrObject2[i].setVisage(1332); - scene->_arrObject2[i].setPosition(Common::Point(tmpVal, 90), 0); - scene->_arrObject2[i].setStrip(7); - scene->_arrObject2[i].setFrame(1); - scene->_arrObject2[i].fixPriority(180); - } - - scene->_arrObject1[0].setFrame(1); - scene->_arrObject1[1].setFrame(3); - scene->_arrObject1[2].setFrame(6); - scene->_arrObject1[3].setFrame(8); - scene->_arrObject1[4].setFrame(9); - scene->_arrObject1[5].setFrame(10); - scene->_arrObject1[6].setFrame(11); - scene->_arrObject1[7].setFrame(12); + scene->_upperDisplayCard[i].postInit(); + scene->_upperDisplayCard[i].setVisage(1332); + scene->_upperDisplayCard[i].setPosition(Common::Point(tmpVal, 90), 0); + scene->_upperDisplayCard[i].setStrip(3); + scene->_upperDisplayCard[i].fixPriority(190); + + scene->_lowerDisplayCard[i].postInit(); + scene->_lowerDisplayCard[i].setVisage(1332); + scene->_lowerDisplayCard[i].setPosition(Common::Point(tmpVal, 90), 0); + scene->_lowerDisplayCard[i].setStrip(7); + scene->_lowerDisplayCard[i].setFrame(1); + scene->_lowerDisplayCard[i].fixPriority(180); + } + + scene->_upperDisplayCard[0].setFrame(1); + scene->_upperDisplayCard[1].setFrame(3); + scene->_upperDisplayCard[2].setFrame(6); + scene->_upperDisplayCard[3].setFrame(8); + scene->_upperDisplayCard[4].setFrame(9); + scene->_upperDisplayCard[5].setFrame(10); + scene->_upperDisplayCard[6].setFrame(11); + scene->_upperDisplayCard[7].setFrame(12); R2_GLOBALS._sceneObjects->draw(); - skipFrames(240); + waitFrames(240); - scene->_arrObject1[0].remove(); - scene->_arrObject1[1].remove(); - scene->_arrObject1[2].remove(); - scene->_arrObject1[3].remove(); - scene->_arrObject1[4].remove(); - scene->_arrObject1[5].remove(); - scene->_arrObject1[6].remove(); - scene->_arrObject1[7].remove(); + scene->_upperDisplayCard[0].remove(); + scene->_upperDisplayCard[1].remove(); + scene->_upperDisplayCard[2].remove(); + scene->_upperDisplayCard[3].remove(); + scene->_upperDisplayCard[4].remove(); + scene->_upperDisplayCard[5].remove(); + scene->_upperDisplayCard[6].remove(); + scene->_upperDisplayCard[7].remove(); - scene->_arrObject2[0].remove(); - scene->_arrObject2[1].remove(); - scene->_arrObject2[2].remove(); - scene->_arrObject2[3].remove(); - scene->_arrObject2[4].remove(); - scene->_arrObject2[5].remove(); - scene->_arrObject2[6].remove(); - scene->_arrObject2[7].remove(); + scene->_lowerDisplayCard[0].remove(); + scene->_lowerDisplayCard[1].remove(); + scene->_lowerDisplayCard[2].remove(); + scene->_lowerDisplayCard[3].remove(); + scene->_lowerDisplayCard[4].remove(); + scene->_lowerDisplayCard[5].remove(); + scene->_lowerDisplayCard[6].remove(); + scene->_lowerDisplayCard[7].remove(); - scene->_item7._field34 = scene->_arrunkObj1337[2]._arr3[0]._field34; + scene->_discardPile._cardId = scene->_gameBoardSide[2]._delayPile[0]._cardId; - scene->_arrunkObj1337[2]._arr3[0]._field34 = 0; - scene->_arrunkObj1337[2]._arr3[0]._object1.remove(); + scene->_gameBoardSide[2]._delayPile[0]._cardId = 0; + scene->_gameBoardSide[2]._delayPile[0]._card.remove(); - scene->_item2._object1.setPosition(scene->_arrunkObj1337[2]._arr3[0]._field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._delayPile[0]._stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_item7._field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_discardPile._stationPos, this); } break; case 7: { - scene->_item2._object1.hide(); - scene->setAnimationInfo(&scene->_item7); + scene->_animatedCard._card.hide(); + scene->setAnimationInfo(&scene->_discardPile); scene->_aSound2.play(61); R2_GLOBALS._sceneObjects->draw(); - scene->_arrunkObj1337[2]._arr3[0]._object1.postInit(); - scene->_arrunkObj1337[2]._arr3[0]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr3[0]._object1.setPosition(scene->_arrunkObj1337[2]._arr3[0]._field36, 0); - scene->_arrunkObj1337[2]._arr3[0]._object1.hide(); + scene->_gameBoardSide[2]._delayPile[0]._card.postInit(); + scene->_gameBoardSide[2]._delayPile[0]._card.setVisage(1332); + scene->_gameBoardSide[2]._delayPile[0]._card.setPosition(scene->_gameBoardSide[2]._delayPile[0]._stationPos, 0); + scene->_gameBoardSide[2]._delayPile[0]._card.hide(); - scene->_arrunkObj1337[3]._arr1[1]._field34 = 0; - scene->_arrunkObj1337[3]._arr1[1].remove(); + scene->_gameBoardSide[3]._handCard[1]._cardId = 0; + scene->_gameBoardSide[3]._handCard[1].remove(); - scene->_item2._object1.setPosition(scene->_arrunkObj1337[3]._arr1[1]._field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_gameBoardSide[3]._handCard[1]._stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_arrunkObj1337[2]._arr3[0]._field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[2]._delayPile[0]._stationPos, this); } break; case 8: { - scene->_item2._object1.hide(); - scene->_arrunkObj1337[2]._arr3[0]._field34 = 14; - scene->setAnimationInfo(&scene->_arrunkObj1337[2]._arr3[0]); + scene->_animatedCard._card.hide(); + scene->_gameBoardSide[2]._delayPile[0]._cardId = 14; + scene->setAnimationInfo(&scene->_gameBoardSide[2]._delayPile[0]); scene->_aSound1.play(57); R2_GLOBALS._sceneObjects->draw(); @@ -2772,219 +2779,219 @@ void Scene1337::Action1::signal() { for (i = 0; i <= 3; i++) { tmpVal += 29; - scene->_arrObject1[i].postInit(); - scene->_arrObject1[i].setVisage(1332); - scene->_arrObject1[i].setPosition(Common::Point(tmpVal, 71), 0); - scene->_arrObject1[i].setStrip(3); - scene->_arrObject1[i].fixPriority(190); + scene->_upperDisplayCard[i].postInit(); + scene->_upperDisplayCard[i].setVisage(1332); + scene->_upperDisplayCard[i].setPosition(Common::Point(tmpVal, 71), 0); + scene->_upperDisplayCard[i].setStrip(3); + scene->_upperDisplayCard[i].fixPriority(190); - scene->_arrObject2[i].postInit(); - scene->_arrObject2[i].setVisage(1332); - scene->_arrObject2[i].setPosition(Common::Point(tmpVal, 71), 0); - scene->_arrObject2[i].setStrip(7); - scene->_arrObject2[i].setFrame(1); - scene->_arrObject2[i].fixPriority(180); + scene->_lowerDisplayCard[i].postInit(); + scene->_lowerDisplayCard[i].setVisage(1332); + scene->_lowerDisplayCard[i].setPosition(Common::Point(tmpVal, 71), 0); + scene->_lowerDisplayCard[i].setStrip(7); + scene->_lowerDisplayCard[i].setFrame(1); + scene->_lowerDisplayCard[i].fixPriority(180); } - scene->_arrObject1[0].setFrame(2); - scene->_arrObject1[1].setFrame(5); - scene->_arrObject1[2].setFrame(7); - scene->_arrObject1[3].setFrame(15); + scene->_upperDisplayCard[0].setFrame(2); + scene->_upperDisplayCard[1].setFrame(5); + scene->_upperDisplayCard[2].setFrame(7); + scene->_upperDisplayCard[3].setFrame(15); R2_GLOBALS._sceneObjects->draw(); - skipFrames(240); + waitFrames(240); scene->actionDisplay(1331, 17, 159, 10, 1, 200, 0, 7, 0, 154, 154); tmpVal = 72; for (i = 4; i <= 7; i++) { tmpVal += 29; - scene->_arrObject1[i].postInit(); - scene->_arrObject1[i].setVisage(1332); - scene->_arrObject1[i].setPosition(Common::Point(tmpVal, 100), 0); - scene->_arrObject1[i].setStrip(4); - scene->_arrObject1[i].fixPriority(190); + scene->_upperDisplayCard[i].postInit(); + scene->_upperDisplayCard[i].setVisage(1332); + scene->_upperDisplayCard[i].setPosition(Common::Point(tmpVal, 100), 0); + scene->_upperDisplayCard[i].setStrip(4); + scene->_upperDisplayCard[i].fixPriority(190); - scene->_arrObject2[i].postInit(); - scene->_arrObject2[i].setVisage(1332); - scene->_arrObject2[i].setPosition(Common::Point(tmpVal, 100), 0); - scene->_arrObject2[i].setStrip(7); - scene->_arrObject2[i].setFrame(1); - scene->_arrObject2[i].fixPriority(180); + scene->_lowerDisplayCard[i].postInit(); + scene->_lowerDisplayCard[i].setVisage(1332); + scene->_lowerDisplayCard[i].setPosition(Common::Point(tmpVal, 100), 0); + scene->_lowerDisplayCard[i].setStrip(7); + scene->_lowerDisplayCard[i].setFrame(1); + scene->_lowerDisplayCard[i].fixPriority(180); } - scene->_arrObject1[4].setFrame(1); - scene->_arrObject1[5].setFrame(5); - scene->_arrObject1[6].setFrame(7); - scene->_arrObject1[7].setFrame(3); + scene->_upperDisplayCard[4].setFrame(1); + scene->_upperDisplayCard[5].setFrame(5); + scene->_upperDisplayCard[6].setFrame(7); + scene->_upperDisplayCard[7].setFrame(3); R2_GLOBALS._sceneObjects->draw(); - skipFrames(240); + waitFrames(240); - scene->_arrObject1[0].remove(); - scene->_arrObject1[1].remove(); - scene->_arrObject1[2].remove(); - scene->_arrObject1[3].remove(); - scene->_arrObject1[4].remove(); - scene->_arrObject1[5].remove(); - scene->_arrObject1[6].remove(); - scene->_arrObject1[7].remove(); + scene->_upperDisplayCard[0].remove(); + scene->_upperDisplayCard[1].remove(); + scene->_upperDisplayCard[2].remove(); + scene->_upperDisplayCard[3].remove(); + scene->_upperDisplayCard[4].remove(); + scene->_upperDisplayCard[5].remove(); + scene->_upperDisplayCard[6].remove(); + scene->_upperDisplayCard[7].remove(); - scene->_arrObject2[0].remove(); - scene->_arrObject2[1].remove(); - scene->_arrObject2[2].remove(); - scene->_arrObject2[3].remove(); - scene->_arrObject2[4].remove(); - scene->_arrObject2[5].remove(); - scene->_arrObject2[6].remove(); - scene->_arrObject2[7].remove(); + scene->_lowerDisplayCard[0].remove(); + scene->_lowerDisplayCard[1].remove(); + scene->_lowerDisplayCard[2].remove(); + scene->_lowerDisplayCard[3].remove(); + scene->_lowerDisplayCard[4].remove(); + scene->_lowerDisplayCard[5].remove(); + scene->_lowerDisplayCard[6].remove(); + scene->_lowerDisplayCard[7].remove(); - scene->_item7._field34 = scene->_arrunkObj1337[2]._arr1[0]._field34; + scene->_discardPile._cardId = scene->_gameBoardSide[2]._handCard[0]._cardId; - scene->_item2._object1.setStrip(scene->_arrunkObj1337[2]._arr1[0]._object1._strip); - scene->_item2._object1.setFrame(scene->_arrunkObj1337[2]._arr1[0]._object1._frame); - scene->_item2._object1.animate(ANIM_MODE_NONE, NULL); + scene->_animatedCard._card.setStrip(scene->_gameBoardSide[2]._handCard[0]._card._strip); + scene->_animatedCard._card.setFrame(scene->_gameBoardSide[2]._handCard[0]._card._frame); + scene->_animatedCard._card.animate(ANIM_MODE_NONE, NULL); - scene->_arrunkObj1337[2]._arr1[0]._field34 = 0; - scene->_arrunkObj1337[2]._arr1[0]._object1.remove(); + scene->_gameBoardSide[2]._handCard[0]._cardId = 0; + scene->_gameBoardSide[2]._handCard[0]._card.remove(); - scene->_item2._object1.setPosition(scene->_arrunkObj1337[2]._arr1[0]._field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._handCard[0]._stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_arrunkObj1337[2]._arr3[0]._field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[2]._delayPile[0]._stationPos, this); } break; case 9: { scene->_aSound1.play(58); - scene->_arrunkObj1337[2]._arr3[0]._field34 = 0; - scene->_arrunkObj1337[2]._arr3[0].remove(); - scene->_item2._object1.setStrip(5); - scene->_item2._object1.setFrame(1); - scene->_item2._object1.animate(ANIM_MODE_2, NULL); - scene->_item2._object1.setPosition(scene->_arrunkObj1337[2]._arr3[0]._field36, 0); - scene->_item2._object1.show(); + scene->_gameBoardSide[2]._delayPile[0]._cardId = 0; + scene->_gameBoardSide[2]._delayPile[0].remove(); + scene->_animatedCard._card.setStrip(5); + scene->_animatedCard._card.setFrame(1); + scene->_animatedCard._card.animate(ANIM_MODE_2, NULL); + scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._delayPile[0]._stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_item7._field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_discardPile._stationPos, this); } break; case 10: { - scene->_item2._object1.hide(); - scene->setAnimationInfo(&scene->_item7); + scene->_animatedCard._card.hide(); + scene->setAnimationInfo(&scene->_discardPile); scene->_aSound2.play(61); R2_GLOBALS._sceneObjects->draw(); scene->actionDisplay(1331, 18, 159, 10, 1, 200, 0, 7, 0, 154, 154); - scene->_arrObject1[0].postInit(); - scene->_arrObject1[0].setVisage(1332); - scene->_arrObject1[0].setPosition(Common::Point(131, 71), 0); - scene->_arrObject1[0].fixPriority(190); - scene->_arrObject1[0].setStrip(3); - scene->_arrObject1[0].setFrame(4); - - scene->_arrObject2[0].postInit(); - scene->_arrObject2[0].setVisage(1332); - scene->_arrObject2[0].setPosition(Common::Point(131, 71), 0); - scene->_arrObject2[0].setStrip(7); - scene->_arrObject2[0].setFrame(1); - scene->_arrObject2[0].fixPriority(180); - - scene->_arrObject1[1].postInit(); - scene->_arrObject1[1].setVisage(1332); - scene->_arrObject1[1].setPosition(Common::Point(160, 71), 0); - scene->_arrObject1[1].fixPriority(190); - scene->_arrObject1[1].setStrip(3); - scene->_arrObject1[1].setFrame(16); - - scene->_arrObject2[1].postInit(); - scene->_arrObject2[1].setVisage(1332); - scene->_arrObject2[1].setPosition(Common::Point(160, 71), 0); - scene->_arrObject2[1].setStrip(7); - scene->_arrObject2[1].setFrame(1); - scene->_arrObject2[1].fixPriority(180); - - scene->_arrObject1[2].postInit(); - scene->_arrObject1[2].setVisage(1332); - scene->_arrObject1[2].setPosition(Common::Point(131, 100), 0); - scene->_arrObject1[2].fixPriority(190); - scene->_arrObject1[2].setStrip(4); - scene->_arrObject1[2].setFrame(4); - - scene->_arrObject2[2].postInit(); - scene->_arrObject2[2].setVisage(1332); - scene->_arrObject2[2].setPosition(Common::Point(131, 100), 0); - scene->_arrObject2[2].setStrip(7); - scene->_arrObject2[2].setFrame(1); - scene->_arrObject2[2].fixPriority(180); - - scene->_arrObject1[3].postInit(); - scene->_arrObject1[3].setVisage(1332); - scene->_arrObject1[3].setPosition(Common::Point(160, 100), 0); - scene->_arrObject1[3].fixPriority(190); - scene->_arrObject1[3].setStrip(4); - scene->_arrObject1[3].setFrame(2); - - scene->_arrObject2[3].postInit(); - scene->_arrObject2[3].setVisage(1332); - scene->_arrObject2[3].setPosition(Common::Point(160, 100), 0); - scene->_arrObject2[3].setStrip(7); - scene->_arrObject2[3].setFrame(1); - scene->_arrObject2[3].fixPriority(180); + scene->_upperDisplayCard[0].postInit(); + scene->_upperDisplayCard[0].setVisage(1332); + scene->_upperDisplayCard[0].setPosition(Common::Point(131, 71), 0); + scene->_upperDisplayCard[0].fixPriority(190); + scene->_upperDisplayCard[0].setStrip(3); + scene->_upperDisplayCard[0].setFrame(4); + + scene->_lowerDisplayCard[0].postInit(); + scene->_lowerDisplayCard[0].setVisage(1332); + scene->_lowerDisplayCard[0].setPosition(Common::Point(131, 71), 0); + scene->_lowerDisplayCard[0].setStrip(7); + scene->_lowerDisplayCard[0].setFrame(1); + scene->_lowerDisplayCard[0].fixPriority(180); + + scene->_upperDisplayCard[1].postInit(); + scene->_upperDisplayCard[1].setVisage(1332); + scene->_upperDisplayCard[1].setPosition(Common::Point(160, 71), 0); + scene->_upperDisplayCard[1].fixPriority(190); + scene->_upperDisplayCard[1].setStrip(3); + scene->_upperDisplayCard[1].setFrame(16); + + scene->_lowerDisplayCard[1].postInit(); + scene->_lowerDisplayCard[1].setVisage(1332); + scene->_lowerDisplayCard[1].setPosition(Common::Point(160, 71), 0); + scene->_lowerDisplayCard[1].setStrip(7); + scene->_lowerDisplayCard[1].setFrame(1); + scene->_lowerDisplayCard[1].fixPriority(180); + + scene->_upperDisplayCard[2].postInit(); + scene->_upperDisplayCard[2].setVisage(1332); + scene->_upperDisplayCard[2].setPosition(Common::Point(131, 100), 0); + scene->_upperDisplayCard[2].fixPriority(190); + scene->_upperDisplayCard[2].setStrip(4); + scene->_upperDisplayCard[2].setFrame(4); + + scene->_lowerDisplayCard[2].postInit(); + scene->_lowerDisplayCard[2].setVisage(1332); + scene->_lowerDisplayCard[2].setPosition(Common::Point(131, 100), 0); + scene->_lowerDisplayCard[2].setStrip(7); + scene->_lowerDisplayCard[2].setFrame(1); + scene->_lowerDisplayCard[2].fixPriority(180); + + scene->_upperDisplayCard[3].postInit(); + scene->_upperDisplayCard[3].setVisage(1332); + scene->_upperDisplayCard[3].setPosition(Common::Point(160, 100), 0); + scene->_upperDisplayCard[3].fixPriority(190); + scene->_upperDisplayCard[3].setStrip(4); + scene->_upperDisplayCard[3].setFrame(2); + + scene->_lowerDisplayCard[3].postInit(); + scene->_lowerDisplayCard[3].setVisage(1332); + scene->_lowerDisplayCard[3].setPosition(Common::Point(160, 100), 0); + scene->_lowerDisplayCard[3].setStrip(7); + scene->_lowerDisplayCard[3].setFrame(1); + scene->_lowerDisplayCard[3].fixPriority(180); R2_GLOBALS._sceneObjects->draw(); - skipFrames(240); + waitFrames(240); - scene->_arrObject1[0].remove(); - scene->_arrObject1[1].remove(); - scene->_arrObject1[2].remove(); - scene->_arrObject1[3].remove(); + scene->_upperDisplayCard[0].remove(); + scene->_upperDisplayCard[1].remove(); + scene->_upperDisplayCard[2].remove(); + scene->_upperDisplayCard[3].remove(); - scene->_arrObject2[0].remove(); - scene->_arrObject2[1].remove(); - scene->_arrObject2[2].remove(); - scene->_arrObject2[3].remove(); + scene->_lowerDisplayCard[0].remove(); + scene->_lowerDisplayCard[1].remove(); + scene->_lowerDisplayCard[2].remove(); + scene->_lowerDisplayCard[3].remove(); - scene->_object1.setFrame(1); - scene->_object1.show(); - scene->_object1.animate(ANIM_MODE_2, NULL); + scene->_currentPlayerArrow.setFrame(1); + scene->_currentPlayerArrow.show(); + scene->_currentPlayerArrow.animate(ANIM_MODE_2, NULL); R2_GLOBALS._sceneObjects->draw(); scene->actionDisplay(1331, 19, 159, 10, 1, 220, 0, 7, 0, 154, 154); - scene->_object1.hide(); + scene->_currentPlayerArrow.hide(); scene->actionDisplay(1331, 20, 159, 10, 1, 220, 0, 7, 0, 154, 154); scene->actionDisplay(1331, 21, 159, 10, 1, 220, 0, 7, 0, 154, 154); - scene->_item7._field34 = scene->_arrunkObj1337[2]._arr1[1]._field34; + scene->_discardPile._cardId = scene->_gameBoardSide[2]._handCard[1]._cardId; - scene->_item2._object1.setStrip(scene->_arrunkObj1337[2]._arr1[1]._object1._strip); - scene->_item2._object1.setFrame(scene->_arrunkObj1337[2]._arr1[1]._object1._frame); - scene->_item2._object1.animate(ANIM_MODE_NONE, NULL); + scene->_animatedCard._card.setStrip(scene->_gameBoardSide[2]._handCard[1]._card._strip); + scene->_animatedCard._card.setFrame(scene->_gameBoardSide[2]._handCard[1]._card._frame); + scene->_animatedCard._card.animate(ANIM_MODE_NONE, NULL); - scene->_arrunkObj1337[2]._arr1[1]._field34 = 0; - scene->_arrunkObj1337[2]._arr1[1]._object1.remove(); + scene->_gameBoardSide[2]._handCard[1]._cardId = 0; + scene->_gameBoardSide[2]._handCard[1]._card.remove(); - scene->_item2._object1.setPosition(scene->_arrunkObj1337[2]._arr1[1]._field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._handCard[1]._stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_item7._field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_discardPile._stationPos, this); } break; case 11: { - scene->_item2._object1.hide(); - scene->setAnimationInfo(&scene->_item7); + scene->_animatedCard._card.hide(); + scene->setAnimationInfo(&scene->_discardPile); scene->_aSound2.play(61); - scene->_item2._object1.setStrip(5); - scene->_item2._object1.setFrame(1); - scene->_item2._object1.animate(ANIM_MODE_2, NULL); + scene->_animatedCard._card.setStrip(5); + scene->_animatedCard._card.setFrame(1); + scene->_animatedCard._card.animate(ANIM_MODE_2, NULL); R2_GLOBALS._sceneObjects->draw(); @@ -2992,38 +2999,38 @@ void Scene1337::Action1::signal() { int i = -1; for (i = 0; i <= 3; i ++) { - scene->_arrunkObj1337[3]._arr1[i]._field34 = 0; - scene->_arrunkObj1337[3]._arr1[i]._object1.remove(); + scene->_gameBoardSide[3]._handCard[i]._cardId = 0; + scene->_gameBoardSide[3]._handCard[i]._card.remove(); - scene->_arrunkObj1337[2]._arr1[i]._field34 = 0; - scene->_arrunkObj1337[2]._arr1[i]._object1.remove(); + scene->_gameBoardSide[2]._handCard[i]._cardId = 0; + scene->_gameBoardSide[2]._handCard[i]._card.remove(); - scene->_arrunkObj1337[0]._arr1[i]._field34 = 0; - scene->_arrunkObj1337[0]._arr1[i]._object1.remove(); + scene->_gameBoardSide[0]._handCard[i]._cardId = 0; + scene->_gameBoardSide[0]._handCard[i]._card.remove(); - scene->_arrunkObj1337[1]._arr1[i]._field34 = 0; - scene->_arrunkObj1337[1]._arr1[i]._object1.remove(); + scene->_gameBoardSide[1]._handCard[i]._cardId = 0; + scene->_gameBoardSide[1]._handCard[i]._card.remove(); } for (i = 0; i <= 7; i++) { - scene->_arrunkObj1337[3]._arr2[i]._field34 = 0; - scene->_arrunkObj1337[3]._arr2[i]._object1.remove(); + scene->_gameBoardSide[3]._outpostStation[i]._cardId = 0; + scene->_gameBoardSide[3]._outpostStation[i]._card.remove(); - scene->_arrunkObj1337[2]._arr2[i]._field34 = 0; - scene->_arrunkObj1337[2]._arr2[i]._object1.remove(); + scene->_gameBoardSide[2]._outpostStation[i]._cardId = 0; + scene->_gameBoardSide[2]._outpostStation[i]._card.remove(); - scene->_arrunkObj1337[0]._arr2[i]._field34 = 0; - scene->_arrunkObj1337[0]._arr2[i]._object1.remove(); + scene->_gameBoardSide[0]._outpostStation[i]._cardId = 0; + scene->_gameBoardSide[0]._outpostStation[i]._card.remove(); - scene->_arrunkObj1337[1]._arr2[i]._field34 = 0; - scene->_arrunkObj1337[1]._arr2[i]._object1.remove(); + scene->_gameBoardSide[1]._outpostStation[i]._cardId = 0; + scene->_gameBoardSide[1]._outpostStation[i]._card.remove(); } - scene->_arrunkObj1337[2]._arr3[0]._field34 = 0; - scene->_arrunkObj1337[2]._arr3[0]._object1.remove(); + scene->_gameBoardSide[2]._delayPile[0]._cardId = 0; + scene->_gameBoardSide[2]._delayPile[0]._card.remove(); - scene->_item7._field34 = 0; - scene->_item7._object1.remove(); + scene->_discardPile._cardId = 0; + scene->_discardPile._card.remove(); scene->_background2.remove(); } @@ -3041,40 +3048,43 @@ void Scene1337::Action1::signal() { } } +/** + * Shuffle cards animation + */ void Scene1337::Action2::signal() { Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene; switch (_actionIndex++) { case 0: - scene->_item3._object1.postInit(); - scene->_item3._object1.setVisage(1332); - scene->_item3._object1.setStrip(8); - scene->_item3._object1.setFrame(1); - scene->_item3._object1.fixPriority(300); - scene->_item3._object1.setPosition(Common::Point(156, 108)); + scene->_shuffleAnimation._card.postInit(); + scene->_shuffleAnimation._card.setVisage(1332); + scene->_shuffleAnimation._card.setStrip(8); + scene->_shuffleAnimation._card.setFrame(1); + scene->_shuffleAnimation._card.fixPriority(300); + scene->_shuffleAnimation._card.setPosition(Common::Point(156, 108)); - scene->_item7._object1.remove(); - scene->_item7._field34 = 0; + scene->_discardPile._card.remove(); + scene->_discardPile._cardId = 0; scene->_aSound1.play(60); - scene->_item3._object1.animate(ANIM_MODE_5, this); + scene->_shuffleAnimation._card.animate(ANIM_MODE_5, this); break; case 1: - scene->_item3._object1.setFrame(1); + scene->_shuffleAnimation._card.setFrame(1); scene->_aSound1.play(60); - scene->_item3._object1.animate(ANIM_MODE_5, this); + scene->_shuffleAnimation._card.animate(ANIM_MODE_5, this); break; case 2: { Common::Point pt(156, 108); NpcMover *mover = new NpcMover(); - scene->_item3._object1.addMover(mover, &pt, this); + scene->_shuffleAnimation._card.addMover(mover, &pt, this); } break; case 3: - scene->_item3._object1.remove(); + scene->_shuffleAnimation._card.remove(); scene->_background2.setup2(1332, 5, 1, 162, 95, 110, 1); - scene->_field423C = 1; + scene->_shuffleEndedFl = true; break; default: break; @@ -3084,268 +3094,268 @@ void Scene1337::Action2::signal() { void Scene1337::Action3::signal() { Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene; - scene->_item2._object1.setPosition(Common::Point(162, 95), 0); + scene->_animatedCard._card.setPosition(Common::Point(162, 95), 0); switch (_actionIndex++) { case 0: { - scene->_item2._object1._moveDiff = Common::Point(30, 30); - scene->_item2._object1.setVisage(1332); - scene->_item2._object1.setStrip(5); - scene->_item2._object1.setFrame(1); - scene->_item2._object1.fixPriority(400); - scene->_item2._object1.animate(ANIM_MODE_2, NULL); + scene->_animatedCard._card._moveDiff = Common::Point(30, 30); + scene->_animatedCard._card.setVisage(1332); + scene->_animatedCard._card.setStrip(5); + scene->_animatedCard._card.setFrame(1); + scene->_animatedCard._card.fixPriority(400); + scene->_animatedCard._card.animate(ANIM_MODE_2, NULL); scene->_aSound2.play(61); Common::Point pt(283, 146); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &pt, this); + scene->_animatedCard._card.addMover(mover, &pt, this); - scene->_item2._object1.show(); - scene->_arrunkObj1337[1]._arr1[0]._field34 = scene->_field3E28[scene->_field3E24]; + scene->_animatedCard._card.show(); + scene->_gameBoardSide[1]._handCard[0]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; } break; case 1: { - scene->_arrunkObj1337[1]._arr1[0]._object1.postInit(); - scene->_arrunkObj1337[1]._arr1[0]._object1._moveDiff = Common::Point(30, 30); - scene->_arrunkObj1337[1]._arr1[0]._object1.setVisage(1332); - scene->_arrunkObj1337[1]._arr1[0]._object1.setPosition(scene->_arrunkObj1337[1]._arr1[0]._field36, 0); - scene->_arrunkObj1337[1]._arr1[0]._object1.setStrip(1); - scene->_arrunkObj1337[1]._arr1[0]._object1.setFrame(4); - scene->_arrunkObj1337[1]._arr1[0]._object1.fixPriority(170); + scene->_gameBoardSide[1]._handCard[0]._card.postInit(); + scene->_gameBoardSide[1]._handCard[0]._card._moveDiff = Common::Point(30, 30); + scene->_gameBoardSide[1]._handCard[0]._card.setVisage(1332); + scene->_gameBoardSide[1]._handCard[0]._card.setPosition(scene->_gameBoardSide[1]._handCard[0]._stationPos, 0); + scene->_gameBoardSide[1]._handCard[0]._card.setStrip(1); + scene->_gameBoardSide[1]._handCard[0]._card.setFrame(4); + scene->_gameBoardSide[1]._handCard[0]._card.fixPriority(170); scene->_aSound2.play(61); Common::Point pt(10, 174); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &pt, this); + scene->_animatedCard._card.addMover(mover, &pt, this); - scene->_arrunkObj1337[2]._arr1[0]._field34 = scene->_field3E28[scene->_field3E24]; + scene->_gameBoardSide[2]._handCard[0]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; } break; case 2: { - scene->_arrunkObj1337[2]._arr1[0]._object1.postInit(); - scene->_arrunkObj1337[2]._arr1[0]._object1._moveDiff = Common::Point(30, 30); - scene->_arrunkObj1337[2]._arr1[0]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr1[0]._object1.setPosition(scene->_arrunkObj1337[2]._arr1[0]._field36, 0); - scene->_arrunkObj1337[2]._arr1[0]._object1.fixPriority(170); - if (scene->_arrunkObj1337[2]._arr1[0]._field34 > 9) { - if (scene->_arrunkObj1337[2]._arr1[0]._field34 > 25) { - scene->_arrunkObj1337[2]._arr1[0]._object1.setStrip(4); - scene->_arrunkObj1337[2]._arr1[0]._object1.setFrame(scene->_arrunkObj1337[2]._arr1[0]._field34 - 25); + scene->_gameBoardSide[2]._handCard[0]._card.postInit(); + scene->_gameBoardSide[2]._handCard[0]._card._moveDiff = Common::Point(30, 30); + scene->_gameBoardSide[2]._handCard[0]._card.setVisage(1332); + scene->_gameBoardSide[2]._handCard[0]._card.setPosition(scene->_gameBoardSide[2]._handCard[0]._stationPos, 0); + scene->_gameBoardSide[2]._handCard[0]._card.fixPriority(170); + if (scene->_gameBoardSide[2]._handCard[0]._cardId > 9) { + if (scene->_gameBoardSide[2]._handCard[0]._cardId > 25) { + scene->_gameBoardSide[2]._handCard[0]._card.setStrip(4); + scene->_gameBoardSide[2]._handCard[0]._card.setFrame(scene->_gameBoardSide[2]._handCard[0]._cardId - 25); } else { - scene->_arrunkObj1337[2]._arr1[0]._object1.setStrip(3); - scene->_arrunkObj1337[2]._arr1[0]._object1.setFrame(scene->_arrunkObj1337[2]._arr1[0]._field34 - 9); + scene->_gameBoardSide[2]._handCard[0]._card.setStrip(3); + scene->_gameBoardSide[2]._handCard[0]._card.setFrame(scene->_gameBoardSide[2]._handCard[0]._cardId - 9); } } else { - scene->_arrunkObj1337[2]._arr1[0]._object1.setStrip(2); - scene->_arrunkObj1337[2]._arr1[0]._object1.setFrame(scene->_arrunkObj1337[2]._arr1[0]._field34); + scene->_gameBoardSide[2]._handCard[0]._card.setStrip(2); + scene->_gameBoardSide[2]._handCard[0]._card.setFrame(scene->_gameBoardSide[2]._handCard[0]._cardId); } scene->_aSound2.play(61); Common::Point pt(14, 14); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &pt, this); + scene->_animatedCard._card.addMover(mover, &pt, this); - scene->_arrunkObj1337[3]._arr1[0]._field34 = scene->_field3E28[scene->_field3E24]; + scene->_gameBoardSide[3]._handCard[0]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; } break; case 3: { - scene->_arrunkObj1337[3]._arr1[0]._object1.postInit(); - scene->_arrunkObj1337[3]._arr1[0]._object1._moveDiff = Common::Point(30, 30); - scene->_arrunkObj1337[3]._arr1[0]._object1.setVisage(1332); - scene->_arrunkObj1337[3]._arr1[0]._object1.setPosition(scene->_arrunkObj1337[3]._arr1[0]._field36, 0); - scene->_arrunkObj1337[3]._arr1[0]._object1.setStrip(1); - scene->_arrunkObj1337[3]._arr1[0]._object1.setFrame(3); - scene->_arrunkObj1337[3]._arr1[0]._object1.fixPriority(170); + scene->_gameBoardSide[3]._handCard[0]._card.postInit(); + scene->_gameBoardSide[3]._handCard[0]._card._moveDiff = Common::Point(30, 30); + scene->_gameBoardSide[3]._handCard[0]._card.setVisage(1332); + scene->_gameBoardSide[3]._handCard[0]._card.setPosition(scene->_gameBoardSide[3]._handCard[0]._stationPos, 0); + scene->_gameBoardSide[3]._handCard[0]._card.setStrip(1); + scene->_gameBoardSide[3]._handCard[0]._card.setFrame(3); + scene->_gameBoardSide[3]._handCard[0]._card.fixPriority(170); scene->_aSound2.play(61); Common::Point pt(280, 5); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &pt, this); + scene->_animatedCard._card.addMover(mover, &pt, this); - scene->_arrunkObj1337[0]._arr1[0]._field34 = scene->_field3E28[scene->_field3E24]; + scene->_gameBoardSide[0]._handCard[0]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; } break; case 4: { - scene->_arrunkObj1337[0]._arr1[0]._object1.postInit(); - scene->_arrunkObj1337[0]._arr1[0]._object1._moveDiff = Common::Point(30,30); - scene->_arrunkObj1337[0]._arr1[0]._object1.setVisage(1332); - scene->_arrunkObj1337[0]._arr1[0]._object1.setPosition(scene->_arrunkObj1337[0]._arr1[0]._field36, 0); - scene->_arrunkObj1337[0]._arr1[0]._object1.setStrip(5); - scene->_arrunkObj1337[0]._arr1[0]._object1.setFrame(1); - scene->_arrunkObj1337[0]._arr1[0]._object1.fixPriority(170); + scene->_gameBoardSide[0]._handCard[0]._card.postInit(); + scene->_gameBoardSide[0]._handCard[0]._card._moveDiff = Common::Point(30,30); + scene->_gameBoardSide[0]._handCard[0]._card.setVisage(1332); + scene->_gameBoardSide[0]._handCard[0]._card.setPosition(scene->_gameBoardSide[0]._handCard[0]._stationPos, 0); + scene->_gameBoardSide[0]._handCard[0]._card.setStrip(5); + scene->_gameBoardSide[0]._handCard[0]._card.setFrame(1); + scene->_gameBoardSide[0]._handCard[0]._card.fixPriority(170); scene->_aSound2.play(61); Common::Point pt(283, 124); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &pt, this); + scene->_animatedCard._card.addMover(mover, &pt, this); - scene->_arrunkObj1337[1]._arr1[1]._field34 = scene->_field3E28[scene->_field3E24]; + scene->_gameBoardSide[1]._handCard[1]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; } break; case 5: { - scene->_arrunkObj1337[1]._arr1[1]._object1.postInit(); - scene->_arrunkObj1337[1]._arr1[1]._object1._moveDiff = Common::Point(30, 30); - scene->_arrunkObj1337[1]._arr1[1]._object1.setVisage(1332); - scene->_arrunkObj1337[1]._arr1[1]._object1.setPosition(scene->_arrunkObj1337[1]._arr1[1]._field36, 0); - scene->_arrunkObj1337[1]._arr1[1]._object1.setStrip(1); - scene->_arrunkObj1337[1]._arr1[1]._object1.setFrame(4); - scene->_arrunkObj1337[1]._arr1[1]._object1.fixPriority(170); + scene->_gameBoardSide[1]._handCard[1]._card.postInit(); + scene->_gameBoardSide[1]._handCard[1]._card._moveDiff = Common::Point(30, 30); + scene->_gameBoardSide[1]._handCard[1]._card.setVisage(1332); + scene->_gameBoardSide[1]._handCard[1]._card.setPosition(scene->_gameBoardSide[1]._handCard[1]._stationPos, 0); + scene->_gameBoardSide[1]._handCard[1]._card.setStrip(1); + scene->_gameBoardSide[1]._handCard[1]._card.setFrame(4); + scene->_gameBoardSide[1]._handCard[1]._card.fixPriority(170); scene->_aSound2.play(61); Common::Point pt(37, 174); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &pt, this); + scene->_animatedCard._card.addMover(mover, &pt, this); - scene->_arrunkObj1337[2]._arr1[1]._field34 = scene->_field3E28[scene->_field3E24]; + scene->_gameBoardSide[2]._handCard[1]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; } break; case 6: { - scene->_arrunkObj1337[2]._arr1[1]._object1.postInit(); - scene->_arrunkObj1337[2]._arr1[1]._object1._moveDiff = Common::Point(30, 30); - scene->_arrunkObj1337[2]._arr1[1]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr1[1]._object1.setPosition(scene->_arrunkObj1337[2]._arr1[1]._field36, 0); - scene->_arrunkObj1337[2]._arr1[1]._object1.fixPriority(170); - - if (scene->_arrunkObj1337[2]._arr1[1]._field34 > 9) { - if (scene->_arrunkObj1337[2]._arr1[1]._field34 > 25) { - scene->_arrunkObj1337[2]._arr1[1]._object1.setStrip(4); - scene->_arrunkObj1337[2]._arr1[1]._object1.setFrame(scene->_arrunkObj1337[2]._arr1[1]._field34 - 25); + scene->_gameBoardSide[2]._handCard[1]._card.postInit(); + scene->_gameBoardSide[2]._handCard[1]._card._moveDiff = Common::Point(30, 30); + scene->_gameBoardSide[2]._handCard[1]._card.setVisage(1332); + scene->_gameBoardSide[2]._handCard[1]._card.setPosition(scene->_gameBoardSide[2]._handCard[1]._stationPos, 0); + scene->_gameBoardSide[2]._handCard[1]._card.fixPriority(170); + + if (scene->_gameBoardSide[2]._handCard[1]._cardId > 9) { + if (scene->_gameBoardSide[2]._handCard[1]._cardId > 25) { + scene->_gameBoardSide[2]._handCard[1]._card.setStrip(4); + scene->_gameBoardSide[2]._handCard[1]._card.setFrame(scene->_gameBoardSide[2]._handCard[1]._cardId - 25); } else { - scene->_arrunkObj1337[2]._arr1[1]._object1.setStrip(3); - scene->_arrunkObj1337[2]._arr1[1]._object1.setFrame(scene->_arrunkObj1337[2]._arr1[1]._field34 - 9); + scene->_gameBoardSide[2]._handCard[1]._card.setStrip(3); + scene->_gameBoardSide[2]._handCard[1]._card.setFrame(scene->_gameBoardSide[2]._handCard[1]._cardId - 9); } } else { - scene->_arrunkObj1337[2]._arr1[1]._object1.setStrip(2); - scene->_arrunkObj1337[2]._arr1[1]._object1.setFrame(scene->_arrunkObj1337[2]._arr1[1]._field34); + scene->_gameBoardSide[2]._handCard[1]._card.setStrip(2); + scene->_gameBoardSide[2]._handCard[1]._card.setFrame(scene->_gameBoardSide[2]._handCard[1]._cardId); } scene->_aSound2.play(61); Common::Point pt(14, 36); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &pt, this); + scene->_animatedCard._card.addMover(mover, &pt, this); - scene->_arrunkObj1337[3]._arr1[1]._field34 = scene->_field3E28[scene->_field3E24]; + scene->_gameBoardSide[3]._handCard[1]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; } break; case 7: { - scene->_arrunkObj1337[3]._arr1[1]._object1.postInit(); - scene->_arrunkObj1337[3]._arr1[1]._object1._moveDiff = Common::Point(30, 30); - scene->_arrunkObj1337[3]._arr1[1]._object1.setVisage(1332); - scene->_arrunkObj1337[3]._arr1[1]._object1.setPosition(scene->_arrunkObj1337[3]._arr1[1]._field36); - scene->_arrunkObj1337[3]._arr1[1]._object1.setStrip(1); - scene->_arrunkObj1337[3]._arr1[1]._object1.setFrame(3); - scene->_arrunkObj1337[3]._arr1[1]._object1.fixPriority(170); + scene->_gameBoardSide[3]._handCard[1]._card.postInit(); + scene->_gameBoardSide[3]._handCard[1]._card._moveDiff = Common::Point(30, 30); + scene->_gameBoardSide[3]._handCard[1]._card.setVisage(1332); + scene->_gameBoardSide[3]._handCard[1]._card.setPosition(scene->_gameBoardSide[3]._handCard[1]._stationPos); + scene->_gameBoardSide[3]._handCard[1]._card.setStrip(1); + scene->_gameBoardSide[3]._handCard[1]._card.setFrame(3); + scene->_gameBoardSide[3]._handCard[1]._card.fixPriority(170); scene->_aSound2.play(61); Common::Point pt(253, 5); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &pt, this); + scene->_animatedCard._card.addMover(mover, &pt, this); - scene->_arrunkObj1337[0]._arr1[1]._field34 = scene->_field3E28[scene->_field3E24]; + scene->_gameBoardSide[0]._handCard[1]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; } break; case 8: { - scene->_arrunkObj1337[0]._arr1[1]._object1.postInit(); - scene->_arrunkObj1337[0]._arr1[1]._object1._moveDiff = Common::Point(30, 30); - scene->_arrunkObj1337[0]._arr1[1]._object1.setVisage(1332); - scene->_arrunkObj1337[0]._arr1[1]._object1.setPosition(scene->_arrunkObj1337[0]._arr1[1]._field36, 0); - scene->_arrunkObj1337[0]._arr1[1]._object1.setStrip(5); - scene->_arrunkObj1337[0]._arr1[1]._object1.setFrame(1); - scene->_arrunkObj1337[0]._arr1[1]._object1.fixPriority(170); + scene->_gameBoardSide[0]._handCard[1]._card.postInit(); + scene->_gameBoardSide[0]._handCard[1]._card._moveDiff = Common::Point(30, 30); + scene->_gameBoardSide[0]._handCard[1]._card.setVisage(1332); + scene->_gameBoardSide[0]._handCard[1]._card.setPosition(scene->_gameBoardSide[0]._handCard[1]._stationPos, 0); + scene->_gameBoardSide[0]._handCard[1]._card.setStrip(5); + scene->_gameBoardSide[0]._handCard[1]._card.setFrame(1); + scene->_gameBoardSide[0]._handCard[1]._card.fixPriority(170); scene->_aSound2.play(61); Common::Point pt(283, 102); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &pt, this); + scene->_animatedCard._card.addMover(mover, &pt, this); - scene->_arrunkObj1337[1]._arr1[2]._field34 = scene->_field3E28[scene->_field3E24]; + scene->_gameBoardSide[1]._handCard[2]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; } break; case 9: { - scene->_arrunkObj1337[1]._arr1[2]._object1.postInit(); - scene->_arrunkObj1337[1]._arr1[2]._object1._moveDiff = Common::Point(30, 30); - scene->_arrunkObj1337[1]._arr1[2]._object1.setVisage(1332); - scene->_arrunkObj1337[1]._arr1[2]._object1.setPosition(scene->_arrunkObj1337[1]._arr1[2]._field36, 0); - scene->_arrunkObj1337[1]._arr1[2]._object1.setStrip(1); - scene->_arrunkObj1337[1]._arr1[2]._object1.setFrame(4); - scene->_arrunkObj1337[1]._arr1[2]._object1.fixPriority(170); + scene->_gameBoardSide[1]._handCard[2]._card.postInit(); + scene->_gameBoardSide[1]._handCard[2]._card._moveDiff = Common::Point(30, 30); + scene->_gameBoardSide[1]._handCard[2]._card.setVisage(1332); + scene->_gameBoardSide[1]._handCard[2]._card.setPosition(scene->_gameBoardSide[1]._handCard[2]._stationPos, 0); + scene->_gameBoardSide[1]._handCard[2]._card.setStrip(1); + scene->_gameBoardSide[1]._handCard[2]._card.setFrame(4); + scene->_gameBoardSide[1]._handCard[2]._card.fixPriority(170); scene->_aSound2.play(61); Common::Point pt(64, 174); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &pt, this); + scene->_animatedCard._card.addMover(mover, &pt, this); - scene->_arrunkObj1337[2]._arr1[2]._field34 = scene->_field3E28[scene->_field3E24]; + scene->_gameBoardSide[2]._handCard[2]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; } break; case 10: { - scene->_arrunkObj1337[2]._arr1[2]._object1.postInit(); - scene->_arrunkObj1337[2]._arr1[2]._object1._moveDiff = Common::Point(30, 30); - scene->_arrunkObj1337[2]._arr1[2]._object1.setVisage(1332); - scene->_arrunkObj1337[2]._arr1[2]._object1.setPosition(scene->_arrunkObj1337[2]._arr1[2]._field36, 0); - scene->_arrunkObj1337[2]._arr1[2]._object1.fixPriority(170); - - if (scene->_arrunkObj1337[2]._arr1[2]._field34 > 9) { - if (scene->_arrunkObj1337[2]._arr1[2]._field34 > 25) { - scene->_arrunkObj1337[2]._arr1[2]._object1.setStrip(4); - scene->_arrunkObj1337[2]._arr1[2]._object1.setFrame(scene->_arrunkObj1337[2]._arr1[2]._field34 - 25); + scene->_gameBoardSide[2]._handCard[2]._card.postInit(); + scene->_gameBoardSide[2]._handCard[2]._card._moveDiff = Common::Point(30, 30); + scene->_gameBoardSide[2]._handCard[2]._card.setVisage(1332); + scene->_gameBoardSide[2]._handCard[2]._card.setPosition(scene->_gameBoardSide[2]._handCard[2]._stationPos, 0); + scene->_gameBoardSide[2]._handCard[2]._card.fixPriority(170); + + if (scene->_gameBoardSide[2]._handCard[2]._cardId > 9) { + if (scene->_gameBoardSide[2]._handCard[2]._cardId > 25) { + scene->_gameBoardSide[2]._handCard[2]._card.setStrip(4); + scene->_gameBoardSide[2]._handCard[2]._card.setFrame(scene->_gameBoardSide[2]._handCard[2]._cardId - 25); } else { - scene->_arrunkObj1337[2]._arr1[2]._object1.setStrip(3); - scene->_arrunkObj1337[2]._arr1[2]._object1.setFrame(scene->_arrunkObj1337[2]._arr1[2]._field34 - 9); + scene->_gameBoardSide[2]._handCard[2]._card.setStrip(3); + scene->_gameBoardSide[2]._handCard[2]._card.setFrame(scene->_gameBoardSide[2]._handCard[2]._cardId - 9); } } else { - scene->_arrunkObj1337[2]._arr1[2]._object1.setStrip(2); - scene->_arrunkObj1337[2]._arr1[2]._object1.setFrame(scene->_arrunkObj1337[2]._arr1[2]._field34); + scene->_gameBoardSide[2]._handCard[2]._card.setStrip(2); + scene->_gameBoardSide[2]._handCard[2]._card.setFrame(scene->_gameBoardSide[2]._handCard[2]._cardId); } scene->_aSound2.play(61); Common::Point pt(14, 58); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &pt, this); + scene->_animatedCard._card.addMover(mover, &pt, this); - scene->_arrunkObj1337[3]._arr1[2]._field34 = scene->_field3E28[scene->_field3E24]; + scene->_gameBoardSide[3]._handCard[2]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; } break; case 11: { - scene->_arrunkObj1337[3]._arr1[2]._object1.postInit(); - scene->_arrunkObj1337[3]._arr1[2]._object1._moveDiff = Common::Point(30, 30); - scene->_arrunkObj1337[3]._arr1[2]._object1.setVisage(1332); - scene->_arrunkObj1337[3]._arr1[2]._object1.setPosition(scene->_arrunkObj1337[3]._arr1[2]._field36, 0); - scene->_arrunkObj1337[3]._arr1[2]._object1.setStrip(1); - scene->_arrunkObj1337[3]._arr1[2]._object1.setFrame(3); - scene->_arrunkObj1337[3]._arr1[2]._object1.fixPriority(170); + scene->_gameBoardSide[3]._handCard[2]._card.postInit(); + scene->_gameBoardSide[3]._handCard[2]._card._moveDiff = Common::Point(30, 30); + scene->_gameBoardSide[3]._handCard[2]._card.setVisage(1332); + scene->_gameBoardSide[3]._handCard[2]._card.setPosition(scene->_gameBoardSide[3]._handCard[2]._stationPos, 0); + scene->_gameBoardSide[3]._handCard[2]._card.setStrip(1); + scene->_gameBoardSide[3]._handCard[2]._card.setFrame(3); + scene->_gameBoardSide[3]._handCard[2]._card.fixPriority(170); scene->_aSound2.play(61); Common::Point pt(226, 5); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &pt, this); + scene->_animatedCard._card.addMover(mover, &pt, this); - scene->_arrunkObj1337[0]._arr1[2]._field34 = scene->_field3E28[scene->_field3E24]; + scene->_gameBoardSide[0]._handCard[2]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; } break; case 12: - scene->_arrunkObj1337[0]._arr1[2]._object1.postInit(); - scene->_arrunkObj1337[0]._arr1[2]._object1._moveDiff = Common::Point(30, 30); - scene->_arrunkObj1337[0]._arr1[2]._object1.setVisage(1332); - scene->_arrunkObj1337[0]._arr1[2]._object1.setPosition(scene->_arrunkObj1337[0]._arr1[2]._field36, 0); - scene->_arrunkObj1337[0]._arr1[2]._object1.setStrip(5); - scene->_arrunkObj1337[0]._arr1[2]._object1.setFrame(1); - scene->_arrunkObj1337[0]._arr1[2]._object1.fixPriority(170); - scene->_arrunkObj1337[0]._arr1[2]._object1.hide(); + scene->_gameBoardSide[0]._handCard[2]._card.postInit(); + scene->_gameBoardSide[0]._handCard[2]._card._moveDiff = Common::Point(30, 30); + scene->_gameBoardSide[0]._handCard[2]._card.setVisage(1332); + scene->_gameBoardSide[0]._handCard[2]._card.setPosition(scene->_gameBoardSide[0]._handCard[2]._stationPos, 0); + scene->_gameBoardSide[0]._handCard[2]._card.setStrip(5); + scene->_gameBoardSide[0]._handCard[2]._card.setFrame(1); + scene->_gameBoardSide[0]._handCard[2]._card.fixPriority(170); + scene->_gameBoardSide[0]._handCard[2]._card.hide(); default: break; } if (_actionIndex > 12) { - scene->_field423E = 0; + scene->_currentPlayerNumb = 0; R2_GLOBALS._sceneObjects->draw(); scene->actionDisplay(1330, 0, 159, 10, 1, 200, 0, 7, 0, 154, 154); scene->subC20F9(); } else if (_actionIndex >= 1) { - scene->_field3E28[scene->_field3E24] = 0; - scene->_field3E24--; + scene->_availableCardsPile[scene->_cardsAvailableNumb] = 0; + scene->_cardsAvailableNumb--; } } @@ -3354,21 +3364,21 @@ void Scene1337::Action4::signal() { switch (_actionIndex++) { case 0: - if ((scene->_arrunkObj1337[scene->_field423E]._arr1[0]._field34 == 0) && (scene->subC264B(scene->_arrunkObj1337[scene->_field423E]._arr3[0]._field34))) { - if (scene->_field3E24 < 0) - scene->subC264B(scene->_arrunkObj1337[scene->_field423E]._arr3[0]._field34); - scene->_item2._object1.setPosition(Common::Point(162, 95), 0); - scene->_item2._object1.show(); + if ((scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._cardId == 0) && (scene->subC264B(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayPile[0]._cardId))) { + if (scene->_cardsAvailableNumb < 0) + scene->subC264B(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayPile[0]._cardId); + scene->_animatedCard._card.setPosition(Common::Point(162, 95), 0); + scene->_animatedCard._card.show(); scene->_aSound2.play(61); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_arrunkObj1337[scene->_field423E]._fieldB94, this); + scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldB94, this); - scene->_arrunkObj1337[scene->_field423E]._arr1[0]._field34 = scene->_field3E28[scene->_field3E24]; - scene->_field3E28[scene->_field3E24] = 0; - scene->_field3E24--; + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; + scene->_availableCardsPile[scene->_cardsAvailableNumb] = 0; + scene->_cardsAvailableNumb--; - if (scene->_field3E24 < 0) + if (scene->_cardsAvailableNumb < 0) scene->_background2.remove(); } else { // Self call, forcing next actionIndex @@ -3376,127 +3386,127 @@ void Scene1337::Action4::signal() { } break; case 1: - if ( ( scene->_item2._object1._position.x == scene->_arrunkObj1337[scene->_field423E]._fieldB94.x) - && ( scene->_item2._object1._position.y == scene->_arrunkObj1337[scene->_field423E]._fieldB94.y) ) { - scene->_arrunkObj1337[scene->_field423E]._arr1[0]._object1.postInit(); - scene->_arrunkObj1337[scene->_field423E]._arr1[0]._object1._moveDiff = Common::Point(30, 30); - scene->_arrunkObj1337[scene->_field423E]._arr1[0]._object1.setVisage(1332); - scene->_arrunkObj1337[scene->_field423E]._arr1[0]._object1.setPosition(scene->_arrunkObj1337[scene->_field423E]._arr1[0]._field36, 0); - scene->_arrunkObj1337[scene->_field423E]._arr1[0]._object1.setStrip(1); - scene->_arrunkObj1337[scene->_field423E]._arr1[0]._object1.setFrame(scene->_arrunkObj1337[scene->_field423E]._fieldBA4); - scene->_arrunkObj1337[scene->_field423E]._arr1[0]._object1.fixPriority(170); - } - - if ((scene->_field4248 == 1) || (scene->_field423E == 2)) - scene->setAnimationInfo(&scene->_arrunkObj1337[scene->_field423E]._arr1[0]); - - scene->_item2._object1.hide(); - if ((scene->_arrunkObj1337[scene->_field423E]._arr1[0]._field34 == 0) && (scene->subC264B(scene->_arrunkObj1337[scene->_field423E]._arr3[0]._field34 == 0))) { - if (scene->_field3E24 < 0) + if ( ( scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldB94.x) + && ( scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldB94.y) ) { + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.postInit(); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card._moveDiff = Common::Point(30, 30); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.setVisage(1332); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.setPosition(scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._stationPos, 0); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.setStrip(1); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.setFrame(scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldBA4); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.fixPriority(170); + } + + if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2)) + scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]); + + scene->_animatedCard._card.hide(); + if ((scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._cardId == 0) && (scene->subC264B(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayPile[0]._cardId == 0))) { + if (scene->_cardsAvailableNumb < 0) scene->shuffleCards(); - scene->_item2._object1.setPosition(Common::Point(162, 95)); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(Common::Point(162, 95)); + scene->_animatedCard._card.show(); scene->_aSound2.play(61); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_arrunkObj1337[scene->_field423E]._fieldB98, this); + scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldB98, this); - scene->_arrunkObj1337[scene->_field423E]._arr1[1]._field34 = scene->_field3E28[scene->_field3E24]; - scene->_field3E28[scene->_field3E24] = 0; - scene->_field3E24--; - if (scene->_field3E24 < 0) + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; + scene->_availableCardsPile[scene->_cardsAvailableNumb] = 0; + scene->_cardsAvailableNumb--; + if (scene->_cardsAvailableNumb < 0) scene->_background2.remove(); } else signal(); break; case 2: - if ( ( scene->_item2._object1._position.x == scene->_arrunkObj1337[scene->_field423E]._fieldB98.x) - && ( scene->_item2._object1._position.y == scene->_arrunkObj1337[scene->_field423E]._fieldB98.y) ) { - scene->_arrunkObj1337[scene->_field423E]._arr1[1]._object1.postInit(); - scene->_arrunkObj1337[scene->_field423E]._arr1[1]._object1._moveDiff = Common::Point(30, 30); - scene->_arrunkObj1337[scene->_field423E]._arr1[1]._object1.setVisage(1332); - scene->_arrunkObj1337[scene->_field423E]._arr1[1]._object1.setPosition(scene->_arrunkObj1337[scene->_field423E]._arr1[1]._field36, 0); - scene->_arrunkObj1337[scene->_field423E]._arr1[1]._object1.setStrip(1); - scene->_arrunkObj1337[scene->_field423E]._arr1[1]._object1.setFrame(scene->_arrunkObj1337[scene->_field423E]._fieldBA4); - scene->_arrunkObj1337[scene->_field423E]._arr1[1]._object1.fixPriority(170); - } - - if ((scene->_field4248 == 1) || (scene->_field423E == 2)) - scene->setAnimationInfo(&scene->_arrunkObj1337[scene->_field423E]._arr1[1]); - - scene->_item2._object1.hide(); - if ((scene->_arrunkObj1337[scene->_field423E]._arr1[2]._field34 == 0) && (scene->subC264B(scene->_arrunkObj1337[scene->_field423E]._arr3[0]._field34 == 0))) { - if (scene->_field3E24 < 0) + if ( ( scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldB98.x) + && ( scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldB98.y) ) { + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.postInit(); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card._moveDiff = Common::Point(30, 30); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.setVisage(1332); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.setPosition(scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._stationPos, 0); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.setStrip(1); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.setFrame(scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldBA4); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.fixPriority(170); + } + + if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2)) + scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]); + + scene->_animatedCard._card.hide(); + if ((scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._cardId == 0) && (scene->subC264B(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayPile[0]._cardId == 0))) { + if (scene->_cardsAvailableNumb < 0) scene->shuffleCards(); - scene->_item2._object1.setPosition(Common::Point(162, 95)); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(Common::Point(162, 95)); + scene->_animatedCard._card.show(); scene->_aSound2.play(61); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_arrunkObj1337[scene->_field423E]._fieldB9C, this); + scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldB9C, this); - scene->_arrunkObj1337[scene->_field423E]._arr1[2]._field34 = scene->_field3E28[scene->_field3E24]; - scene->_field3E28[scene->_field3E24] = 0; - scene->_field3E24--; - if (scene->_field3E24 < 0) + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; + scene->_availableCardsPile[scene->_cardsAvailableNumb] = 0; + scene->_cardsAvailableNumb--; + if (scene->_cardsAvailableNumb < 0) scene->_background2.remove(); } else signal(); break; case 3: - if ( ( scene->_item2._object1._position.x == scene->_arrunkObj1337[scene->_field423E]._fieldB9C.x) - && ( scene->_item2._object1._position.y == scene->_arrunkObj1337[scene->_field423E]._fieldB9C.y) ) { - scene->_arrunkObj1337[scene->_field423E]._arr1[2]._object1.postInit(); - scene->_arrunkObj1337[scene->_field423E]._arr1[2]._object1._moveDiff = Common::Point(30, 30); - scene->_arrunkObj1337[scene->_field423E]._arr1[2]._object1.setVisage(1332); - scene->_arrunkObj1337[scene->_field423E]._arr1[2]._object1.setPosition(scene->_arrunkObj1337[scene->_field423E]._arr1[2]._field36, 0); - scene->_arrunkObj1337[scene->_field423E]._arr1[2]._object1.setStrip(1); - scene->_arrunkObj1337[scene->_field423E]._arr1[2]._object1.setFrame(scene->_arrunkObj1337[scene->_field423E]._fieldBA4); - scene->_arrunkObj1337[scene->_field423E]._arr1[2]._object1.fixPriority(170); - } - - if ((scene->_field4248 == 1) || (scene->_field423E == 2)) - scene->setAnimationInfo(&scene->_arrunkObj1337[scene->_field423E]._arr1[2]); - - scene->_item2._object1.hide(); - if ((scene->_arrunkObj1337[scene->_field423E]._arr1[3]._field34 == 0) && (scene->subC264B(scene->_arrunkObj1337[scene->_field423E]._arr3[0]._field34 == 0))) { - if (scene->_field3E24 < 0) + if ( ( scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldB9C.x) + && ( scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldB9C.y) ) { + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.postInit(); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card._moveDiff = Common::Point(30, 30); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.setVisage(1332); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.setPosition(scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._stationPos, 0); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.setStrip(1); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.setFrame(scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldBA4); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.fixPriority(170); + } + + if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2)) + scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]); + + scene->_animatedCard._card.hide(); + if ((scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._cardId == 0) && (scene->subC264B(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayPile[0]._cardId == 0))) { + if (scene->_cardsAvailableNumb < 0) scene->shuffleCards(); - scene->_item2._object1.setPosition(Common::Point(162, 95)); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(Common::Point(162, 95)); + scene->_animatedCard._card.show(); scene->_aSound2.play(61); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_arrunkObj1337[scene->_field423E]._fieldBA0, this); + scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldBA0, this); - scene->_arrunkObj1337[scene->_field423E]._arr1[3]._field34 = scene->_field3E28[scene->_field3E24]; - scene->_field3E28[scene->_field3E24] = 0; - scene->_field3E24--; - if (scene->_field3E24 < 0) + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb]; + scene->_availableCardsPile[scene->_cardsAvailableNumb] = 0; + scene->_cardsAvailableNumb--; + if (scene->_cardsAvailableNumb < 0) scene->_background2.remove(); } else signal(); break; case 4: - if ( ( scene->_item2._object1._position.x == scene->_arrunkObj1337[scene->_field423E]._fieldBA0.x) - && ( scene->_item2._object1._position.y == scene->_arrunkObj1337[scene->_field423E]._fieldBA0.y) ) { - scene->_arrunkObj1337[scene->_field423E]._arr1[3]._object1.postInit(); - scene->_arrunkObj1337[scene->_field423E]._arr1[3]._object1._moveDiff = Common::Point(30, 30); - scene->_arrunkObj1337[scene->_field423E]._arr1[3]._object1.setVisage(1332); - scene->_arrunkObj1337[scene->_field423E]._arr1[3]._object1.setPosition(scene->_arrunkObj1337[scene->_field423E]._arr1[3]._field36, 0); - scene->_arrunkObj1337[scene->_field423E]._arr1[3]._object1.setStrip(1); - scene->_arrunkObj1337[scene->_field423E]._arr1[3]._object1.setFrame(scene->_arrunkObj1337[scene->_field423E]._fieldBA4); - scene->_arrunkObj1337[scene->_field423E]._arr1[3]._object1.fixPriority(170); - } - - if ((scene->_field4248 == 1) || (scene->_field423E == 2)) - scene->setAnimationInfo(&scene->_arrunkObj1337[scene->_field423E]._arr1[3]); - - scene->_item2._object1.hide(); - switch (scene->_field423E) { + if ( ( scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldBA0.x) + && ( scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldBA0.y) ) { + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.postInit(); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card._moveDiff = Common::Point(30, 30); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.setVisage(1332); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.setPosition(scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._stationPos, 0); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.setStrip(1); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.setFrame(scene->_gameBoardSide[scene->_currentPlayerNumb]._fieldBA4); + scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.fixPriority(170); + } + + if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2)) + scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]); + + scene->_animatedCard._card.hide(); + switch (scene->_currentPlayerNumb) { case 0: scene->subCF979(); break; @@ -3523,34 +3533,34 @@ void Scene1337::Action5::signal() { switch (_actionIndex++) { case 0: { - scene->_field3E28[scene->_field3E26] = scene->_field3EF0->_field34; + scene->_availableCardsPile[scene->_field3E26] = scene->_field3EF0->_cardId; scene->_field3E26--; - if (!g_globals->_sceneObjects->contains(&scene->_item7._object1)) { - scene->_item7._object1.postInit(); - scene->_item7._object1.hide(); - scene->_item7._object1.setVisage(1332); - scene->_item7._object1.setPosition(scene->_item7._field36, 0); - scene->_item7._object1.fixPriority(170); + if (!g_globals->_sceneObjects->contains(&scene->_discardPile._card)) { + scene->_discardPile._card.postInit(); + scene->_discardPile._card.hide(); + scene->_discardPile._card.setVisage(1332); + scene->_discardPile._card.setPosition(scene->_discardPile._stationPos, 0); + scene->_discardPile._card.fixPriority(170); } - scene->_item7._field34 = scene->_field3EF0->_field34; - scene->_field3EF0->_field34 = 0; - scene->_field3EF0->_object1.remove(); + scene->_discardPile._cardId = scene->_field3EF0->_cardId; + scene->_field3EF0->_cardId = 0; + scene->_field3EF0->_card.remove(); if (scene->_field3EF0 == &scene->_item6) { - subD18B5(5, 1, 4); + scene->setCursorData(5, 1, 4); scene->subC4CEC(); } - scene->_item2._object1.setPosition(scene->_field3EF0->_field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_field3EF0->_stationPos, 0); + scene->_animatedCard._card.show(); Common::Point pt(128, 95); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &pt, this); + scene->_animatedCard._card.addMover(mover, &pt, this); } break; case 1: - scene->_item2._object1.hide(); - scene->setAnimationInfo(&scene->_item7); + scene->_animatedCard._card.hide(); + scene->setAnimationInfo(&scene->_discardPile); scene->_aSound2.play(61); scene->subC20F9(); break; @@ -3564,29 +3574,29 @@ void Scene1337::Action6::signal() { switch (_actionIndex++) { case 0: { - scene->_field3EF4->_field34 = 1; - scene->_field3EF4->_object1.postInit(); - scene->_field3EF4->_object1.hide(); - scene->_field3EF4->_object1.setVisage(1332); - scene->_field3EF4->_object1.setPosition(scene->_field3EF4->_field36); - scene->_field3EF4->_object1.fixPriority(170); + scene->_field3EF4->_cardId = 1; + scene->_field3EF4->_card.postInit(); + scene->_field3EF4->_card.hide(); + scene->_field3EF4->_card.setVisage(1332); + scene->_field3EF4->_card.setPosition(scene->_field3EF4->_stationPos); + scene->_field3EF4->_card.fixPriority(170); - scene->_field3EF0->_field34 = 0; - scene->_field3EF0->_object1.remove(); + scene->_field3EF0->_cardId = 0; + scene->_field3EF0->_card.remove(); - scene->_item2._object1.setPosition(scene->_field3EF0->_field36); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_field3EF0->_stationPos); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_field3EF4->_field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_field3EF4->_stationPos, this); } break; case 1: - scene->_item2._object1.hide(); + scene->_animatedCard._card.hide(); scene->setAnimationInfo(scene->_field3EF4); scene->_aSound1.play(59); if (scene->_field3EF0 == &scene->_item6) { - subD18B5(5, 1, 4); + scene->setCursorData(5, 1, 4); scene->subC4CEC(); } scene->subC20F9(); @@ -3601,30 +3611,30 @@ void Scene1337::Action7::signal() { switch (_actionIndex++) { case 0: { - scene->_field3EF4->_field34 = scene->_field3EF0->_field34; + scene->_field3EF4->_cardId = scene->_field3EF0->_cardId; - scene->_field3EF0->_field34 = 0; - scene->_field3EF0->_object1.remove(); + scene->_field3EF0->_cardId = 0; + scene->_field3EF0->_card.remove(); - scene->_item2._object1.setPosition(scene->_field3EF0->_field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_field3EF0->_stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_field3EF4->_field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_field3EF4->_stationPos, this); } break; case 1: if (scene->_field3EF0 == &scene->_item6) { - subD18B5(5, 1, 4); + scene->setCursorData(5, 1, 4); scene->subC4CEC(); } scene->setAnimationInfo(scene->_field3EF4); scene->_aSound1.play(59); - scene->_item5._field34 = 1; - scene->_item5._field36.x = scene->_field3EF4->_field36.x; - scene->_item5._field36.y = scene->_field3EF4->_field36.y; - scene->_item5._object1.postInit(); - scene->_item5._object1.hide(); - scene->_item5._object1._flags = 0x200; + scene->_item5._cardId = 1; + scene->_item5._stationPos.x = scene->_field3EF4->_stationPos.x; + scene->_item5._stationPos.y = scene->_field3EF4->_stationPos.y; + scene->_item5._card.postInit(); + scene->_item5._card.hide(); + scene->_item5._card._flags = 0x200; scene->subC4A39(&scene->_item5); break; @@ -3638,24 +3648,24 @@ void Scene1337::Action8::signal() { switch (_actionIndex++) { case 0: { - scene->_field3E28[scene->_field3E26] = scene->_field3EF4->_field34; + scene->_availableCardsPile[scene->_field3E26] = scene->_field3EF4->_cardId; scene->_field3E26--; - scene->_field3EF4->_field34 = scene->_field3EF0->_field34; - scene->_field3EF0->_object1.remove(); + scene->_field3EF4->_cardId = scene->_field3EF0->_cardId; + scene->_field3EF0->_card.remove(); - scene->_item2._object1.setPosition(scene->_field3EF0->_field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_field3EF0->_stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_field3EF4->_field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_field3EF4->_stationPos, this); } break; case 1: - scene->_item2._object1.hide(); + scene->_animatedCard._card.hide(); if (scene->_field3EF0 == &scene->_item6) { - subD18B5(5, 1, 4); + scene->setCursorData(5, 1, 4); scene->subC4CEC(); } scene->setAnimationInfo(scene->_field3EF4); @@ -3672,30 +3682,30 @@ void Scene1337::Action9::signal() { switch (_actionIndex++) { case 0: { - scene->_field3EF4->_field34 = scene->_field3EF0->_field34; - scene->_field3EF4->_object1.postInit(); - scene->_field3EF4->_object1.hide(); - scene->_field3EF4->_object1.setVisage(1332); - scene->_field3EF4->_object1.setPosition(scene->_field3EF4->_field36, 0); - scene->_field3EF4->_object1.fixPriority(170); + scene->_field3EF4->_cardId = scene->_field3EF0->_cardId; + scene->_field3EF4->_card.postInit(); + scene->_field3EF4->_card.hide(); + scene->_field3EF4->_card.setVisage(1332); + scene->_field3EF4->_card.setPosition(scene->_field3EF4->_stationPos, 0); + scene->_field3EF4->_card.fixPriority(170); - scene->_field3EF0->_field34 = 0; - scene->_field3EF0->_object1.remove(); + scene->_field3EF0->_cardId = 0; + scene->_field3EF0->_card.remove(); - scene->_item2._object1.setPosition(scene->_field3EF0->_field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_field3EF0->_stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_field3EF4->_field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_field3EF4->_stationPos, this); } break; case 1: - scene->_item2._object1.hide(); + scene->_animatedCard._card.hide(); scene->setAnimationInfo(scene->_field3EF4); scene->_aSound1.play(57); if (scene->_field3EF0 == &scene->_item6) { - subD18B5(5, 1, 4); + scene->setCursorData(5, 1, 4); scene->subC4CEC(); } @@ -3711,29 +3721,29 @@ void Scene1337::Action10::signal() { switch (_actionIndex++) { case 0: { - scene->_field3EF8->_object1.postInit(); - scene->_field3EF8->_object1.hide(); - scene->_field3EF8->_object1.setVisage(1332); - scene->_field3EF8->_object1.setPosition(scene->_field3EF8->_field36, 0); - scene->_field3EF8->_object1.fixPriority(170); - scene->_field3EF8->_field34 = scene->_field3EF0->_field34; + scene->_field3EF8->_card.postInit(); + scene->_field3EF8->_card.hide(); + scene->_field3EF8->_card.setVisage(1332); + scene->_field3EF8->_card.setPosition(scene->_field3EF8->_stationPos, 0); + scene->_field3EF8->_card.fixPriority(170); + scene->_field3EF8->_cardId = scene->_field3EF0->_cardId; - scene->_field3EF0->_field34 = 0; - scene->_field3EF0->_object1.remove(); + scene->_field3EF0->_cardId = 0; + scene->_field3EF0->_card.remove(); if (scene->_field3EF0 == &scene->_item6) { - subD18B5(5, 1, 4); + scene->setCursorData(5, 1, 4); scene->subC4CEC(); } - scene->_item2._object1.setPosition(scene->_field3EF0->_field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_field3EF0->_stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_field3EF8->_field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_field3EF8->_stationPos, this); } break; case 1: { - scene->_item2._object1.hide(); + scene->_animatedCard._card.hide(); scene->setAnimationInfo(scene->_field3EF8); scene->_aSound1.play(57); @@ -3743,7 +3753,7 @@ void Scene1337::Action10::signal() { switch (scene->_field4240) { case 0: for (indexFound = 0; indexFound < 3; indexFound++) { - if (scene->_arrunkObj1337[0]._arr1[indexFound]._field34 == 29) { + if (scene->_gameBoardSide[0]._handCard[indexFound]._cardId == 29) { found = true; break; } @@ -3751,7 +3761,7 @@ void Scene1337::Action10::signal() { break; case 1: for (indexFound = 0; indexFound < 3; indexFound++) { - if (scene->_arrunkObj1337[1]._arr1[indexFound]._field34 == 29) { + if (scene->_gameBoardSide[1]._handCard[indexFound]._cardId == 29) { found = true; break; } @@ -3759,7 +3769,7 @@ void Scene1337::Action10::signal() { break; case 2: for (indexFound = 0; indexFound < 3; indexFound++) { - if (scene->_arrunkObj1337[2]._arr1[indexFound]._field34 == 29) { + if (scene->_gameBoardSide[2]._handCard[indexFound]._cardId == 29) { found = true; break; } @@ -3767,7 +3777,7 @@ void Scene1337::Action10::signal() { break; case 3: for (indexFound = 0; indexFound < 3; indexFound++) { - if (scene->_arrunkObj1337[3]._arr1[indexFound]._field34 == 29) { + if (scene->_gameBoardSide[3]._handCard[indexFound]._cardId == 29) { found = true; break; } @@ -3782,11 +3792,11 @@ void Scene1337::Action10::signal() { if (found) { switch (scene->_field4240) { case 0: - scene->subC51A0(&scene->_arrunkObj1337[0]._arr1[indexFound], scene->_field3EF8); + scene->subC51A0(&scene->_gameBoardSide[0]._handCard[indexFound], scene->_field3EF8); found2 = true; break; case 1: - scene->subC51A0(&scene->_arrunkObj1337[1]._arr1[indexFound], scene->_field3EF8); + scene->subC51A0(&scene->_gameBoardSide[1]._handCard[indexFound], scene->_field3EF8); found2 = true; break; case 2: @@ -3794,12 +3804,12 @@ void Scene1337::Action10::signal() { if (MessageDialog::show(USE_INTERCEPTOR, NO_MSG, YES_MSG) == 0) scene->subC4CEC(); else { - scene->subC51A0(&scene->_arrunkObj1337[2]._arr1[indexFound], scene->_field3EF8); + scene->subC51A0(&scene->_gameBoardSide[2]._handCard[indexFound], scene->_field3EF8); found2 = true; } break; case 3: - scene->subC51A0(&scene->_arrunkObj1337[3]._arr1[indexFound], scene->_field3EF8); + scene->subC51A0(&scene->_gameBoardSide[3]._handCard[indexFound], scene->_field3EF8); found2 = true; break; default: @@ -3813,14 +3823,14 @@ void Scene1337::Action10::signal() { if (scene->_field4240 == 2) { int j = 0; for (int i = 0; i <= 7; i++) { - if (scene->_arrunkObj1337[2]._arr2[i]._field34 != 0) + if (scene->_gameBoardSide[2]._outpostStation[i]._cardId != 0) ++j; } if (j <= 1) { for (int i = 0; i <= 7; i++) { - if (scene->_arrunkObj1337[2]._arr2[i]._field34 != 0) { - scene->_field3EF4 = &scene->_arrunkObj1337[2]._arr2[i]; + if (scene->_gameBoardSide[2]._outpostStation[i]._cardId != 0) { + scene->_field3EF4 = &scene->_gameBoardSide[2]._outpostStation[i]; break; } } @@ -3839,11 +3849,11 @@ void Scene1337::Action10::signal() { g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks); } - scene->_item6._field36 = event.mousePos; + scene->_item6._stationPos = event.mousePos; for (int i = 0; i <= 7; i++) { - if ((scene->subC2BF8(&scene->_arrunkObj1337[2]._arr2[i], scene->_item6._field36) != 0) && (scene->_arrunkObj1337[2]._arr2[i]._field34 != 0)) { - scene->_field3EF4 = &scene->_arrunkObj1337[2]._arr2[0]; + if ((scene->subC2BF8(&scene->_gameBoardSide[2]._outpostStation[i], scene->_item6._stationPos) != 0) && (scene->_gameBoardSide[2]._outpostStation[i]._cardId != 0)) { + scene->_field3EF4 = &scene->_gameBoardSide[2]._outpostStation[0]; found2 = true; break; } @@ -3853,20 +3863,20 @@ void Scene1337::Action10::signal() { } } - scene->_field3E28[scene->_field3E26] = scene->_field3EF4->_field34; + scene->_availableCardsPile[scene->_field3E26] = scene->_field3EF4->_cardId; scene->_field3E26--; - scene->_field3EF4->_field34 = 0; - scene->_field3EF4->_object1.remove(); + scene->_field3EF4->_cardId = 0; + scene->_field3EF4->_card.remove(); - scene->_item2._object1.setPosition(scene->_field3EF4->_field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_field3EF4->_stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_field3EF8->_field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_field3EF8->_stationPos, this); } break; case 2: - scene->_item2._object1.hide(); + scene->_animatedCard._card.hide(); scene->subC4A39(scene->_field3EF8); break; default: @@ -3881,29 +3891,29 @@ void Scene1337::Action11::signal() { switch (_actionIndex++) { case 0: { - scene->_field3EF4->_object1.postInit(); - scene->_field3EF4->_object1.hide(); - scene->_field3EF4->_object1.setVisage(1332); - scene->_field3EF4->_object1.setPosition(scene->_field3EF4->_field36, 0); - scene->_field3EF4->_object1.fixPriority(170); - scene->_field3EF4->_field34 = 25; + scene->_field3EF4->_card.postInit(); + scene->_field3EF4->_card.hide(); + scene->_field3EF4->_card.setVisage(1332); + scene->_field3EF4->_card.setPosition(scene->_field3EF4->_stationPos, 0); + scene->_field3EF4->_card.fixPriority(170); + scene->_field3EF4->_cardId = 25; if (scene->_field4240 == 2) { - scene->_item2._object1.setPosition(scene->_field3EF4->_field36, 0); - subD18B5(5, 1, 4); + scene->_animatedCard._card.setPosition(scene->_field3EF4->_stationPos, 0); + scene->setCursorData(5, 1, 4); } else { - scene->_field3EF0->_field34 = 0; - scene->_field3EF0->_object1.remove(); - scene->_item2._object1.setPosition(scene->_field3EF0->_field36, 0); + scene->_field3EF0->_cardId = 0; + scene->_field3EF0->_card.remove(); + scene->_animatedCard._card.setPosition(scene->_field3EF0->_stationPos, 0); } - scene->_item2._object1.show(); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_field3EF4->_field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_field3EF4->_stationPos, this); } break; case 1: { - scene->_item2._object1.hide(); + scene->_animatedCard._card.hide(); scene->setAnimationInfo(scene->_field3EF4); scene->_aSound1.play(57); @@ -3913,18 +3923,18 @@ void Scene1337::Action11::signal() { switch (scene->_field4242) { case 0: for (i = 0; i <= 3; i++) { - if (scene->_arrunkObj1337[0]._arr1[i]._field34 == 27) { + if (scene->_gameBoardSide[0]._handCard[i]._cardId == 27) { found = true; break; } } if ((found) && (scene->subC3E92(scene->_field4240) != -1)) { - scene->_field3EF0 = &scene->_arrunkObj1337[0]._arr1[i]; - scene->_field3EF4 = &scene->_arrunkObj1337[0]._arr4[0]; + scene->_field3EF0 = &scene->_gameBoardSide[0]._handCard[i]; + scene->_field3EF4 = &scene->_gameBoardSide[0]._arr4[0]; if (scene->_field4240 != 0) { int tmpVal = scene->subC3E92(scene->_field4240); - scene->_field3EF8 = &scene->_arrunkObj1337[scene->_field4240]._arr1[tmpVal]; + scene->_field3EF8 = &scene->_gameBoardSide[scene->_field4240]._handCard[tmpVal]; } scene->_item1.setAction(&scene->_action12); noAction = false; @@ -3932,18 +3942,18 @@ void Scene1337::Action11::signal() { break; case 1: for (i = 0; i <= 3; i++) { - if (scene->_arrunkObj1337[1]._arr1[i]._field34 == 27) { + if (scene->_gameBoardSide[1]._handCard[i]._cardId == 27) { found = true; break; } } if ((found) && (scene->subC3E92(scene->_field4240) != -1)) { - scene->_field3EF0 = &scene->_arrunkObj1337[1]._arr1[i]; - scene->_field3EF4 = &scene->_arrunkObj1337[1]._arr4[0]; + scene->_field3EF0 = &scene->_gameBoardSide[1]._handCard[i]; + scene->_field3EF4 = &scene->_gameBoardSide[1]._arr4[0]; if (scene->_field4240 != 1) { int tmpVal = scene->subC3E92(scene->_field4240); - scene->_field3EF8 = &scene->_arrunkObj1337[scene->_field4240]._arr1[tmpVal]; + scene->_field3EF8 = &scene->_gameBoardSide[scene->_field4240]._handCard[tmpVal]; } scene->_item1.setAction(&scene->_action12); noAction = false; @@ -3951,7 +3961,7 @@ void Scene1337::Action11::signal() { break; case 2: for (i = 0; i <= 3; i++) { - if (scene->_arrunkObj1337[2]._arr1[i]._field34 == 27) { + if (scene->_gameBoardSide[2]._handCard[i]._cardId == 27) { found = true; break; } @@ -3963,11 +3973,11 @@ void Scene1337::Action11::signal() { scene->subC4CEC(); else { scene->subC4CEC(); - scene->_field3EF0 = &scene->_arrunkObj1337[2]._arr1[i]; - scene->_field3EF4 = &scene->_arrunkObj1337[2]._arr4[0]; + scene->_field3EF0 = &scene->_gameBoardSide[2]._handCard[i]; + scene->_field3EF4 = &scene->_gameBoardSide[2]._arr4[0]; if (scene->_field4240 != 2) { int tmpVal = scene->subC3E92(scene->_field4240); - scene->_field3EF8 = &scene->_arrunkObj1337[scene->_field4240]._arr1[tmpVal]; + scene->_field3EF8 = &scene->_gameBoardSide[scene->_field4240]._handCard[tmpVal]; } scene->_item1.setAction(&scene->_action12); noAction = false; @@ -3976,18 +3986,18 @@ void Scene1337::Action11::signal() { break; case 3: for (i = 0; i <= 3; i++) { - if (scene->_arrunkObj1337[3]._arr1[i]._field34 == 27) { + if (scene->_gameBoardSide[3]._handCard[i]._cardId == 27) { found = true; break; } } if ((found) && (scene->subC3E92(scene->_field4240) != -1)) { - scene->_field3EF0 = &scene->_arrunkObj1337[3]._arr1[i]; - scene->_field3EF4 = &scene->_arrunkObj1337[3]._arr4[0]; + scene->_field3EF0 = &scene->_gameBoardSide[3]._handCard[i]; + scene->_field3EF4 = &scene->_gameBoardSide[3]._arr4[0]; if (scene->_field4240 != 3) { int tmpVal = scene->subC3E92(scene->_field4240); - scene->_field3EF8 = &scene->_arrunkObj1337[scene->_field4240]._arr1[tmpVal]; + scene->_field3EF8 = &scene->_gameBoardSide[scene->_field4240]._handCard[tmpVal]; } scene->_item1.setAction(&scene->_action12); noAction = false; @@ -4004,7 +4014,7 @@ void Scene1337::Action11::signal() { int count = 0; if (scene->_field4242 != 2) { for (i = 0; i <= 3; i++) { - if (scene->_arrunkObj1337[scene->_field4242]._arr1[i]._field34 == 0) + if (scene->_gameBoardSide[scene->_field4242]._handCard[i]._cardId == 0) ++count; } } @@ -4035,74 +4045,70 @@ void Scene1337::Action11::signal() { g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks); } - scene->_item6._field36 = event.mousePos; + scene->_item6._stationPos = event.mousePos; found = false; if (scene->_field4242 != 2) { for (i = 0; i <= 3; i++) { - if ((scene->subC2BF8(&scene->_arrunkObj1337[scene->_field4242]._arr1[i], scene->_item6._field36) != 0) && (scene->_arrunkObj1337[scene->_field4242]._arr1[i]._field34 != 0)) { - scene->_field3EF8 = &scene->_arrunkObj1337[scene->_field4242]._arr1[i]; + if ((scene->subC2BF8(&scene->_gameBoardSide[scene->_field4242]._handCard[i], scene->_item6._stationPos) != 0) && (scene->_gameBoardSide[scene->_field4242]._handCard[i]._cardId != 0)) { + scene->_field3EF8 = &scene->_gameBoardSide[scene->_field4242]._handCard[i]; found = true; break; } } } } // while - scene->_field4246 = 1; + scene->_field4246 = true; scene->subC4CEC(); } else { if (scene->_field4242 != 2) { int tmpVal = scene->subC3E92(scene->_field4242); - scene->_field3EF8 = &scene->_arrunkObj1337[scene->_field4242]._arr1[tmpVal]; + scene->_field3EF8 = &scene->_gameBoardSide[scene->_field4242]._handCard[tmpVal]; } } } - scene->_field3EF0->_object1.postInit(); - scene->_field3EF0->_object1.hide(); - scene->_field3EF0->_object1.setVisage(1332); - scene->_field3EF0->_object1.setPosition(scene->_field3EF0->_field36, 0); - scene->_field3EF0->_object1.fixPriority(170); - scene->_field3EF0->_object1.setStrip2(1); - scene->_field3EF0->_field34 = scene->_field3EF8->_field34; + scene->_field3EF0->_card.postInit(); + scene->_field3EF0->_card.hide(); + scene->_field3EF0->_card.setVisage(1332); + scene->_field3EF0->_card.setPosition(scene->_field3EF0->_stationPos, 0); + scene->_field3EF0->_card.fixPriority(170); + scene->_field3EF0->_card.setStrip2(1); + scene->_field3EF0->_cardId = scene->_field3EF8->_cardId; - scene->_field3EF8->_field34 = 0; - scene->_field3EF8->_object1.remove(); + scene->_field3EF8->_cardId = 0; + scene->_field3EF8->_card.remove(); - scene->_item2._object1.setPosition(scene->_field3EF8->_field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_field3EF8->_stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_field3EF0->_field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_field3EF0->_stationPos, this); } break; case 2: - scene->_item2._object1.hide(); + scene->_animatedCard._card.hide(); switch (scene->_field4240) { case 0: - scene->_field3EF0->_object1.setFrame(2); - scene->_field3EF0->_object1.show(); - scene->_field423E--; - scene->_field4244 = 0; + scene->_field3EF0->_card.setFrame(2); + scene->_field3EF0->_card.show(); break; case 1: - scene->_field3EF0->_object1.setFrame(4); - scene->_field3EF0->_object1.show(); - scene->_field423E--; - scene->_field4244 = 0; + scene->_field3EF0->_card.setFrame(4); + scene->_field3EF0->_card.show(); break; case 3: - scene->_field3EF0->_object1.setFrame(3); - scene->_field3EF0->_object1.show(); - scene->_field423E--; - scene->_field4244 = 0; + scene->_field3EF0->_card.setFrame(3); + scene->_field3EF0->_card.show(); break; default: scene->setAnimationInfo(scene->_field3EF0); break; } + scene->_currentPlayerNumb--; + scene->_field4244 = false; scene->subC4A39(scene->_field3EF4); break; default: @@ -4118,19 +4124,19 @@ void Scene1337::Action12::signal() { signal(); break; case 1: { - scene->_field3E28[scene->_field3E26] = scene->_field3EF4->_field34; - scene->_field3EF4->_field34 = scene->_field3EF0->_field34; - scene->_field3EF0->_field34 = 0; - scene->_field3EF0->_object1.remove(); - scene->_item2._object1.setPosition(scene->_field3EF0->_field36, 0); - scene->_item2._object1.show(); + scene->_availableCardsPile[scene->_field3E26] = scene->_field3EF4->_cardId; + scene->_field3EF4->_cardId = scene->_field3EF0->_cardId; + scene->_field3EF0->_cardId = 0; + scene->_field3EF0->_card.remove(); + scene->_animatedCard._card.setPosition(scene->_field3EF0->_stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_field3EF4->_field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_field3EF4->_stationPos, this); } break; case 2: - scene->_item2._object1.hide(); + scene->_animatedCard._card.hide(); scene->setAnimationInfo(scene->_field3EF4); scene->_aSound1.play(58); if (scene->_field4242 == 2) { @@ -4139,19 +4145,19 @@ void Scene1337::Action12::signal() { switch (scene->_field4240) { case 0: for (i = 0; i <= 3; i++) { - if (scene->_arrunkObj1337[0]._arr1[i]._field34 != 0) + if (scene->_gameBoardSide[0]._handCard[i]._cardId != 0) ++count; } break; case 1: for (i = 0; i <= 3; i++) { - if (scene->_arrunkObj1337[3]._arr1[i]._field34 != 0) + if (scene->_gameBoardSide[3]._handCard[i]._cardId != 0) ++count; } break; case 3: for (i = 0; i <= 3; i++) { - if (scene->_arrunkObj1337[3]._arr1[i]._field34 != 0) + if (scene->_gameBoardSide[3]._handCard[i]._cardId != 0) ++count; } break; @@ -4186,13 +4192,13 @@ void Scene1337::Action12::signal() { g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks); } - scene->_item6._field36 = event.mousePos; + scene->_item6._stationPos = event.mousePos; if (scene->_field4240 == 0) { for (i = 0; i <= 3; i++) { - if ((scene->subC2BF8(&scene->_arrunkObj1337[0]._arr1[i], scene->_item6._field36) != 0) && (scene->_arrunkObj1337[0]._arr1[i]._field34 != 0)) { + if ((scene->subC2BF8(&scene->_gameBoardSide[0]._handCard[i], scene->_item6._stationPos) != 0) && (scene->_gameBoardSide[0]._handCard[i]._cardId != 0)) { found = true; - scene->_field3EF8 = &scene->_arrunkObj1337[0]._arr1[i]; + scene->_field3EF8 = &scene->_gameBoardSide[0]._handCard[i]; break; } } @@ -4200,9 +4206,9 @@ void Scene1337::Action12::signal() { if (scene->_field4240 == 3) { for (i = 0; i <= 3; i++) { - if ((scene->subC2BF8(&scene->_arrunkObj1337[3]._arr1[i], scene->_item6._field36) != 0) && (scene->_arrunkObj1337[3]._arr1[i]._field34 != 0)) { + if ((scene->subC2BF8(&scene->_gameBoardSide[3]._handCard[i], scene->_item6._stationPos) != 0) && (scene->_gameBoardSide[3]._handCard[i]._cardId != 0)) { found = true; - scene->_field3EF8 = &scene->_arrunkObj1337[3]._arr1[i]; + scene->_field3EF8 = &scene->_gameBoardSide[3]._handCard[i]; break; } } @@ -4210,9 +4216,9 @@ void Scene1337::Action12::signal() { if (scene->_field4240 == 1) { for (i = 0; i <= 3; i++) { - if ((scene->subC2BF8(&scene->_arrunkObj1337[1]._arr1[i], scene->_item6._field36) != 0) && (scene->_arrunkObj1337[1]._arr1[i]._field34 != 0)) { + if ((scene->subC2BF8(&scene->_gameBoardSide[1]._handCard[i], scene->_item6._stationPos) != 0) && (scene->_gameBoardSide[1]._handCard[i]._cardId != 0)) { found = true; - scene->_field3EF8 = &scene->_arrunkObj1337[1]._arr1[i]; + scene->_field3EF8 = &scene->_gameBoardSide[1]._handCard[i]; break; } } @@ -4223,52 +4229,52 @@ void Scene1337::Action12::signal() { if (scene->_field4240 != 1) { switch (scene->_field4240) { case 0: - scene->_field3EF8 = &scene->_arrunkObj1337[0]._arr1[scene->subC3E92(0)]; + scene->_field3EF8 = &scene->_gameBoardSide[0]._handCard[scene->subC3E92(0)]; break; case 3: - scene->_field3EF8 = &scene->_arrunkObj1337[3]._arr1[scene->subC3E92(3)]; + scene->_field3EF8 = &scene->_gameBoardSide[3]._handCard[scene->subC3E92(3)]; break; default: break; } } else { - scene->_field3EF8 = &scene->_arrunkObj1337[1]._arr1[scene->subC3E92(1)]; + scene->_field3EF8 = &scene->_gameBoardSide[1]._handCard[scene->subC3E92(1)]; } } - scene->_field3EF0->_object1.postInit(); - scene->_field3EF0->_object1.hide(); - scene->_field3EF0->_object1.setVisage(1332); - scene->_field3EF0->_object1.setPosition(scene->_field3EF0->_field36); - scene->_field3EF0->_object1.fixPriority(170); - scene->_field3EF0->_object1.setStrip2(1); - scene->_field3EF0->_field34 = scene->_field3EF8->_field34; + scene->_field3EF0->_card.postInit(); + scene->_field3EF0->_card.hide(); + scene->_field3EF0->_card.setVisage(1332); + scene->_field3EF0->_card.setPosition(scene->_field3EF0->_stationPos); + scene->_field3EF0->_card.fixPriority(170); + scene->_field3EF0->_card.setStrip2(1); + scene->_field3EF0->_cardId = scene->_field3EF8->_cardId; - scene->_field3EF8->_field34 = 0; - scene->_field3EF8->_object1.remove(); + scene->_field3EF8->_cardId = 0; + scene->_field3EF8->_card.remove(); - scene->_item2._object1.setPosition(scene->_field3EF8->_field36); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_field3EF8->_stationPos); + scene->_animatedCard._card.show(); scene->_aSound1.play(57); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_field3EF0->_field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_field3EF0->_stationPos, this); } break; case 3: - scene->_item2._object1.hide(); + scene->_animatedCard._card.hide(); switch (scene->_field4242) { case 0: - scene->_field3EF0->_object1.setFrame2(2); - scene->_field3EF0->_object1.show(); + scene->_field3EF0->_card.setFrame2(2); + scene->_field3EF0->_card.show(); break; case 1: - scene->_field3EF0->_object1.setFrame2(4); - scene->_field3EF0->_object1.show(); + scene->_field3EF0->_card.setFrame2(4); + scene->_field3EF0->_card.show(); break; case 3: - scene->_field3EF0->_object1.setFrame2(3); - scene->_field3EF0->_object1.show(); + scene->_field3EF0->_card.setFrame2(3); + scene->_field3EF0->_card.show(); break; default: scene->setAnimationInfo(scene->_field3EF0); @@ -4286,23 +4292,23 @@ void Scene1337::Action13::signal() { switch (_actionIndex++) { case 0: { - scene->_field3E28[scene->_field3E26] = scene->_field3EF4->_field34; + scene->_availableCardsPile[scene->_field3E26] = scene->_field3EF4->_cardId; scene->_field3E26--; - scene->_field3EF4->_field34 = scene->_field3EF0->_field34; + scene->_field3EF4->_cardId = scene->_field3EF0->_cardId; - scene->_field3EF0->_field34 = 0; - scene->_field3EF0->_object1.remove(); + scene->_field3EF0->_cardId = 0; + scene->_field3EF0->_card.remove(); - scene->_item2._object1.setPosition(scene->_field3EF0->_field36, 0); - scene->_item2._object1.show(); + scene->_animatedCard._card.setPosition(scene->_field3EF0->_stationPos, 0); + scene->_animatedCard._card.show(); NpcMover *mover = new NpcMover(); - scene->_item2._object1.addMover(mover, &scene->_field3EF4->_field36, this); + scene->_animatedCard._card.addMover(mover, &scene->_field3EF4->_stationPos, this); } break; case 1: - scene->_item2._object1.hide(); + scene->_animatedCard._card.hide(); scene->setAnimationInfo(scene->_field3EF4); scene->_aSound1.play(58); signal(); @@ -4335,101 +4341,101 @@ void Scene1337::postInit(SceneObjectList *OwnerList) { _field3EF4 = NULL; _field3EF8 = NULL; - _arrunkObj1337[2]._arr1[0]._field36 = Common::Point(10, 174); - _arrunkObj1337[2]._arr1[1]._field36 = Common::Point(37, 174); - _arrunkObj1337[2]._arr1[2]._field36 = Common::Point(64, 174); - _arrunkObj1337[2]._arr1[3]._field36 = Common::Point(91, 174); - - _arrunkObj1337[2]._arr2[0]._field36 = Common::Point(119, 174); - _arrunkObj1337[2]._arr2[1]._field36 = Common::Point(119, 148); - _arrunkObj1337[2]._arr2[2]._field36 = Common::Point(119, 122); - _arrunkObj1337[2]._arr2[3]._field36 = Common::Point(145, 122); - _arrunkObj1337[2]._arr2[4]._field36 = Common::Point(171, 122); - _arrunkObj1337[2]._arr2[5]._field36 = Common::Point(171, 148); - _arrunkObj1337[2]._arr2[6]._field36 = Common::Point(171, 174); - _arrunkObj1337[2]._arr2[7]._field36 = Common::Point(145, 174); - - _arrunkObj1337[2]._arr3[0]._field36 = Common::Point(199, 174); - - _arrunkObj1337[2]._arr4[0]._field36 = Common::Point(145, 148); - - _arrunkObj1337[2]._fieldB94 = Common::Point(10, 174); - _arrunkObj1337[2]._fieldB98 = Common::Point(37, 174); - _arrunkObj1337[2]._fieldB9C = Common::Point(64, 174); - _arrunkObj1337[2]._fieldBA0 = Common::Point(91, 174); - _arrunkObj1337[2]._fieldBA4 = 2; - - _arrunkObj1337[3]._arr1[0]._field36 = Common::Point(14, 14); - _arrunkObj1337[3]._arr1[1]._field36 = Common::Point(14, 36); - _arrunkObj1337[3]._arr1[2]._field36 = Common::Point(14, 58); - _arrunkObj1337[3]._arr1[3]._field36 = Common::Point(14, 80); - - _arrunkObj1337[3]._arr2[0]._field36 = Common::Point(37, 66); - _arrunkObj1337[3]._arr2[1]._field36 = Common::Point(63, 66); - _arrunkObj1337[3]._arr2[2]._field36 = Common::Point(89, 66); - _arrunkObj1337[3]._arr2[3]._field36 = Common::Point(89, 92); - _arrunkObj1337[3]._arr2[4]._field36 = Common::Point(89, 118); - _arrunkObj1337[3]._arr2[5]._field36 = Common::Point(63, 118); - _arrunkObj1337[3]._arr2[6]._field36 = Common::Point(37, 118); - _arrunkObj1337[3]._arr2[7]._field36 = Common::Point(37, 92); - - _arrunkObj1337[3]._arr3[0]._field36 = Common::Point(37, 145); - - _arrunkObj1337[3]._arr4[0]._field36 = Common::Point(63, 92); - - _arrunkObj1337[3]._fieldB94 = Common::Point(14, 14); - _arrunkObj1337[3]._fieldB98 = Common::Point(14, 36); - _arrunkObj1337[3]._fieldB9C = Common::Point(14, 58); - _arrunkObj1337[3]._fieldBA0 = Common::Point(14, 80); - _arrunkObj1337[3]._fieldBA4 = 3; - - _arrunkObj1337[0]._arr1[0]._field36 = Common::Point(280, 5); - _arrunkObj1337[0]._arr1[1]._field36 = Common::Point(253, 5); - _arrunkObj1337[0]._arr1[2]._field36 = Common::Point(226, 5); - _arrunkObj1337[0]._arr1[3]._field36 = Common::Point(199, 5); - - _arrunkObj1337[0]._arr2[0]._field36 = Common::Point(171, 16); - _arrunkObj1337[0]._arr2[1]._field36 = Common::Point(171, 42); - _arrunkObj1337[0]._arr2[2]._field36 = Common::Point(171, 68); - _arrunkObj1337[0]._arr2[3]._field36 = Common::Point(145, 68); - _arrunkObj1337[0]._arr2[4]._field36 = Common::Point(119, 68); - _arrunkObj1337[0]._arr2[5]._field36 = Common::Point(119, 42); - _arrunkObj1337[0]._arr2[6]._field36 = Common::Point(119, 16); - _arrunkObj1337[0]._arr2[7]._field36 = Common::Point(145, 16); - - _arrunkObj1337[0]._arr3[0]._field36 = Common::Point(91, 16); - - _arrunkObj1337[0]._arr4[0]._field36 = Common::Point(145, 42); - - _arrunkObj1337[0]._fieldB94 = Common::Point(280, 5); - _arrunkObj1337[0]._fieldB98 = Common::Point(253, 5); - _arrunkObj1337[0]._fieldB9C = Common::Point(226, 5); - _arrunkObj1337[0]._fieldBA0 = Common::Point(199, 5); - _arrunkObj1337[0]._fieldBA4 = 2; - - _arrunkObj1337[1]._arr1[0]._field36 = Common::Point(283, 146); - _arrunkObj1337[1]._arr1[1]._field36 = Common::Point(283, 124); - _arrunkObj1337[1]._arr1[2]._field36 = Common::Point(283, 102); - _arrunkObj1337[1]._arr1[3]._field36 = Common::Point(283, 80); - - _arrunkObj1337[1]._arr2[0]._field36 = Common::Point(253, 122); - _arrunkObj1337[1]._arr2[1]._field36 = Common::Point(227, 122); - _arrunkObj1337[1]._arr2[2]._field36 = Common::Point(201, 122); - _arrunkObj1337[1]._arr2[3]._field36 = Common::Point(201, 96); - _arrunkObj1337[1]._arr2[4]._field36 = Common::Point(201, 70); - _arrunkObj1337[1]._arr2[5]._field36 = Common::Point(227, 70); - _arrunkObj1337[1]._arr2[6]._field36 = Common::Point(253, 70); - _arrunkObj1337[1]._arr2[7]._field36 = Common::Point(253, 96); - - _arrunkObj1337[1]._arr3[0]._field36 = Common::Point(253, 43); - - _arrunkObj1337[1]._arr4[0]._field36 = Common::Point(227, 96); - - _arrunkObj1337[1]._fieldB94 = Common::Point(283, 146); - _arrunkObj1337[1]._fieldB98 = Common::Point(283, 124); - _arrunkObj1337[1]._fieldB9C = Common::Point(283, 102); - _arrunkObj1337[1]._fieldBA0 = Common::Point(283, 80); - _arrunkObj1337[1]._fieldBA4 = 4; + _gameBoardSide[2]._handCard[0]._stationPos = Common::Point(10, 174); + _gameBoardSide[2]._handCard[1]._stationPos = Common::Point(37, 174); + _gameBoardSide[2]._handCard[2]._stationPos = Common::Point(64, 174); + _gameBoardSide[2]._handCard[3]._stationPos = Common::Point(91, 174); + + _gameBoardSide[2]._outpostStation[0]._stationPos = Common::Point(119, 174); + _gameBoardSide[2]._outpostStation[1]._stationPos = Common::Point(119, 148); + _gameBoardSide[2]._outpostStation[2]._stationPos = Common::Point(119, 122); + _gameBoardSide[2]._outpostStation[3]._stationPos = Common::Point(145, 122); + _gameBoardSide[2]._outpostStation[4]._stationPos = Common::Point(171, 122); + _gameBoardSide[2]._outpostStation[5]._stationPos = Common::Point(171, 148); + _gameBoardSide[2]._outpostStation[6]._stationPos = Common::Point(171, 174); + _gameBoardSide[2]._outpostStation[7]._stationPos = Common::Point(145, 174); + + _gameBoardSide[2]._delayPile[0]._stationPos = Common::Point(199, 174); + + _gameBoardSide[2]._arr4[0]._stationPos = Common::Point(145, 148); + + _gameBoardSide[2]._fieldB94 = Common::Point(10, 174); + _gameBoardSide[2]._fieldB98 = Common::Point(37, 174); + _gameBoardSide[2]._fieldB9C = Common::Point(64, 174); + _gameBoardSide[2]._fieldBA0 = Common::Point(91, 174); + _gameBoardSide[2]._fieldBA4 = 2; + + _gameBoardSide[3]._handCard[0]._stationPos = Common::Point(14, 14); + _gameBoardSide[3]._handCard[1]._stationPos = Common::Point(14, 36); + _gameBoardSide[3]._handCard[2]._stationPos = Common::Point(14, 58); + _gameBoardSide[3]._handCard[3]._stationPos = Common::Point(14, 80); + + _gameBoardSide[3]._outpostStation[0]._stationPos = Common::Point(37, 66); + _gameBoardSide[3]._outpostStation[1]._stationPos = Common::Point(63, 66); + _gameBoardSide[3]._outpostStation[2]._stationPos = Common::Point(89, 66); + _gameBoardSide[3]._outpostStation[3]._stationPos = Common::Point(89, 92); + _gameBoardSide[3]._outpostStation[4]._stationPos = Common::Point(89, 118); + _gameBoardSide[3]._outpostStation[5]._stationPos = Common::Point(63, 118); + _gameBoardSide[3]._outpostStation[6]._stationPos = Common::Point(37, 118); + _gameBoardSide[3]._outpostStation[7]._stationPos = Common::Point(37, 92); + + _gameBoardSide[3]._delayPile[0]._stationPos = Common::Point(37, 145); + + _gameBoardSide[3]._arr4[0]._stationPos = Common::Point(63, 92); + + _gameBoardSide[3]._fieldB94 = Common::Point(14, 14); + _gameBoardSide[3]._fieldB98 = Common::Point(14, 36); + _gameBoardSide[3]._fieldB9C = Common::Point(14, 58); + _gameBoardSide[3]._fieldBA0 = Common::Point(14, 80); + _gameBoardSide[3]._fieldBA4 = 3; + + _gameBoardSide[0]._handCard[0]._stationPos = Common::Point(280, 5); + _gameBoardSide[0]._handCard[1]._stationPos = Common::Point(253, 5); + _gameBoardSide[0]._handCard[2]._stationPos = Common::Point(226, 5); + _gameBoardSide[0]._handCard[3]._stationPos = Common::Point(199, 5); + + _gameBoardSide[0]._outpostStation[0]._stationPos = Common::Point(171, 16); + _gameBoardSide[0]._outpostStation[1]._stationPos = Common::Point(171, 42); + _gameBoardSide[0]._outpostStation[2]._stationPos = Common::Point(171, 68); + _gameBoardSide[0]._outpostStation[3]._stationPos = Common::Point(145, 68); + _gameBoardSide[0]._outpostStation[4]._stationPos = Common::Point(119, 68); + _gameBoardSide[0]._outpostStation[5]._stationPos = Common::Point(119, 42); + _gameBoardSide[0]._outpostStation[6]._stationPos = Common::Point(119, 16); + _gameBoardSide[0]._outpostStation[7]._stationPos = Common::Point(145, 16); + + _gameBoardSide[0]._delayPile[0]._stationPos = Common::Point(91, 16); + + _gameBoardSide[0]._arr4[0]._stationPos = Common::Point(145, 42); + + _gameBoardSide[0]._fieldB94 = Common::Point(280, 5); + _gameBoardSide[0]._fieldB98 = Common::Point(253, 5); + _gameBoardSide[0]._fieldB9C = Common::Point(226, 5); + _gameBoardSide[0]._fieldBA0 = Common::Point(199, 5); + _gameBoardSide[0]._fieldBA4 = 2; + + _gameBoardSide[1]._handCard[0]._stationPos = Common::Point(283, 146); + _gameBoardSide[1]._handCard[1]._stationPos = Common::Point(283, 124); + _gameBoardSide[1]._handCard[2]._stationPos = Common::Point(283, 102); + _gameBoardSide[1]._handCard[3]._stationPos = Common::Point(283, 80); + + _gameBoardSide[1]._outpostStation[0]._stationPos = Common::Point(253, 122); + _gameBoardSide[1]._outpostStation[1]._stationPos = Common::Point(227, 122); + _gameBoardSide[1]._outpostStation[2]._stationPos = Common::Point(201, 122); + _gameBoardSide[1]._outpostStation[3]._stationPos = Common::Point(201, 96); + _gameBoardSide[1]._outpostStation[4]._stationPos = Common::Point(201, 70); + _gameBoardSide[1]._outpostStation[5]._stationPos = Common::Point(227, 70); + _gameBoardSide[1]._outpostStation[6]._stationPos = Common::Point(253, 70); + _gameBoardSide[1]._outpostStation[7]._stationPos = Common::Point(253, 96); + + _gameBoardSide[1]._delayPile[0]._stationPos = Common::Point(253, 43); + + _gameBoardSide[1]._arr4[0]._stationPos = Common::Point(227, 96); + + _gameBoardSide[1]._fieldB94 = Common::Point(283, 146); + _gameBoardSide[1]._fieldB98 = Common::Point(283, 124); + _gameBoardSide[1]._fieldB9C = Common::Point(283, 102); + _gameBoardSide[1]._fieldBA0 = Common::Point(283, 80); + _gameBoardSide[1]._fieldBA4 = 4; subPostInit(); } @@ -4472,13 +4478,19 @@ void Scene1337::process(Event &event) { } void Scene1337::dispatch() { - if (_field424C == 0) { - ++_field424E; - if (_field424E == 4) { - _field424C = 1; + if (_instructionsDisplayedFl == 0) { + ++_instructionsWaitCount; + if (_instructionsWaitCount == 4) { + _instructionsDisplayedFl = 1; suggestInstructions(); } } + + // The following code is in the original in sceneHandler::process(), + // which is terrible as it's checked in every scene of the game. + setCursorData(5, _cursorCurStrip, _cursorCurFrame); + // + Scene::dispatch(); } @@ -4493,20 +4505,20 @@ void Scene1337::setAnimationInfo(unkObj1337sub1 *subObj) { if (!subObj) return; - if (subObj->_field34 > 9) { - if (subObj->_field34 > 25) { - subObj->_object1.setStrip2(4); - subObj->_object1.setFrame(subObj->_field34 - 25); + if (subObj->_cardId > 9) { + if (subObj->_cardId > 25) { + subObj->_card.setStrip2(4); + subObj->_card.setFrame(subObj->_cardId - 25); } else { - subObj->_object1.setStrip2(3); - subObj->_object1.setFrame(subObj->_field34 - 9); + subObj->_card.setStrip2(3); + subObj->_card.setFrame(subObj->_cardId - 9); } } else { - subObj->_object1.setStrip2(2); - subObj->_object1.setFrame(subObj->_field34); + subObj->_card.setStrip2(2); + subObj->_card.setFrame(subObj->_cardId); } - subObj->_object1.show(); + subObj->_card.show(); R2_GLOBALS._sceneObjects->draw(); } @@ -4517,26 +4529,26 @@ void Scene1337::subC20E5() { void Scene1337::subC20F9() { switch (_field424A) { case -1: - ++_field423E; - if (_field423E == 3) - _field423E = 0; + ++_currentPlayerNumb; + if (_currentPlayerNumb == 3) + _currentPlayerNumb = 0; - if (_field4244 == 1) { - _object1.show(); - switch (_field423E) { + if (_field4244) { + _currentPlayerArrow.show(); + switch (_currentPlayerNumb) { case 0: - _object1.setStrip(3); + _currentPlayerArrow.setStrip(3); break; case 1: - _object1.setStrip(4); + _currentPlayerArrow.setStrip(4); break; case 2: subD1975(174, 107); - _object1.setStrip(1); + _currentPlayerArrow.setStrip(1); break; case 3: subC4CEC(); - _object1.setStrip(2); + _currentPlayerArrow.setStrip(2); break; default: break; @@ -4592,15 +4604,15 @@ void Scene1337::subC20F9() { } void Scene1337::subC2586() { - if (_field4244 != 0) - _object1.hide(); + if (_field4244) + _currentPlayerArrow.hide(); - switch (_field423E) { + switch (_currentPlayerNumb) { case 2: subC4CD2(); - if (_field4246 == 1) + if (_field4246) actionDisplay(1330, 114, 159, 10, 1, 200, 0, 7, 0, 154, 154); - _field4246 = 0; + _field4246 = false; // No break on purpose case 0: // No break on purpose @@ -4612,7 +4624,7 @@ void Scene1337::subC2586() { break; } - _field4244 = 1; + _field4244 = true; } @@ -4655,7 +4667,7 @@ bool Scene1337::subC2687(int arg1) { } int Scene1337::subC26CB(int arg1, int arg2) { - if ((_arrunkObj1337[arg1]._arr1[arg2]._field34 > 1) && (_arrunkObj1337[arg1]._arr1[arg2]._field34 <= 9)) { + if ((_gameBoardSide[arg1]._handCard[arg2]._cardId > 1) && (_gameBoardSide[arg1]._handCard[arg2]._cardId <= 9)) { return arg2; } @@ -4664,7 +4676,7 @@ int Scene1337::subC26CB(int arg1, int arg2) { int Scene1337::subC2719(int arg1) { for (int i = 0; i <= 3; i++) { - if (_arrunkObj1337[arg1]._arr1[i]._field34 == 1) + if (_gameBoardSide[arg1]._handCard[i]._cardId == 1) return i; } @@ -4673,7 +4685,7 @@ int Scene1337::subC2719(int arg1) { int Scene1337::subC274D(int arg1) { for (int i = 0; i <= 3; i++) { - if (_arrunkObj1337[arg1]._arr1[i]._field34 == 13) + if (_gameBoardSide[arg1]._handCard[i]._cardId == 13) return i; } @@ -4682,7 +4694,7 @@ int Scene1337::subC274D(int arg1) { int Scene1337::subC2781(int arg1) { for (int i = 0; i <= 3; i++) { - if (_arrunkObj1337[arg1]._arr1[i]._field34 == 25) + if (_gameBoardSide[arg1]._handCard[i]._cardId == 25) return i; } @@ -4735,7 +4747,7 @@ void Scene1337::subC2835(int arg1) { switch (arg1) { case 0: for (i = 0; i <= 3; i++) { - if (subC27F9(_arrunkObj1337[arg1]._arr1[i]._field34) != -1) { + if (subC27F9(_gameBoardSide[arg1]._handCard[i]._cardId) != -1) { found = true; break; } @@ -4745,7 +4757,7 @@ void Scene1337::subC2835(int arg1) { break; for (i = 0; i <= 3; i++) { - if (subC27B5(_arrunkObj1337[arg1]._arr1[i]._field34) != -1) { + if (subC27B5(_gameBoardSide[arg1]._handCard[i]._cardId) != -1) { found = true; break; } @@ -4755,7 +4767,7 @@ void Scene1337::subC2835(int arg1) { break; for (i = 0; i <= 3; i++) { - if ((_arrunkObj1337[arg1]._arr1[i]._field34 > 1) && (_arrunkObj1337[arg1]._arr1[i]._field34 <= 9)) { + if ((_gameBoardSide[arg1]._handCard[i]._cardId > 1) && (_gameBoardSide[arg1]._handCard[i]._cardId <= 9)) { found = true; break; } @@ -4765,7 +4777,7 @@ void Scene1337::subC2835(int arg1) { break; for (i = 0; i <= 3; i++) { - if ((_arrunkObj1337[arg1]._arr1[i]._field34 >= 26) && (_arrunkObj1337[arg1]._arr1[i]._field34 <= 33)) { + if ((_gameBoardSide[arg1]._handCard[i]._cardId >= 26) && (_gameBoardSide[arg1]._handCard[i]._cardId <= 33)) { found = true; break; } @@ -4775,7 +4787,7 @@ void Scene1337::subC2835(int arg1) { break; for (i = 0; i <= 3; i++) { - if (_arrunkObj1337[arg1]._arr1[i]._field34 == 1) { + if (_gameBoardSide[arg1]._handCard[i]._cardId == 1) { found = true; break; } @@ -4785,7 +4797,7 @@ void Scene1337::subC2835(int arg1) { break; for (i = 0; i <= 3; i++) { - if (_arrunkObj1337[arg1]._arr1[i]._field34 == 25) { + if (_gameBoardSide[arg1]._handCard[i]._cardId == 25) { found = true; break; } @@ -4795,7 +4807,7 @@ void Scene1337::subC2835(int arg1) { break; for (i = 0; i <= 3; i++) { - if (_arrunkObj1337[arg1]._arr1[i]._field34 == 13) { + if (_gameBoardSide[arg1]._handCard[i]._cardId == 13) { found = true; break; } @@ -4803,7 +4815,7 @@ void Scene1337::subC2835(int arg1) { break; case 1: for (i = 0; i <= 3; i++) { - if ((_arrunkObj1337[arg1]._arr1[i]._field34 >= 26) && (_arrunkObj1337[arg1]._arr1[i]._field34 <= 33)) { + if ((_gameBoardSide[arg1]._handCard[i]._cardId >= 26) && (_gameBoardSide[arg1]._handCard[i]._cardId <= 33)) { found = true; break; } @@ -4813,7 +4825,7 @@ void Scene1337::subC2835(int arg1) { break; for (i = 0; i <= 3; i++) { - if (_arrunkObj1337[arg1]._arr1[i]._field34 == 1) { + if (_gameBoardSide[arg1]._handCard[i]._cardId == 1) { found = true; break; } @@ -4823,7 +4835,7 @@ void Scene1337::subC2835(int arg1) { break; for (i = 0; i <= 3; i++) { - if ((_arrunkObj1337[arg1]._arr1[i]._field34 > 1) && (_arrunkObj1337[arg1]._arr1[i]._field34 <= 9)) { + if ((_gameBoardSide[arg1]._handCard[i]._cardId > 1) && (_gameBoardSide[arg1]._handCard[i]._cardId <= 9)) { found = true; break; } @@ -4833,7 +4845,7 @@ void Scene1337::subC2835(int arg1) { break; for (i = 0; i <= 3; i++) { - if (subC27F9(_arrunkObj1337[arg1]._arr1[i]._field34) != -1) { + if (subC27F9(_gameBoardSide[arg1]._handCard[i]._cardId) != -1) { found = true; break; } @@ -4843,7 +4855,7 @@ void Scene1337::subC2835(int arg1) { break; for (i = 0; i <= 3; i++) { - if (subC27B5(_arrunkObj1337[arg1]._arr1[i]._field34) != -1) { + if (subC27B5(_gameBoardSide[arg1]._handCard[i]._cardId) != -1) { found = true; break; } @@ -4853,7 +4865,7 @@ void Scene1337::subC2835(int arg1) { break; for (i = 0; i <= 3; i++) { - if (_arrunkObj1337[arg1]._arr1[i]._field34 == 25) { + if (_gameBoardSide[arg1]._handCard[i]._cardId == 25) { found = true; break; } @@ -4863,7 +4875,7 @@ void Scene1337::subC2835(int arg1) { break; for (i = 0; i <= 3; i++) { - if (_arrunkObj1337[arg1]._arr1[i]._field34 == 13) { + if (_gameBoardSide[arg1]._handCard[i]._cardId == 13) { found = true; break; } @@ -4874,14 +4886,14 @@ void Scene1337::subC2835(int arg1) { return; } - subC4A39(&_arrunkObj1337[arg1]._arr1[i]); + subC4A39(&_gameBoardSide[arg1]._handCard[i]); } bool Scene1337::subC2BF8(unkObj1337sub1 *subObj1, Common::Point pt) { - if ((subObj1->_field36.x > pt.x) || (subObj1->_field36.x + 24 < pt.x)) + if ((subObj1->_stationPos.x > pt.x) || (subObj1->_stationPos.x + 24 < pt.x)) return false; - if ((subObj1->_field36.y > pt.y) || (subObj1->_field36.y + 24 < pt.y)) + if ((subObj1->_stationPos.y > pt.y) || (subObj1->_stationPos.y + 24 < pt.y)) return false; return true; @@ -4890,8 +4902,8 @@ bool Scene1337::subC2BF8(unkObj1337sub1 *subObj1, Common::Point pt) { void Scene1337::subC2C2F() { bool found = true; - if (_arrunkObj1337[3]._arr3[0]._field34 != 0) { - switch (_arrunkObj1337[3]._arr3[0]._field34) { + if (_gameBoardSide[3]._delayPile[0]._cardId != 0) { + switch (_gameBoardSide[3]._delayPile[0]._cardId) { case 10: // No break on purpose case 12: @@ -4907,14 +4919,14 @@ void Scene1337::subC2C2F() { case 20: // No break on purpose case 21: - subC4A39(&_arrunkObj1337[3]._arr3[0]); + subC4A39(&_gameBoardSide[3]._delayPile[0]); found = false; break; default: found = false; int i; for (i = 0; i <= 3; i++) { - if (subC3386(_arrunkObj1337[3]._arr3[0]._field34, _arrunkObj1337[3]._arr1[i]._field34)) { + if (subC3386(_gameBoardSide[3]._delayPile[0]._cardId, _gameBoardSide[3]._handCard[i]._cardId)) { found = true; break; } @@ -4922,7 +4934,7 @@ void Scene1337::subC2C2F() { if (found) { found = false; - subC34A1(&_arrunkObj1337[3]._arr1[i], &_arrunkObj1337[3]._arr3[0]); + subC34A1(&_gameBoardSide[3]._handCard[i], &_gameBoardSide[3]._delayPile[0]); } break; } @@ -4933,12 +4945,12 @@ void Scene1337::subC2C2F() { int randIndx = R2_GLOBALS._randomSource.getRandomNumber(3); - if (_arrunkObj1337[3]._arr1[randIndx]._field34 == 1) { + if (_gameBoardSide[3]._handCard[randIndx]._cardId == 1) { found = false; for (int i = 0; i <= 7; i++) { - if ((_arrunkObj1337[3]._arr2[i]._field34 == 0) && (!subC2687(_arrunkObj1337[3]._arr3[0]._field34))) { - subC340B(&_arrunkObj1337[3]._arr1[randIndx], &_arrunkObj1337[3]._arr2[i]); + if ((_gameBoardSide[3]._outpostStation[i]._cardId == 0) && (!subC2687(_gameBoardSide[3]._delayPile[0]._cardId))) { + subC340B(&_gameBoardSide[3]._handCard[randIndx], &_gameBoardSide[3]._outpostStation[i]); found = true; break; } @@ -4947,11 +4959,11 @@ void Scene1337::subC2C2F() { if (found) { return; } - } else if (_arrunkObj1337[3]._arr1[randIndx]._field34 <= 9) { + } else if (_gameBoardSide[3]._handCard[randIndx]._cardId <= 9) { found = false; for (int i = 0; i <= 7; i++) { - if (_arrunkObj1337[3]._arr2[i]._field34 == _arrunkObj1337[3]._arr1[randIndx]._field34) { + if (_gameBoardSide[3]._outpostStation[i]._cardId == _gameBoardSide[3]._handCard[randIndx]._cardId) { found = true; break; } @@ -4959,18 +4971,18 @@ void Scene1337::subC2C2F() { if (!found) { for (int i = 0; i <= 7; i++) { - if ((_arrunkObj1337[3]._arr2[i]._field34 == 1) && (!subC2687(_arrunkObj1337[3]._arr3[0]._field34))) { + if ((_gameBoardSide[3]._outpostStation[i]._cardId == 1) && (!subC2687(_gameBoardSide[3]._delayPile[0]._cardId))) { int tmpVal = 0; for (int j = 0; j <= 7; j++) { - if ((_arrunkObj1337[3]._arr2[j]._field34 > 1) && (_arrunkObj1337[3]._arr2[j]._field34 <= 9)) + if ((_gameBoardSide[3]._outpostStation[j]._cardId > 1) && (_gameBoardSide[3]._outpostStation[j]._cardId <= 9)) ++tmpVal; } if (tmpVal == 7) _field424A = 3; - subC33C0(&_arrunkObj1337[3]._arr1[randIndx], &_arrunkObj1337[3]._arr2[i]); + subC33C0(&_gameBoardSide[3]._handCard[randIndx], &_gameBoardSide[3]._outpostStation[i]); found = true; break; } @@ -4978,24 +4990,24 @@ void Scene1337::subC2C2F() { if (found) return; } - } else if (_arrunkObj1337[3]._arr1[randIndx]._field34 == 13) { + } else if (_gameBoardSide[3]._handCard[randIndx]._cardId == 13) { int tmpVal = subC331B(3); if (tmpVal != -1) { - subC358E(&_arrunkObj1337[3]._arr1[randIndx], tmpVal); + subC358E(&_gameBoardSide[3]._handCard[randIndx], tmpVal); return; } - } else if (_arrunkObj1337[3]._arr1[randIndx]._field34 == 25) { + } else if (_gameBoardSide[3]._handCard[randIndx]._cardId == 25) { int tmpVal = -1; found = false; int tmpRandIndx = R2_GLOBALS._randomSource.getRandomNumber(3); for (int i = 0; i <= 3; i++) { if ( (tmpRandIndx != 3) - && ( (_arrunkObj1337[tmpRandIndx]._arr1[0]._field34 != 0) - || (_arrunkObj1337[tmpRandIndx]._arr1[1]._field34 != 0) - || (_arrunkObj1337[tmpRandIndx]._arr1[2]._field34 != 0) - || (_arrunkObj1337[tmpRandIndx]._arr1[3]._field34 != 0) )) { + && ( (_gameBoardSide[tmpRandIndx]._handCard[0]._cardId != 0) + || (_gameBoardSide[tmpRandIndx]._handCard[1]._cardId != 0) + || (_gameBoardSide[tmpRandIndx]._handCard[2]._cardId != 0) + || (_gameBoardSide[tmpRandIndx]._handCard[3]._cardId != 0) )) { tmpVal = tmpRandIndx; break; } @@ -5006,11 +5018,11 @@ void Scene1337::subC2C2F() { } if (tmpVal != -1) { - subC318B(3, &_arrunkObj1337[3]._arr1[randIndx], tmpVal); + subC318B(3, &_gameBoardSide[3]._handCard[randIndx], tmpVal); return; } } else { - switch (_arrunkObj1337[3]._arr1[randIndx]._field34) { + switch (_gameBoardSide[3]._handCard[randIndx]._cardId) { case 10: // No break on purpose case 11: @@ -5043,7 +5055,7 @@ void Scene1337::subC2C2F() { // It's understandable for 'i', which helps making sure that tmpVal is used properly, // but it's suspect for j for (int j = 0; j <= 7; j++) { - if ((_arrunkObj1337[tmpRandIndx]._arr3[0]._field34 == 0) && (subC32B1(tmpRandIndx, _arrunkObj1337[3]._arr1[randIndx]._field34))) { + if ((_gameBoardSide[tmpRandIndx]._delayPile[0]._cardId == 0) && (subC32B1(tmpRandIndx, _gameBoardSide[3]._handCard[randIndx]._cardId))) { tmpVal = j; } } @@ -5059,7 +5071,7 @@ void Scene1337::subC2C2F() { if (tmpVal != -1) { // Useless second identical check skipped - subC3456(&_arrunkObj1337[3]._arr1[randIndx], &_arrunkObj1337[tmpVal]._arr3[0]); + subC3456(&_gameBoardSide[3]._handCard[randIndx], &_gameBoardSide[tmpVal]._delayPile[0]); return; } } @@ -5068,7 +5080,7 @@ void Scene1337::subC2C2F() { } } - subC4A39(&_arrunkObj1337[3]._arr1[randIndx]); + subC4A39(&_gameBoardSide[3]._handCard[randIndx]); } void Scene1337::subC318B(int arg1, unkObj1337sub1 *subObj1, int arg3) { @@ -5079,13 +5091,13 @@ void Scene1337::subC318B(int arg1, unkObj1337sub1 *subObj1, int arg3) { for (;;) { randIndx = R2_GLOBALS._randomSource.getRandomNumber(3); - if (_arrunkObj1337[arg3]._arr1[randIndx]._field34 != 0) + if (_gameBoardSide[arg3]._handCard[randIndx]._cardId != 0) break; } _field3EF0 = subObj1; - _field3EF4 = &_arrunkObj1337[arg3]._arr4[0]; - _field3EF8 = &_arrunkObj1337[arg3]._arr1[randIndx]; + _field3EF4 = &_gameBoardSide[arg3]._arr4[0]; + _field3EF8 = &_gameBoardSide[arg3]._handCard[randIndx]; _item1.setAction(&_action11); } @@ -5127,9 +5139,9 @@ int Scene1337::subC3257(int arg1) { bool Scene1337::subC32B1(int arg1, int arg2) { for (int i = 0; i <= 7; i++) { - if (_arrunkObj1337[arg1]._arr2[i]._field34 != 0) { + if (_gameBoardSide[arg1]._outpostStation[i]._cardId != 0) { int tmpVal = subC3257(arg2); - if (tmpVal == _arrunkObj1337[arg1]._arr2[i]._field34) + if (tmpVal == _gameBoardSide[arg1]._outpostStation[i]._cardId) return false; } } @@ -5142,7 +5154,7 @@ int Scene1337::subC331B(int arg1) { for (int i = 0; i <= 3; i++) { if (randIndx != arg1) { for (int j = 0; j <= 7; j++) { - if (_arrunkObj1337[randIndx]._arr2[j]._field34 != 0) + if (_gameBoardSide[randIndx]._outpostStation[j]._cardId != 0) return randIndx; } } @@ -5184,16 +5196,16 @@ void Scene1337::subC33C0(unkObj1337sub1 *subObj1, unkObj1337sub1 *subObj2) { } int Scene1337::subC3E92(int arg1) { - if ( (_arrunkObj1337[arg1]._arr1[0]._field34 == 0) - && (_arrunkObj1337[arg1]._arr1[1]._field34 == 0) - && (_arrunkObj1337[arg1]._arr1[2]._field34 == 0) - && (_arrunkObj1337[arg1]._arr1[3]._field34 == 0)) + if ( (_gameBoardSide[arg1]._handCard[0]._cardId == 0) + && (_gameBoardSide[arg1]._handCard[1]._cardId == 0) + && (_gameBoardSide[arg1]._handCard[2]._cardId == 0) + && (_gameBoardSide[arg1]._handCard[3]._cardId == 0)) return -1; int randIndx; for (;;) { randIndx = R2_GLOBALS._randomSource.getRandomNumber(3); - if (_arrunkObj1337[arg1]._arr1[randIndx]._field34 == 0) + if (_gameBoardSide[arg1]._handCard[randIndx]._cardId == 0) break; } @@ -5223,14 +5235,14 @@ void Scene1337::subC34A1(unkObj1337sub1 *subObj1, unkObj1337sub1 *subObj2) { Scene1337::unkObj1337sub1 *Scene1337::subC34EC(int arg1) { for (int i = 0; i <= 7; i++) { - if (_arrunkObj1337[arg1]._arr2[i]._field34 == 1) { - return &_arrunkObj1337[arg1]._arr2[i]; + if (_gameBoardSide[arg1]._outpostStation[i]._cardId == 1) { + return &_gameBoardSide[arg1]._outpostStation[i]; } } for (int i = 0; i <= 7; i++) { - if ((_arrunkObj1337[arg1]._arr2[i]._field34 != 0) && (_arrunkObj1337[arg1]._arr2[i]._field34 < 10)) { - return &_arrunkObj1337[arg1]._arr2[i]; + if ((_gameBoardSide[arg1]._outpostStation[i]._cardId != 0) && (_gameBoardSide[arg1]._outpostStation[i]._cardId < 10)) { + return &_gameBoardSide[arg1]._outpostStation[i]; } } @@ -5240,7 +5252,7 @@ Scene1337::unkObj1337sub1 *Scene1337::subC34EC(int arg1) { void Scene1337::subC358E(unkObj1337sub1 *subObj1, int arg2) { _field3EF0 = subObj1; _field3EF4 = subC34EC(arg2); - _field3EF8 = &_arrunkObj1337[arg2]._arr4[0]; + _field3EF8 = &_gameBoardSide[arg2]._arr4[0]; _field4240 = arg2; _item1.setAction(&_action10); } @@ -5254,16 +5266,15 @@ void Scene1337::subC4A39(unkObj1337sub1 *subObj) { void Scene1337::subC4CD2() { if (R2_GLOBALS._v57709 > 0) { subD1917(); - subD1940(false); + subD1940(false); // _v5780C-- } } void Scene1337::subC4CEC() { - if (R2_GLOBALS._v57709 != 0) - return; - - subD18F5(); - subD1940(1); + if (R2_GLOBALS._v57709 == 0) { + subD18F5(); + subD1940(true); // _v5780C++ + } } void Scene1337::subC51A0(unkObj1337sub1 *subObj1, unkObj1337sub1 *subObj2) { @@ -5375,7 +5386,7 @@ void Scene1337::subPostInit() { R2_GLOBALS._v57709 = 0; R2_GLOBALS._v5780C = 0; subD183F(1, 0); - subD1940(true); + subD1940(true); // _v5780C++ subD18F5(); // loadScene(1330); @@ -5383,223 +5394,220 @@ void Scene1337::subPostInit() { R2_GLOBALS._scenePalette.addRotation(224, 235, 1); - _field3E28[0] = 1; - _field3E28[1] = 1; - _field3E28[2] = 1; - _field3E28[3] = 1; - _field3E28[4] = 1; - _field3E28[5] = 1; - _field3E28[6] = 1; - _field3E28[7] = 1; - _field3E28[8] = 26; - _field3E28[9] = 2; - _field3E28[10] = 2; - _field3E28[11] = 2; - _field3E28[12] = 2; - _field3E28[13] = 2; - _field3E28[14] = 26; - _field3E28[15] = 3; - _field3E28[16] = 3; - _field3E28[17] = 3; - _field3E28[18] = 3; - _field3E28[19] = 3; - _field3E28[20] = 28; - _field3E28[21] = 4; - _field3E28[22] = 4; - _field3E28[23] = 4; - _field3E28[24] = 4; - _field3E28[25] = 4; - _field3E28[26] = 28; - _field3E28[27] = 5; - _field3E28[28] = 5; - _field3E28[29] = 5; - _field3E28[30] = 5; - _field3E28[31] = 5; - _field3E28[32] = 30; - _field3E28[33] = 6; - _field3E28[34] = 6; - _field3E28[35] = 6; - _field3E28[36] = 6; - _field3E28[37] = 6; - _field3E28[38] = 30; - _field3E28[39] = 7; - _field3E28[40] = 7; - _field3E28[41] = 7; - _field3E28[42] = 7; - _field3E28[43] = 7; - _field3E28[44] = 32; - _field3E28[45] = 8; - _field3E28[46] = 8; - _field3E28[47] = 8; - _field3E28[48] = 8; - _field3E28[49] = 8; - _field3E28[50] = 32; - _field3E28[51] = 9; - _field3E28[52] = 9; - _field3E28[53] = 9; - _field3E28[54] = 9; - _field3E28[55] = 9; - _field3E28[56] = 10; - _field3E28[57] = 11; - _field3E28[58] = 12; - _field3E28[59] = 13; - _field3E28[60] = 13; - _field3E28[61] = 14; - _field3E28[62] = 15; - _field3E28[63] = 16; - _field3E28[64] = 17; - _field3E28[65] = 18; - _field3E28[66] = 19; - _field3E28[67] = 20; - _field3E28[68] = 21; - _field3E28[69] = 26; - _field3E28[70] = 28; - _field3E28[71] = 24; - _field3E28[72] = 25; - _field3E28[73] = 25; - _field3E28[74] = 25; - _field3E28[75] = 25; - _field3E28[76] = 26; - _field3E28[77] = 26; - _field3E28[78] = 26; - _field3E28[79] = 27; - _field3E28[80] = 27; - _field3E28[81] = 28; - _field3E28[82] = 28; - _field3E28[83] = 28; - _field3E28[84] = 29; - _field3E28[85] = 29; - _field3E28[86] = 29; - _field3E28[87] = 30; - _field3E28[88] = 30; - _field3E28[89] = 30; - _field3E28[90] = 30; - _field3E28[91] = 32; - _field3E28[92] = 1; - _field3E28[93] = 32; - _field3E28[94] = 32; - _field3E28[95] = 32; - _field3E28[96] = 1; - _field3E28[97] = 1; - _field3E28[98] = 1; - _field3E28[99] = 0; - - _field3E24 = 98; + _availableCardsPile[0] = 1; + _availableCardsPile[1] = 1; + _availableCardsPile[2] = 1; + _availableCardsPile[3] = 1; + _availableCardsPile[4] = 1; + _availableCardsPile[5] = 1; + _availableCardsPile[6] = 1; + _availableCardsPile[7] = 1; + _availableCardsPile[8] = 26; + _availableCardsPile[9] = 2; + _availableCardsPile[10] = 2; + _availableCardsPile[11] = 2; + _availableCardsPile[12] = 2; + _availableCardsPile[13] = 2; + _availableCardsPile[14] = 26; + _availableCardsPile[15] = 3; + _availableCardsPile[16] = 3; + _availableCardsPile[17] = 3; + _availableCardsPile[18] = 3; + _availableCardsPile[19] = 3; + _availableCardsPile[20] = 28; + _availableCardsPile[21] = 4; + _availableCardsPile[22] = 4; + _availableCardsPile[23] = 4; + _availableCardsPile[24] = 4; + _availableCardsPile[25] = 4; + _availableCardsPile[26] = 28; + _availableCardsPile[27] = 5; + _availableCardsPile[28] = 5; + _availableCardsPile[29] = 5; + _availableCardsPile[30] = 5; + _availableCardsPile[31] = 5; + _availableCardsPile[32] = 30; + _availableCardsPile[33] = 6; + _availableCardsPile[34] = 6; + _availableCardsPile[35] = 6; + _availableCardsPile[36] = 6; + _availableCardsPile[37] = 6; + _availableCardsPile[38] = 30; + _availableCardsPile[39] = 7; + _availableCardsPile[40] = 7; + _availableCardsPile[41] = 7; + _availableCardsPile[42] = 7; + _availableCardsPile[43] = 7; + _availableCardsPile[44] = 32; + _availableCardsPile[45] = 8; + _availableCardsPile[46] = 8; + _availableCardsPile[47] = 8; + _availableCardsPile[48] = 8; + _availableCardsPile[49] = 8; + _availableCardsPile[50] = 32; + _availableCardsPile[51] = 9; + _availableCardsPile[52] = 9; + _availableCardsPile[53] = 9; + _availableCardsPile[54] = 9; + _availableCardsPile[55] = 9; + _availableCardsPile[56] = 10; + _availableCardsPile[57] = 11; + _availableCardsPile[58] = 12; + _availableCardsPile[59] = 13; + _availableCardsPile[60] = 13; + _availableCardsPile[61] = 14; + _availableCardsPile[62] = 15; + _availableCardsPile[63] = 16; + _availableCardsPile[64] = 17; + _availableCardsPile[65] = 18; + _availableCardsPile[66] = 19; + _availableCardsPile[67] = 20; + _availableCardsPile[68] = 21; + _availableCardsPile[69] = 26; + _availableCardsPile[70] = 28; + _availableCardsPile[71] = 24; + _availableCardsPile[72] = 25; + _availableCardsPile[73] = 25; + _availableCardsPile[74] = 25; + _availableCardsPile[75] = 25; + _availableCardsPile[76] = 26; + _availableCardsPile[77] = 26; + _availableCardsPile[78] = 26; + _availableCardsPile[79] = 27; + _availableCardsPile[80] = 27; + _availableCardsPile[81] = 28; + _availableCardsPile[82] = 28; + _availableCardsPile[83] = 28; + _availableCardsPile[84] = 29; + _availableCardsPile[85] = 29; + _availableCardsPile[86] = 29; + _availableCardsPile[87] = 30; + _availableCardsPile[88] = 30; + _availableCardsPile[89] = 30; + _availableCardsPile[90] = 30; + _availableCardsPile[91] = 32; + _availableCardsPile[92] = 1; + _availableCardsPile[93] = 32; + _availableCardsPile[94] = 32; + _availableCardsPile[95] = 32; + _availableCardsPile[96] = 1; + _availableCardsPile[97] = 1; + _availableCardsPile[98] = 1; + _availableCardsPile[99] = 0; + + _cardsAvailableNumb = 98; _field3E26 = 98; - _item7._field34 = 0; - _item7._field36 = Common::Point(128, 95); - - _item8._field34 = 0; - _item8._field36 = Common::Point(162, 95); - - _item6._field34 = 0; - - _item2._object1.postInit(); - _item2._object1.setVisage(1332); - _item2._object1.setStrip(5); - _item2._object1.setFrame(1); - _item2._object1._moveDiff = Common::Point(10, 10); - _item2._object1.fixPriority(400); - _item2._object1.setPosition(Common::Point(128, 95), 0); - _item2._object1.animate(ANIM_MODE_2, NULL); - _item2._object1.hide(); - - _object1.postInit(); - _object1.setVisage(1334); - _object1.setStrip(1); - _object1.setFrame(1); - _object1._numFrames = 12; - _object1.fixPriority(500); - _object1.setPosition(Common::Point(174, 107), 0); - _object1.animate(ANIM_MODE_2, NULL); - _object1.hide(); - - _field4244 = 1; - _field4246 = 0; - _field4248 = 0; + _discardPile._cardId = 0; + _discardPile._stationPos = Common::Point(128, 95); + + _item8._cardId = 0; + _item8._stationPos = Common::Point(162, 95); + + _item6._cardId = 0; + + _animatedCard._card.postInit(); + _animatedCard._card.setVisage(1332); + _animatedCard._card.setStrip(5); + _animatedCard._card.setFrame(1); + _animatedCard._card._moveDiff = Common::Point(10, 10); + _animatedCard._card.fixPriority(400); + _animatedCard._card.setPosition(Common::Point(128, 95), 0); + _animatedCard._card.animate(ANIM_MODE_2, NULL); + _animatedCard._card.hide(); + + _currentPlayerArrow.postInit(); + _currentPlayerArrow.setVisage(1334); + _currentPlayerArrow.setStrip(1); + _currentPlayerArrow.setFrame(1); + _currentPlayerArrow._numFrames = 12; + _currentPlayerArrow.fixPriority(500); + _currentPlayerArrow.setPosition(Common::Point(174, 107), 0); + _currentPlayerArrow.animate(ANIM_MODE_2, NULL); + _currentPlayerArrow.hide(); + + _field4244 = true; + _field4246 = false; _field424A = -1; _background1.setup2(9531, 1, 1, 249, 168, 155, 0); _autoplay = false; - _field424C = 0; - _field424E = 0; + _instructionsDisplayedFl = 0; + _instructionsWaitCount = 0; } void Scene1337::suggestInstructions() { if (R2_GLOBALS._v57709 > 0) subD1917(); + if (MessageDialog::show(NEED_INSTRUCTIONS, NO_MSG, YES_MSG) == 0) { if (R2_GLOBALS._v57709 == 0) subD18F5(); - subCCF26(); + firstShuffle(); } else { if (R2_GLOBALS._v57709 == 0) subD18F5(); - subCB59B(); + displayInstructions(); } } -void Scene1337::subCB59B() { +void Scene1337::displayInstructions() { _item1.setAction(&_action1); } void Scene1337::shuffleCards() { R2_GLOBALS._sceneObjects->draw(); + // Remove holes in card pile for (int i = 0; i <= 98; i++) { - if (_field3E28[i] == 0) { + if (_availableCardsPile[i] == 0) { for (int j = i + 1; j <= 98; j ++) { - if (_field3E28[j] != 0) { - _field3E28[i] = _field3E28[j]; - _field3E28[j] = 0; + if (_availableCardsPile[j] != 0) { + _availableCardsPile[i] = _availableCardsPile[j]; + _availableCardsPile[j] = 0; break; } } } } + // Compute the number of available cards for (int i = 0; i <= 99; i ++) { - if (_field3E28[i] == 0) { - _field3E24 = i - 1; + if (_availableCardsPile[i] == 0) { + // CHECKME: This will fail if i == 0, which shouldn't happen + // as we don't shuffle cards when no card is available. + _cardsAvailableNumb = i - 1; _field3E26 = 98; break; } } - // tmpVal is never modified in the original. It looks weird but it works: at the end, the cards are suffled! - int tmpVal = 0; - int randIndx; - int swap; for (int i = 0; i < 2000; i ++) { - randIndx = R2_GLOBALS._randomSource.getRandomNumber(_field3E24); - swap = _field3E28[tmpVal]; - _field3E28[tmpVal] = _field3E28[randIndx]; - _field3E28[randIndx] = swap; + int randIndx = R2_GLOBALS._randomSource.getRandomNumber(_cardsAvailableNumb); + int swap = _availableCardsPile[0]; + _availableCardsPile[0] = _availableCardsPile[randIndx]; + _availableCardsPile[randIndx] = swap; } - _field423C = 0; - _item2._object1.setAction(&_action2); + _shuffleEndedFl = false; + _animatedCard._card.setAction(&_action2); - while(_field423C == 0) { + while(!_shuffleEndedFl && !g_vm->shouldQuit()) { + g_globals->_sceneObjects->recurse(SceneHandler::dispatchObject); g_globals->_scenePalette.signalListeners(); R2_GLOBALS._sceneObjects->draw(); - warning("TODO: recurse on draw() and on signalListeners()?"); g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks); - - // Hack to avoid eternal loop - // To be removed when the recurse is working properly - _field423C = 1; } } -void Scene1337::subCCF26() { - _item2._object1._moveDiff = Common::Point(30, 30); +void Scene1337::firstShuffle() { + _animatedCard._card._moveDiff = Common::Point(30, 30); shuffleCards(); _item1.setAction(&_action3); } void Scene1337::subCD193() { + // Display menu with "Auto Play", "New Game", "Quit" and "Continue" warning("STUBBED: subCD193()"); } @@ -5610,10 +5618,10 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { if (arg1 == 3) { int i; for (i = 0; i <= 7; i++) { - if ( (subC2BF8(&_arrunkObj1337[2]._arr2[i], pt)) - || (subC2BF8(&_arrunkObj1337[0]._arr2[i], pt)) - || (subC2BF8(&_arrunkObj1337[1]._arr2[i], pt)) - || (subC2BF8(&_arrunkObj1337[3]._arr2[i], pt)) ) { + if ( (subC2BF8(&_gameBoardSide[2]._outpostStation[i], pt)) + || (subC2BF8(&_gameBoardSide[0]._outpostStation[i], pt)) + || (subC2BF8(&_gameBoardSide[1]._outpostStation[i], pt)) + || (subC2BF8(&_gameBoardSide[3]._outpostStation[i], pt)) ) { found = true; break; } @@ -5622,26 +5630,26 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { if (found) { switch (curReg) { case 5: - if (_arrunkObj1337[2]._arr2[i]._field34 != 0) - displayDialog(_arrunkObj1337[2]._arr2[i]._field34); + if (_gameBoardSide[2]._outpostStation[i]._cardId != 0) + displayDialog(_gameBoardSide[2]._outpostStation[i]._cardId); else actionDisplay(1330, 20, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; case 10: - if (_arrunkObj1337[3]._arr2[i]._field34 != 0) - displayDialog(_arrunkObj1337[3]._arr2[i]._field34); + if (_gameBoardSide[3]._outpostStation[i]._cardId != 0) + displayDialog(_gameBoardSide[3]._outpostStation[i]._cardId); else actionDisplay(1330, 22, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; case 15: - if (_arrunkObj1337[0]._arr2[i]._field34 != 0) - displayDialog(_arrunkObj1337[0]._arr2[i]._field34); + if (_gameBoardSide[0]._outpostStation[i]._cardId != 0) + displayDialog(_gameBoardSide[0]._outpostStation[i]._cardId); else actionDisplay(1330, 21, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; case 20: - if (_arrunkObj1337[1]._arr2[i]._field34 != 0) - displayDialog(_arrunkObj1337[1]._arr2[i]._field34); + if (_gameBoardSide[1]._outpostStation[i]._cardId != 0) + displayDialog(_gameBoardSide[1]._outpostStation[i]._cardId); else actionDisplay(1330, 23, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; @@ -5649,36 +5657,36 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { break; } } else { - if ( (subC2BF8(&_arrunkObj1337[2]._arr3[0], pt)) - || (subC2BF8(&_arrunkObj1337[0]._arr3[0], pt)) - || (subC2BF8(&_arrunkObj1337[1]._arr3[0], pt)) - || (subC2BF8(&_arrunkObj1337[3]._arr3[0], pt)) ) { + if ( (subC2BF8(&_gameBoardSide[2]._delayPile[0], pt)) + || (subC2BF8(&_gameBoardSide[0]._delayPile[0], pt)) + || (subC2BF8(&_gameBoardSide[1]._delayPile[0], pt)) + || (subC2BF8(&_gameBoardSide[3]._delayPile[0], pt)) ) { found = true; } if (found) { switch (curReg) { case 5: - if (_arrunkObj1337[2]._arr3[0]._field34 != 0) - displayDialog(_arrunkObj1337[2]._arr3[0]._field34); + if (_gameBoardSide[2]._delayPile[0]._cardId != 0) + displayDialog(_gameBoardSide[2]._delayPile[0]._cardId); else actionDisplay(1330, 10, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; case 10: - if (_arrunkObj1337[3]._arr3[0]._field34 != 0) - displayDialog(_arrunkObj1337[3]._arr3[0]._field34); + if (_gameBoardSide[3]._delayPile[0]._cardId != 0) + displayDialog(_gameBoardSide[3]._delayPile[0]._cardId); else actionDisplay(1330, 16, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; case 15: - if (_arrunkObj1337[0]._arr3[0]._field34 != 0) - displayDialog(_arrunkObj1337[3]._arr3[0]._field34); + if (_gameBoardSide[0]._delayPile[0]._cardId != 0) + displayDialog(_gameBoardSide[3]._delayPile[0]._cardId); else actionDisplay(1330, 13, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; case 20: - if (_arrunkObj1337[1]._arr3[0]._field34 != 0) - displayDialog(_arrunkObj1337[1]._arr3[0]._field34); + if (_gameBoardSide[1]._delayPile[0]._cardId != 0) + displayDialog(_gameBoardSide[1]._delayPile[0]._cardId); else actionDisplay(1330, 18, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; @@ -5686,29 +5694,29 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { break; } } else { - if (subC2BF8(&_item7, pt)) { - if (_item7._field34 != 0) - displayDialog(_item7._field34); + if (subC2BF8(&_discardPile, pt)) { + if (_discardPile._cardId != 0) + displayDialog(_discardPile._cardId); else actionDisplay(1330, 7, 159, 10, 1, 200, 0, 7, 0, 154, 154); } else if (_background1._bounds.contains(pt)) { actionDisplay(1330, 43, 159, 10, 1, 200, 0, 7, 0, 154, 154); } else if (subC2BF8(&_item8, pt)) { actionDisplay(1330, 4, 159, 10, 1, 200, 0, 7, 0, 154, 154); - } else if ( (subC2BF8(&_arrunkObj1337[2]._arr4[0], pt)) - || (subC2BF8(&_arrunkObj1337[3]._arr4[0], pt)) - || (subC2BF8(&_arrunkObj1337[0]._arr4[0], pt)) - || (subC2BF8(&_arrunkObj1337[1]._arr4[0], pt)) ) { + } else if ( (subC2BF8(&_gameBoardSide[2]._arr4[0], pt)) + || (subC2BF8(&_gameBoardSide[3]._arr4[0], pt)) + || (subC2BF8(&_gameBoardSide[0]._arr4[0], pt)) + || (subC2BF8(&_gameBoardSide[1]._arr4[0], pt)) ) { actionDisplay(1330, 32, 159, 10, 1, 200, 0, 7, 0, 154, 154); } else { - if (subC2BF8(&_arrunkObj1337[2]._arr1[0], pt)) - displayDialog(_arrunkObj1337[2]._arr1[0]._field34); - else if (subC2BF8(&_arrunkObj1337[2]._arr1[1], pt)) - displayDialog(_arrunkObj1337[2]._arr1[1]._field34); - else if (subC2BF8(&_arrunkObj1337[2]._arr1[2], pt)) - displayDialog(_arrunkObj1337[2]._arr1[2]._field34); - else if (subC2BF8(&_arrunkObj1337[2]._arr1[3], pt)) - displayDialog(_arrunkObj1337[2]._arr1[3]._field34); + if (subC2BF8(&_gameBoardSide[2]._handCard[0], pt)) + displayDialog(_gameBoardSide[2]._handCard[0]._cardId); + else if (subC2BF8(&_gameBoardSide[2]._handCard[1], pt)) + displayDialog(_gameBoardSide[2]._handCard[1]._cardId); + else if (subC2BF8(&_gameBoardSide[2]._handCard[2], pt)) + displayDialog(_gameBoardSide[2]._handCard[2]._cardId); + else if (subC2BF8(&_gameBoardSide[2]._handCard[3], pt)) + displayDialog(_gameBoardSide[2]._handCard[3]._cardId); else if ((curReg >= 6) && (curReg <= 9)) actionDisplay(1330, 29, 159, 10, 1, 200, 0, 7, 0, 154, 154); else if ((curReg >= 11) && (curReg <= 14)) @@ -5748,8 +5756,8 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { return; for (int i = 0; i <= 7; i++) { - if (subC2BF8(&_arrunkObj1337[2]._arr2[i], pt)) { - switch (_arrunkObj1337[2]._arr2[i]._field34) { + if (subC2BF8(&_gameBoardSide[2]._outpostStation[i], pt)) { + switch (_gameBoardSide[2]._outpostStation[i]._cardId) { case 0: actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; @@ -5762,8 +5770,8 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { } found = true; break; - } else if (subC2BF8(&_arrunkObj1337[0]._arr2[i], pt)) { - switch (_arrunkObj1337[0]._arr2[i]._field34) { + } else if (subC2BF8(&_gameBoardSide[0]._outpostStation[i], pt)) { + switch (_gameBoardSide[0]._outpostStation[i]._cardId) { case 0: actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; @@ -5773,8 +5781,8 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { } found = true; break; - } else if (subC2BF8(&_arrunkObj1337[1]._arr2[i], pt)) { - switch (_arrunkObj1337[1]._arr2[i]._field34) { + } else if (subC2BF8(&_gameBoardSide[1]._outpostStation[i], pt)) { + switch (_gameBoardSide[1]._outpostStation[i]._cardId) { case 0: actionDisplay(1330, 146, 300, 99, 1, 136, 0, 7, 0, 117, 117); break; @@ -5784,8 +5792,8 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { } found = true; break; - } else if (subC2BF8(&_arrunkObj1337[3]._arr2[i], pt)) { - switch (_arrunkObj1337[3]._arr2[i]._field34) { + } else if (subC2BF8(&_gameBoardSide[3]._outpostStation[i], pt)) { + switch (_gameBoardSide[3]._outpostStation[i]._cardId) { case 0: actionDisplay(1330, 147, 20, 99, 1, 136, 0, 7, 0, 172, 172); break; @@ -5798,8 +5806,8 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { } } - if (subC2BF8(&_arrunkObj1337[2]._arr3[0], pt)) { - if (_arrunkObj1337[0]._arr3[0]._field34 != 0) { + if (subC2BF8(&_gameBoardSide[2]._delayPile[0], pt)) { + if (_gameBoardSide[0]._delayPile[0]._cardId != 0) { actionDisplay(1330, 39, 159, 10, 1, 200, 0, 7, 0, 154, 154); } else { actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154); @@ -5807,8 +5815,8 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { found = true; } - if (subC2BF8(&_arrunkObj1337[3]._arr3[0], pt)) { - if (_arrunkObj1337[3]._arr3[0]._field34 != 0) { + if (subC2BF8(&_gameBoardSide[3]._delayPile[0], pt)) { + if (_gameBoardSide[3]._delayPile[0]._cardId != 0) { actionDisplay(1330, 145, 20, 99, 1, 136, 0, 7, 0, 172, 172); } else { actionDisplay(1330, 147, 20, 99, 1, 136, 0, 7, 0, 172, 172); @@ -5816,8 +5824,8 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { found = true; } - if (subC2BF8(&_arrunkObj1337[1]._arr3[0], pt)) { - if (_arrunkObj1337[1]._arr3[0]._field34 != 0) { + if (subC2BF8(&_gameBoardSide[1]._delayPile[0], pt)) { + if (_gameBoardSide[1]._delayPile[0]._cardId != 0) { actionDisplay(1330, 144, 300, 99, 1, 136, 0, 7, 0, 117, 117); } else { actionDisplay(1330, 146, 300, 99, 1, 136, 0, 7, 0, 117, 117); @@ -5825,8 +5833,8 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { found = true; } - if (subC2BF8(&_arrunkObj1337[0]._arr3[0], pt)) { - if (_arrunkObj1337[0]._arr3[0]._field34 != 0) { + if (subC2BF8(&_gameBoardSide[0]._delayPile[0], pt)) { + if (_gameBoardSide[0]._delayPile[0]._cardId != 0) { actionDisplay(1330, 1, 159, 10, 1, 200, 0, 7, 0, 154, 154); } else { actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154); @@ -5834,17 +5842,17 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { found = true; } - if (subC2BF8(&_arrunkObj1337[3]._arr4[0], pt)) { + if (subC2BF8(&_gameBoardSide[3]._arr4[0], pt)) { actionDisplay(1330, 147, 20, 99, 1, 136, 0, 7, 0, 172, 172); found = true; } - if (subC2BF8(&_arrunkObj1337[1]._arr4[0], pt)) { + if (subC2BF8(&_gameBoardSide[1]._arr4[0], pt)) { actionDisplay(1330, 146, 300, 99, 1, 136, 0, 7, 0, 117, 117); found = true; } - if (subC2BF8(&_arrunkObj1337[0]._arr4[0], pt)) { + if (subC2BF8(&_gameBoardSide[0]._arr4[0], pt)) { actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154); found = true; } @@ -5857,7 +5865,7 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { return; } - if (subC2BF8(&_item7, pt)) + if (subC2BF8(&_discardPile, pt)) actionDisplay(1330, 9, 159, 10, 1, 200, 0, 7, 0, 154, 154); else if (subC2BF8(&_item8, pt)) actionDisplay(1330, 5, 159, 10, 1, 200, 0, 7, 0, 154, 154); @@ -5911,8 +5919,8 @@ void Scene1337::subCF31D() { bool found; int count; - if (this->_arrunkObj1337[1]._arr3[0]._field34 != 0) { - switch (_arrunkObj1337[1]._arr3[0]._field34) { + if (this->_gameBoardSide[1]._delayPile[0]._cardId != 0) { + switch (_gameBoardSide[1]._delayPile[0]._cardId) { case 10: // No break on purpose case 12: @@ -5929,13 +5937,13 @@ void Scene1337::subCF31D() { // No break on purpose case 21: tmpVal = 0; - subC4A39(&_arrunkObj1337[1]._arr3[0]); + subC4A39(&_gameBoardSide[1]._delayPile[0]); break; default: found = false; int i; for (i = 0; i <= 3; i++) { - if (subC3386(_arrunkObj1337[1]._arr3[0]._field34, _arrunkObj1337[1]._arr1[i]._field34)) { + if (subC3386(_gameBoardSide[1]._delayPile[0]._cardId, _gameBoardSide[1]._handCard[i]._cardId)) { found = true; break; } @@ -5943,7 +5951,7 @@ void Scene1337::subCF31D() { if (found) { tmpVal = 0; - subC34A1(&_arrunkObj1337[1]._arr1[i], &_arrunkObj1337[1]._arr3[0]); + subC34A1(&_gameBoardSide[1]._handCard[i], &_gameBoardSide[1]._delayPile[0]); } } } @@ -5959,7 +5967,7 @@ void Scene1337::subCF31D() { tmpVal = 0; for (int j = 0; j <= 7; j++) { - if (_arrunkObj1337[1]._arr2[j]._field34 == _arrunkObj1337[1]._arr1[tmpIndx]._field34) { + if (_gameBoardSide[1]._outpostStation[j]._cardId == _gameBoardSide[1]._handCard[tmpIndx]._cardId) { tmpVal = 1; break; } @@ -5969,18 +5977,18 @@ void Scene1337::subCF31D() { break; for (int j = 0; j <= 7; j++) { - if (_arrunkObj1337[1]._arr2[j]._field34 == 1) { - if (!subC2687(_arrunkObj1337[1]._arr3[0]._field34)) { + if (_gameBoardSide[1]._outpostStation[j]._cardId == 1) { + if (!subC2687(_gameBoardSide[1]._delayPile[0]._cardId)) { count = 0; for (int k = 0; k <= 7; k++) { - if ((_arrunkObj1337[1]._arr2[k]._field34 > 1) && (_arrunkObj1337[1]._arr2[k]._field34 <= 9)) + if ((_gameBoardSide[1]._outpostStation[k]._cardId > 1) && (_gameBoardSide[1]._outpostStation[k]._cardId <= 9)) ++count; } if (count == 7) _field424A = 1; - subC33C0(&_arrunkObj1337[1]._arr1[tmpIndx], &_arrunkObj1337[1]._arr2[j]); + subC33C0(&_gameBoardSide[1]._handCard[tmpIndx], &_gameBoardSide[1]._outpostStation[j]); found = true; break; } @@ -5994,8 +6002,8 @@ void Scene1337::subCF31D() { tmpVal = subC2719(1); if (tmpVal != -1) { for (int i = 0; i <= 7; i++) { - if ((_arrunkObj1337[1]._arr2[i]._field34 == 0) && (!subC2687(_arrunkObj1337[1]._arr3[0]._field34))) { - subC340B(&_arrunkObj1337[1]._arr1[tmpVal], &_arrunkObj1337[1]._arr2[i]); + if ((_gameBoardSide[1]._outpostStation[i]._cardId == 0) && (!subC2687(_gameBoardSide[1]._delayPile[0]._cardId))) { + subC340B(&_gameBoardSide[1]._handCard[tmpVal], &_gameBoardSide[1]._outpostStation[i]); found = true; break; } @@ -6009,7 +6017,7 @@ void Scene1337::subCF31D() { int tmpVal2 = subC331B(1); if ((tmpVal != -1) && ( tmpVal2 != -1)) { - subC358E(&_arrunkObj1337[1]._arr1[tmpVal], tmpVal2); + subC358E(&_gameBoardSide[1]._handCard[tmpVal], tmpVal2); found = true; } @@ -6022,10 +6030,10 @@ void Scene1337::subCF31D() { int rndVal = R2_GLOBALS._randomSource.getRandomNumber(3); for (int i = 0; i <= 3; i++) { if (rndVal != 1) { - if ( (_arrunkObj1337[rndVal]._arr1[0]._field34 != 0) - || (_arrunkObj1337[rndVal]._arr1[1]._field34 != 0) - || (_arrunkObj1337[rndVal]._arr1[2]._field34 != 0) - || (_arrunkObj1337[rndVal]._arr1[3]._field34 == 0)) { + if ( (_gameBoardSide[rndVal]._handCard[0]._cardId != 0) + || (_gameBoardSide[rndVal]._handCard[1]._cardId != 0) + || (_gameBoardSide[rndVal]._handCard[2]._cardId != 0) + || (_gameBoardSide[rndVal]._handCard[3]._cardId == 0)) { count = rndVal; break; } @@ -6037,7 +6045,7 @@ void Scene1337::subCF31D() { } if (count != -1) { - subC318B(1, &_arrunkObj1337[1]._arr1[tmpVal], count); + subC318B(1, &_gameBoardSide[1]._handCard[tmpVal], count); found = true; } } @@ -6048,7 +6056,7 @@ void Scene1337::subCF31D() { count = -1; int i; for (i = 0; i <= 3; i++) { - tmpVal = subC27B5(_arrunkObj1337[1]._arr1[i]._field34); + tmpVal = subC27B5(_gameBoardSide[1]._handCard[i]._cardId); if (tmpVal != -1) { int rndVal = R2_GLOBALS._randomSource.getRandomNumber(3); @@ -6058,7 +6066,7 @@ void Scene1337::subCF31D() { for (int k = 0; k <= 7; k++) { // CHECKME: 'k' is not used in that loop. // It looks suspicious. - if ((_arrunkObj1337[tmpVal]._arr3[0]._field34 == 0) && (subC32B1(tmpVal, _arrunkObj1337[1]._arr1[i]._field34))) { + if ((_gameBoardSide[tmpVal]._delayPile[0]._cardId == 0) && (subC32B1(tmpVal, _gameBoardSide[1]._handCard[i]._cardId))) { count = tmpVal; break; } @@ -6081,18 +6089,18 @@ void Scene1337::subCF31D() { } if (found) - subC3456(&_arrunkObj1337[1]._arr1[i], &_arrunkObj1337[count]._arr3[0]); + subC3456(&_gameBoardSide[1]._handCard[i], &_gameBoardSide[count]._delayPile[0]); else { int j; for (j = 0; j <= 3; j++) { - if (subC27F9(_arrunkObj1337[1]._arr1[j]._field34) != -1) { + if (subC27F9(_gameBoardSide[1]._handCard[j]._cardId) != -1) { count = -1; int rndVal = R2_GLOBALS._randomSource.getRandomNumber(3); for (int l = 0; l <= 3; l++) { if (rndVal != 1) { for (int m = 0; m <= 7; m++) { // 'm' is not used in that loop. It looks suspicious. - if ((_arrunkObj1337[rndVal]._arr3[0]._field34 == 0) && (_arrunkObj1337[1]._arr1[j]._field34 == 1)) { + if ((_gameBoardSide[rndVal]._delayPile[0]._cardId == 0) && (_gameBoardSide[1]._handCard[j]._cardId == 1)) { count = rndVal; break; } @@ -6113,7 +6121,7 @@ void Scene1337::subCF31D() { } if (found) - subC3456(&_arrunkObj1337[1]._arr1[j], &_arrunkObj1337[count]._arr3[0]); + subC3456(&_gameBoardSide[1]._handCard[j], &_gameBoardSide[count]._delayPile[0]); else subC2835(1); } @@ -6123,8 +6131,8 @@ void Scene1337::subCF31D() { void Scene1337::subCF979() { bool found = true; - if (_arrunkObj1337[0]._arr3[0]._field34 != 0) { - switch (_arrunkObj1337[0]._arr3[0]._field34) { + if (_gameBoardSide[0]._delayPile[0]._cardId != 0) { + switch (_gameBoardSide[0]._delayPile[0]._cardId) { case 10: //No break on purpose case 12: @@ -6140,7 +6148,7 @@ void Scene1337::subCF979() { case 20: //No break on purpose case 21: - subC4A39(&_arrunkObj1337[0]._arr3[0]); + subC4A39(&_gameBoardSide[0]._delayPile[0]); found = false; break; default: @@ -6148,7 +6156,7 @@ void Scene1337::subCF979() { found = false; for (i = 0; i <= 3; i++) { - if (subC3386(_arrunkObj1337[0]._arr3[0]._field34, _arrunkObj1337[0]._arr1[i]._field34)) { + if (subC3386(_gameBoardSide[0]._delayPile[0]._cardId, _gameBoardSide[0]._handCard[i]._cardId)) { found = true; break; } @@ -6156,7 +6164,7 @@ void Scene1337::subCF979() { if (found) { found = false; - subC34A1(&_arrunkObj1337[0]._arr1[i], &_arrunkObj1337[0]._arr3[0]); + subC34A1(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[0]._delayPile[0]); } break; } @@ -6173,7 +6181,7 @@ void Scene1337::subCF979() { if (tmpVal != -1) { bool flag = false; for (int j = 0; j <= 7; j++) { - if (_arrunkObj1337[0]._arr2[j]._field34 == _arrunkObj1337[0]._arr1[tmpVal]._field34) { + if (_gameBoardSide[0]._outpostStation[j]._cardId == _gameBoardSide[0]._handCard[tmpVal]._cardId) { flag = true; break; } @@ -6181,10 +6189,10 @@ void Scene1337::subCF979() { if (!flag) { for (int j = 0; j <= 7; j++) { - if ((_arrunkObj1337[0]._arr2[j]._field34 == 1) && (!subC2687(_arrunkObj1337[0]._arr3[0]._field34))) { + if ((_gameBoardSide[0]._outpostStation[j]._cardId == 1) && (!subC2687(_gameBoardSide[0]._delayPile[0]._cardId))) { int count = 0; for (int k = 0; k <= 7; k++) { - if ((_arrunkObj1337[0]._arr2[k]._field34 > 1) && (_arrunkObj1337[0]._arr2[k]._field34 <= 9)) { + if ((_gameBoardSide[0]._outpostStation[k]._cardId > 1) && (_gameBoardSide[0]._outpostStation[k]._cardId <= 9)) { ++count; } } @@ -6192,7 +6200,7 @@ void Scene1337::subCF979() { if (count == 7) _field424A = 0; - subC33C0(&_arrunkObj1337[0]._arr1[tmpVal], &_arrunkObj1337[0]._arr2[j]); + subC33C0(&_gameBoardSide[0]._handCard[tmpVal], &_gameBoardSide[0]._outpostStation[j]); found = true; } } @@ -6211,8 +6219,8 @@ void Scene1337::subCF979() { if (tmpVal != -1) { for (int i = 0; i <= 7; i++) { - if ((_arrunkObj1337[0]._arr2[i]._field34 == 0) && (!subC2687(_arrunkObj1337[0]._arr3[0]._field34))) { - subC340B(&_arrunkObj1337[0]._arr1[tmpVal], &_arrunkObj1337[0]._arr2[i]); + if ((_gameBoardSide[0]._outpostStation[i]._cardId == 0) && (!subC2687(_gameBoardSide[0]._delayPile[0]._cardId))) { + subC340B(&_gameBoardSide[0]._handCard[tmpVal], &_gameBoardSide[0]._outpostStation[i]); found = true; break; } @@ -6225,8 +6233,8 @@ void Scene1337::subCF979() { tmpVal = subC274D(0); if (tmpVal != -1) { for (int i = 0; i <= 7; i++) { - if (_arrunkObj1337[2]._arr2[i]._field34 != 0) { - subC358E(&_arrunkObj1337[0]._arr1[tmpVal], 2); + if (_gameBoardSide[2]._outpostStation[i]._cardId != 0) { + subC358E(&_gameBoardSide[0]._handCard[tmpVal], 2); found = true; break; } @@ -6238,11 +6246,11 @@ void Scene1337::subCF979() { tmpVal = subC2781(0); if (tmpVal != -1) { - if ( (_arrunkObj1337[2]._arr1[0]._field34 != 0) - || (_arrunkObj1337[2]._arr1[1]._field34 != 0) - || (_arrunkObj1337[2]._arr1[2]._field34 != 0) - || (_arrunkObj1337[2]._arr1[3]._field34 != 0) ) { - subC318B(0, &_arrunkObj1337[0]._arr1[tmpVal], 2); + if ( (_gameBoardSide[2]._handCard[0]._cardId != 0) + || (_gameBoardSide[2]._handCard[1]._cardId != 0) + || (_gameBoardSide[2]._handCard[2]._cardId != 0) + || (_gameBoardSide[2]._handCard[3]._cardId != 0) ) { + subC318B(0, &_gameBoardSide[0]._handCard[tmpVal], 2); found = true; } } @@ -6251,11 +6259,11 @@ void Scene1337::subCF979() { return; for (int i = 0; i <= 3; i++) { - if (subC27B5(_arrunkObj1337[0]._arr1[i]._field34) != -1) { + if (subC27B5(_gameBoardSide[0]._handCard[i]._cardId) != -1) { // The variable 'j' is not used in the inner code of the loop. It's suspect for (int j = 0; j <= 7; j++) { - if ((_arrunkObj1337[2]._arr3[0]._field34 == 0) && (subC32B1(2, _arrunkObj1337[0]._arr1[i]._field34))) { - subC3456(&_arrunkObj1337[0]._arr1[i], &_arrunkObj1337[2]._arr3[0]); + if ((_gameBoardSide[2]._delayPile[0]._cardId == 0) && (subC32B1(2, _gameBoardSide[0]._handCard[i]._cardId))) { + subC3456(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[2]._delayPile[0]); found = true; break; } @@ -6270,11 +6278,11 @@ void Scene1337::subCF979() { return; for (int i = 0; i <= 3; i++) { - if (subC27F9(_arrunkObj1337[0]._arr1[i]._field34) != -1) { + if (subC27F9(_gameBoardSide[0]._handCard[i]._cardId) != -1) { // The variable 'j' is not used in the inner code of the loop. It's suspect for (int j = 0; j <= 7; j++) { - if ((_arrunkObj1337[2]._arr3[0]._field34 == 0) && (subC32B1(2, _arrunkObj1337[0]._arr1[i]._field34))) { - subC3456(&_arrunkObj1337[0]._arr1[i], &_arrunkObj1337[2]._arr3[0]); + if ((_gameBoardSide[2]._delayPile[0]._cardId == 0) && (subC32B1(2, _gameBoardSide[0]._handCard[i]._cardId))) { + subC3456(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[2]._delayPile[0]); found = true; } } @@ -6291,7 +6299,7 @@ void Scene1337::subCF979() { int tmpVal2 = subC331B(0); if ((tmpVal != -1) && (tmpVal2 != -1)) { - subC358E(&_arrunkObj1337[0]._arr1[tmpVal], tmpVal2); + subC358E(&_gameBoardSide[0]._handCard[tmpVal], tmpVal2); found = true; } @@ -6300,11 +6308,11 @@ void Scene1337::subCF979() { tmpVal = subC2781(0); if (tmpVal != -1) { - if ( (_arrunkObj1337[1]._arr1[0]._field34 != 0) - || (_arrunkObj1337[1]._arr1[1]._field34 != 0) - || (_arrunkObj1337[1]._arr1[2]._field34 != 0) - || (_arrunkObj1337[1]._arr1[3]._field34 != 0) ) { - subC318B(0, &_arrunkObj1337[0]._arr1[tmpVal], 1); + if ( (_gameBoardSide[1]._handCard[0]._cardId != 0) + || (_gameBoardSide[1]._handCard[1]._cardId != 0) + || (_gameBoardSide[1]._handCard[2]._cardId != 0) + || (_gameBoardSide[1]._handCard[3]._cardId != 0) ) { + subC318B(0, &_gameBoardSide[0]._handCard[tmpVal], 1); found = true; } } @@ -6313,12 +6321,12 @@ void Scene1337::subCF979() { return; for (int i = 0; i <= 3; i++) { - tmpVal = subC27F9(_arrunkObj1337[0]._arr1[i]._field34); + tmpVal = subC27F9(_gameBoardSide[0]._handCard[i]._cardId); if (tmpVal != -1) { // The variable 'j' is not used in the inner code of the loop. It's suspect. for (int j = 0; j <= 7; j++) { - if ((_arrunkObj1337[1]._arr3[0]._field34 == 0) && (subC32B1(1, _arrunkObj1337[0]._arr1[i]._field34))) { - subC3456(&_arrunkObj1337[0]._arr1[i], &_arrunkObj1337[1]._arr3[0]); + if ((_gameBoardSide[1]._delayPile[0]._cardId == 0) && (subC32B1(1, _gameBoardSide[0]._handCard[i]._cardId))) { + subC3456(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[1]._delayPile[0]); found = true; } } @@ -6326,8 +6334,8 @@ void Scene1337::subCF979() { if (!found) { // The variable 'j' is not used in the inner code of the loop. It's suspect. for (int j = 0; j <= 7; j++) { - if ((_arrunkObj1337[3]._arr3[0]._field34 == 0) && (subC32B1(3, _arrunkObj1337[0]._arr1[i]._field34))) { - subC3456(&_arrunkObj1337[0]._arr1[i], &_arrunkObj1337[3]._arr3[0]); + if ((_gameBoardSide[3]._delayPile[0]._cardId == 0) && (subC32B1(3, _gameBoardSide[0]._handCard[i]._cardId))) { + subC3456(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[3]._delayPile[0]); found = true; } } @@ -6342,12 +6350,12 @@ void Scene1337::subCF979() { return; for (int i = 0; i <= 3; i++) { - tmpVal = subC27B5(_arrunkObj1337[0]._arr1[i]._field34); + tmpVal = subC27B5(_gameBoardSide[0]._handCard[i]._cardId); if (tmpVal != -1) { // The variable 'j' is not used in the inner code of the loop. It's suspect. for (int j = 0; j <= 7; j++) { - if ((_arrunkObj1337[1]._arr3[0]._field34 == 0) && (subC32B1(1, _arrunkObj1337[0]._arr1[i]._field34))) { - subC3456(&_arrunkObj1337[0]._arr1[i], &_arrunkObj1337[1]._arr3[0]); + if ((_gameBoardSide[1]._delayPile[0]._cardId == 0) && (subC32B1(1, _gameBoardSide[0]._handCard[i]._cardId))) { + subC3456(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[1]._delayPile[0]); found = true; } } @@ -6355,8 +6363,8 @@ void Scene1337::subCF979() { if (!found) { // The variable 'j' is not used in the inner code of the loop. It's suspect. for (int j = 0; j <= 7; j++) { - if ((_arrunkObj1337[3]._arr3[0]._field34 == 0) && (subC32B1(3, _arrunkObj1337[0]._arr1[i]._field34))) { - subC3456(&_arrunkObj1337[0]._arr1[i], &_arrunkObj1337[3]._arr3[0]); + if ((_gameBoardSide[3]._delayPile[0]._cardId == 0) && (subC32B1(3, _gameBoardSide[0]._handCard[i]._cardId))) { + subC3456(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[3]._delayPile[0]); found = true; } } @@ -6378,83 +6386,83 @@ void Scene1337::subD026D() { } void Scene1337::subD0281() { - if (subC27F9(this->_arrunkObj1337[2]._arr3[0]._field34) == -1) + if (subC27F9(this->_gameBoardSide[2]._delayPile[0]._cardId) == -1) _unkFctPtr412 = &Scene1337::subD026D; else - subC4A39(&_arrunkObj1337[2]._arr3[0]); + subC4A39(&_gameBoardSide[2]._delayPile[0]); } void Scene1337::subD02CA() { - _item6._field36 = g_globals->_events._mousePos; + _item6._stationPos = g_globals->_events._mousePos; if (R2_GLOBALS._v57810 == 200) { int di; for (di = 0; di < 4; di++) { - if ((subC2BF8(&_arrunkObj1337[2]._arr1[di], _item6._field36) != 0) && (_arrunkObj1337[2]._arr1[di]._field34 != 0)) { - _item6._field34 = _arrunkObj1337[2]._arr1[di]._field34; - _item6._field36 = _arrunkObj1337[2]._arr1[di]._field36; + if ((subC2BF8(&_gameBoardSide[2]._handCard[di], _item6._stationPos) != 0) && (_gameBoardSide[2]._handCard[di]._cardId != 0)) { + _item6._cardId = _gameBoardSide[2]._handCard[di]._cardId; + _item6._stationPos = _gameBoardSide[2]._handCard[di]._stationPos; // _item6._actorName = _arrunkObj1337[2]._arr1[di]._actorName; - _item6._fieldE = _arrunkObj1337[2]._arr1[di]._fieldE; - _item6._field10 = _arrunkObj1337[2]._arr1[di]._field10; + _item6._fieldE = _gameBoardSide[2]._handCard[di]._fieldE; + _item6._field10 = _gameBoardSide[2]._handCard[di]._field10; warning("_item6._field12 = _arrunkObj1337[2]._arr1[di]._field12;"); warning("_item6._field14 = _arrunkObj1337[2]._arr1[di]._field14;"); warning("_item6._field16 = _arrunkObj1337[2]._arr1[di]._field16;"); - _item6._sceneRegionId = _arrunkObj1337[2]._arr1[di]._sceneRegionId; - _item6._position = _arrunkObj1337[2]._arr1[di]._position; - _item6._yDiff = _arrunkObj1337[2]._arr1[di]._yDiff; - _item6._bounds = _arrunkObj1337[2]._arr1[di]._bounds; - _item6._resNum = _arrunkObj1337[2]._arr1[di]._resNum; - _item6._lookLineNum = _arrunkObj1337[2]._arr1[di]._lookLineNum; - _item6._talkLineNum = _arrunkObj1337[2]._arr1[di]._talkLineNum; - _item6._useLineNum = _arrunkObj1337[2]._arr1[di]._useLineNum; - _item6._action = _arrunkObj1337[2]._arr1[di]._action; + _item6._sceneRegionId = _gameBoardSide[2]._handCard[di]._sceneRegionId; + _item6._position = _gameBoardSide[2]._handCard[di]._position; + _item6._yDiff = _gameBoardSide[2]._handCard[di]._yDiff; + _item6._bounds = _gameBoardSide[2]._handCard[di]._bounds; + _item6._resNum = _gameBoardSide[2]._handCard[di]._resNum; + _item6._lookLineNum = _gameBoardSide[2]._handCard[di]._lookLineNum; + _item6._talkLineNum = _gameBoardSide[2]._handCard[di]._talkLineNum; + _item6._useLineNum = _gameBoardSide[2]._handCard[di]._useLineNum; + _item6._action = _gameBoardSide[2]._handCard[di]._action; warning("_item6._field0 = _arrunkObj1337[2]._arr1[di]._field0;"); - _item6._object1._updateStartFrame = _arrunkObj1337[2]._arr1[di]._object1._updateStartFrame; - _item6._object1._walkStartFrame = _arrunkObj1337[2]._arr1[di]._object1._walkStartFrame; + _item6._card._updateStartFrame = _gameBoardSide[2]._handCard[di]._card._updateStartFrame; + _item6._card._walkStartFrame = _gameBoardSide[2]._handCard[di]._card._walkStartFrame; // _field2E is named _field3C in R2R - _item6._object1._field2E = _arrunkObj1337[2]._arr1[di]._object1._field2E; - _item6._object1._percent = _arrunkObj1337[2]._arr1[di]._object1._percent; - _item6._object1._priority = _arrunkObj1337[2]._arr1[di]._object1._priority; - _item6._object1._angle = _arrunkObj1337[2]._arr1[di]._object1._angle; - _item6._object1._flags = _arrunkObj1337[2]._arr1[di]._object1._flags; - _item6._object1._xe = _arrunkObj1337[2]._arr1[di]._object1._xe; - _item6._object1._xs = _arrunkObj1337[2]._arr1[di]._object1._xs; - _item6._object1._paneRects[0] = _arrunkObj1337[2]._arr1[di]._object1._paneRects[0]; - _item6._object1._paneRects[1] = _arrunkObj1337[2]._arr1[di]._object1._paneRects[1]; - _item6._object1._visage = _arrunkObj1337[2]._arr1[di]._object1._visage; - _item6._object1._objectWrapper = _arrunkObj1337[2]._arr1[di]._object1._objectWrapper; - _item6._object1._strip = _arrunkObj1337[2]._arr1[di]._object1._strip; - _item6._object1._animateMode = _arrunkObj1337[2]._arr1[di]._object1._animateMode; - _item6._object1._frame = _arrunkObj1337[2]._arr1[di]._object1._frame; - _item6._object1._endFrame = _arrunkObj1337[2]._arr1[di]._object1._endFrame; + _item6._card._field2E = _gameBoardSide[2]._handCard[di]._card._field2E; + _item6._card._percent = _gameBoardSide[2]._handCard[di]._card._percent; + _item6._card._priority = _gameBoardSide[2]._handCard[di]._card._priority; + _item6._card._angle = _gameBoardSide[2]._handCard[di]._card._angle; + _item6._card._flags = _gameBoardSide[2]._handCard[di]._card._flags; + _item6._card._xe = _gameBoardSide[2]._handCard[di]._card._xe; + _item6._card._xs = _gameBoardSide[2]._handCard[di]._card._xs; + _item6._card._paneRects[0] = _gameBoardSide[2]._handCard[di]._card._paneRects[0]; + _item6._card._paneRects[1] = _gameBoardSide[2]._handCard[di]._card._paneRects[1]; + _item6._card._visage = _gameBoardSide[2]._handCard[di]._card._visage; + _item6._card._objectWrapper = _gameBoardSide[2]._handCard[di]._card._objectWrapper; + _item6._card._strip = _gameBoardSide[2]._handCard[di]._card._strip; + _item6._card._animateMode = _gameBoardSide[2]._handCard[di]._card._animateMode; + _item6._card._frame = _gameBoardSide[2]._handCard[di]._card._frame; + _item6._card._endFrame = _gameBoardSide[2]._handCard[di]._card._endFrame; // _field68 is named _field76 in R2R - _item6._object1._field68 = _arrunkObj1337[2]._arr1[di]._object1._field68; - _item6._object1._frameChange = _arrunkObj1337[2]._arr1[di]._object1._frameChange; - _item6._object1._numFrames = _arrunkObj1337[2]._arr1[di]._object1._numFrames; - _item6._object1._regionIndex = _arrunkObj1337[2]._arr1[di]._object1._regionIndex; - _item6._object1._mover = _arrunkObj1337[2]._arr1[di]._object1._mover; - _item6._object1._moveDiff = _arrunkObj1337[2]._arr1[di]._object1._moveDiff; - _item6._object1._moveRate = _arrunkObj1337[2]._arr1[di]._object1._moveRate; - _item6._object1._actorDestPos = _arrunkObj1337[2]._arr1[di]._object1._actorDestPos; - _item6._object1._endAction = _arrunkObj1337[2]._arr1[di]._object1._endAction; - _item6._object1._regionBitList = _arrunkObj1337[2]._arr1[di]._object1._regionBitList; + _item6._card._field68 = _gameBoardSide[2]._handCard[di]._card._field68; + _item6._card._frameChange = _gameBoardSide[2]._handCard[di]._card._frameChange; + _item6._card._numFrames = _gameBoardSide[2]._handCard[di]._card._numFrames; + _item6._card._regionIndex = _gameBoardSide[2]._handCard[di]._card._regionIndex; + _item6._card._mover = _gameBoardSide[2]._handCard[di]._card._mover; + _item6._card._moveDiff = _gameBoardSide[2]._handCard[di]._card._moveDiff; + _item6._card._moveRate = _gameBoardSide[2]._handCard[di]._card._moveRate; + _item6._card._actorDestPos = _gameBoardSide[2]._handCard[di]._card._actorDestPos; + _item6._card._endAction = _gameBoardSide[2]._handCard[di]._card._endAction; + _item6._card._regionBitList = _gameBoardSide[2]._handCard[di]._card._regionBitList; // _item6._object1._actorName = _arrunkObj1337[2]._arr1[di]._object1._actorName; - _item6._object1._fieldE = _arrunkObj1337[2]._arr1[di]._object1._fieldE; - _item6._object1._field10 = _arrunkObj1337[2]._arr1[di]._object1._field10; + _item6._card._fieldE = _gameBoardSide[2]._handCard[di]._card._fieldE; + _item6._card._field10 = _gameBoardSide[2]._handCard[di]._card._field10; warning("_item6._object1._field12 = _arrunkObj1337[2]._arr1[di]._object1._field12;"); warning("_item6._object1._field14 = _arrunkObj1337[2]._arr1[di]._object1._field14;"); warning("_item6._object1._field16 = _arrunkObj1337[2]._arr1[di]._object1._field16;"); - _item6._object1 = _arrunkObj1337[2]._arr1[di]._object1; + _item6._card = _gameBoardSide[2]._handCard[di]._card; } } if (di == 4) { - subCDB90(1, _item6._field36); + subCDB90(1, _item6._stationPos); subD0281(); return; } } else if (R2_GLOBALS._v57810 == 300) { - subCDB90(3, _item6._field36); + subCDB90(3, _item6._stationPos); subD0281(); return; } else { @@ -6464,7 +6472,7 @@ void Scene1337::subD02CA() { } // That continues the block when R2_GLOBALS._v57810 == 200 and di != 4 - subD18B5(1332, _item6._object1._strip, _item6._object1._frame); + setCursorData(1332, _item6._card._strip, _item6._card._frame); R2_GLOBALS._sceneObjects->draw(); Event event; bool found = false; @@ -6472,23 +6480,23 @@ void Scene1337::subD02CA() { for (;;) { if ( ((g_globals->_events.getEvent(event, EVENT_BUTTON_DOWN)) && (event.btnState == BTNSHIFT_RIGHT)) || (g_globals->_events.getEvent(event, EVENT_KEYPRESS)) ){ - _item6._field36 = g_globals->_events._mousePos; + _item6._stationPos = g_globals->_events._mousePos; found_di = false; for (int i = 0; i <= 3; i ++) { - if (subC2BF8(&_arrunkObj1337[2]._arr1[i], Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { - if (_arrunkObj1337[2]._arr1[i]._field34 == 0) { - _arrunkObj1337[2]._arr1[i]._field34 = _item6._field34; - _arrunkObj1337[2]._arr1[i]._object1.postInit(); - _arrunkObj1337[2]._arr1[i]._object1.hide(); - _arrunkObj1337[2]._arr1[i]._object1.setVisage(1332); - _arrunkObj1337[2]._arr1[i]._object1.setPosition(_arrunkObj1337[2]._arr1[i]._field36, 0); - _arrunkObj1337[2]._arr1[i]._object1.fixPriority(170); - setAnimationInfo(&_arrunkObj1337[2]._arr1[i]); - subD18B5(5, 1, 4); + if (subC2BF8(&_gameBoardSide[2]._handCard[i], Common::Point(_item6._stationPos.x + 12, _item6._stationPos.y + 12)) != 0) { + if (_gameBoardSide[2]._handCard[i]._cardId == 0) { + _gameBoardSide[2]._handCard[i]._cardId = _item6._cardId; + _gameBoardSide[2]._handCard[i]._card.postInit(); + _gameBoardSide[2]._handCard[i]._card.hide(); + _gameBoardSide[2]._handCard[i]._card.setVisage(1332); + _gameBoardSide[2]._handCard[i]._card.setPosition(_gameBoardSide[2]._handCard[i]._stationPos, 0); + _gameBoardSide[2]._handCard[i]._card.fixPriority(170); + setAnimationInfo(&_gameBoardSide[2]._handCard[i]); + setCursorData(5, 1, 4); found = true; - _field423E--; - _field4244 = 0; + _currentPlayerNumb--; + _field4244 = false; subC20F9(); } else { actionDisplay(1330, 127, 159, 10, 1, 200, 0, 7, 0, 154, 154); @@ -6499,68 +6507,68 @@ void Scene1337::subD02CA() { } if ((!found) && (!found_di)) { - if (subC2BF8(&_item7, Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { + if (subC2BF8(&_discardPile, Common::Point(_item6._stationPos.x + 12, _item6._stationPos.y + 12)) != 0) { subC4A39(&_item6); } else if (!found) { bool foundVar4; int i; - if (_item6._field34 == 1) { + if (_item6._cardId == 1) { foundVar4 = false; for (i = 0; i <= 7; i++) { - if (subC2BF8(&_arrunkObj1337[2]._arr2[i], Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { + if (subC2BF8(&_gameBoardSide[2]._outpostStation[i], Common::Point(_item6._stationPos.x + 12, _item6._stationPos.y + 12)) != 0) { foundVar4 = true; break; } } - if ((foundVar4) && (_arrunkObj1337[2]._arr2[i]._field34 == 0)) { - if (subC27B5(_arrunkObj1337[2]._arr3[0]._field34) != -1) { + if ((foundVar4) && (_gameBoardSide[2]._outpostStation[i]._cardId == 0)) { + if (subC27B5(_gameBoardSide[2]._delayPile[0]._cardId) != -1) { actionDisplay(1330, 55, 159, 10, 1, 200, 0, 7, 0, 154, 154); } else { - subC340B(&_item6, &_arrunkObj1337[2]._arr2[i]); + subC340B(&_item6, &_gameBoardSide[2]._outpostStation[i]); return; } } else { actionDisplay(1330, 56, 159, 10, 1, 200, 0, 7, 0, 154, 154); } - } else if (_item6._field34 <= 9) { + } else if (_item6._cardId <= 9) { foundVar4 = false; for (i = 0; i <= 7; i++) { - if (subC2BF8(&_arrunkObj1337[2]._arr2[i], Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { + if (subC2BF8(&_gameBoardSide[2]._outpostStation[i], Common::Point(_item6._stationPos.x + 12, _item6._stationPos.y + 12)) != 0) { foundVar4 = true; break; } } - if ((foundVar4) && (_arrunkObj1337[2]._arr2[i]._field34 == 1)) { + if ((foundVar4) && (_gameBoardSide[2]._outpostStation[i]._cardId == 1)) { foundVar4 = false; int j; for (j = 0; j <= 7; j++) { - if (_item6._field34 == _arrunkObj1337[2]._arr2[j]._field34) { + if (_item6._cardId == _gameBoardSide[2]._outpostStation[j]._cardId) { foundVar4 = true; break; } } if (foundVar4) { actionDisplay(1330, 34, 159, 10, 1, 200, 0, 7, 0, 154, 154); - } else if (subC27B5(_arrunkObj1337[2]._arr3[0]._field34) != -1) { + } else if (subC27B5(_gameBoardSide[2]._delayPile[0]._cardId) != -1) { actionDisplay(1330, 35, 159, 10, 1, 200, 0, 7, 0, 154, 154); } else { if (j == 7) _field424A = 2; - subC33C0(&_item6, &_arrunkObj1337[2]._arr2[i]); + subC33C0(&_item6, &_gameBoardSide[2]._outpostStation[i]); return; } } else { actionDisplay(1330, 37, 159, 10, 1, 200, 0, 7, 0, 154, 154); } } else { - if ((_item6._field34 == 26) || (_item6._field34 == 30) ||(_item6._field34 == 32) || (_item6._field34 == 28)) { - if (subC2BF8(&_arrunkObj1337[2]._arr3[0], Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { + if ((_item6._cardId == 26) || (_item6._cardId == 30) ||(_item6._cardId == 32) || (_item6._cardId == 28)) { + if (subC2BF8(&_gameBoardSide[2]._delayPile[0], Common::Point(_item6._stationPos.x + 12, _item6._stationPos.y + 12)) != 0) { actionDisplay(1330, 42, 159, 10, 1, 200, 0, 7, 0, 154, 154); - } else if (!subC3386(_arrunkObj1337[2]._arr3[0]._field34, _item6._field34)) { - if (_arrunkObj1337[2]._arr3[0]._field34 != 0) { - switch (_arrunkObj1337[2]._arr3[0]._field34) { + } else if (!subC3386(_gameBoardSide[2]._delayPile[0]._cardId, _item6._cardId)) { + if (_gameBoardSide[2]._delayPile[0]._cardId != 0) { + switch (_gameBoardSide[2]._delayPile[0]._cardId) { case 11: actionDisplay(1330, 68, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; @@ -6580,15 +6588,15 @@ void Scene1337::subD02CA() { actionDisplay(1330, 41, 159, 10, 1, 200, 0, 7, 0, 154, 154); } } else { - subC34A1(&_item6, &_arrunkObj1337[2]._arr3[0]); + subC34A1(&_item6, &_gameBoardSide[2]._delayPile[0]); return; } } else { - if ((subC27F9(_item6._field34) == -1) && (subC27B5(_item6._field34) == -1)) { - if (_item6._field34 == 13) { - if (subC2BF8(&_arrunkObj1337[0]._arr4[0], Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { + if ((subC27F9(_item6._cardId) == -1) && (subC27B5(_item6._cardId) == -1)) { + if (_item6._cardId == 13) { + if (subC2BF8(&_gameBoardSide[0]._arr4[0], Common::Point(_item6._stationPos.x + 12, _item6._stationPos.y + 12)) != 0) { for (int k = 0; k <= 7; k++) { - if (_arrunkObj1337[0]._arr2[k]._field34 != 0) { + if (_gameBoardSide[0]._outpostStation[k]._cardId != 0) { found = true; subC358E(&_item6, 0); } @@ -6596,18 +6604,18 @@ void Scene1337::subD02CA() { if (!found) actionDisplay(1330, 74, 159, 10, 1, 200, 0, 7, 0, 154, 154); - } else if (subC2BF8(&_arrunkObj1337[3]._arr4[0], Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { + } else if (subC2BF8(&_gameBoardSide[3]._arr4[0], Common::Point(_item6._stationPos.x + 12, _item6._stationPos.y + 12)) != 0) { for (int k = 0; k <= 7; k++) { - if (_arrunkObj1337[3]._arr2[k]._field34 != 0) { + if (_gameBoardSide[3]._outpostStation[k]._cardId != 0) { found = true; subC358E(&_item6, 3); } } if (!found) actionDisplay(1330, 74, 159, 10, 1, 200, 0, 7, 0, 154, 154); - } else if (subC2BF8(&_arrunkObj1337[1]._arr4[0], Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { + } else if (subC2BF8(&_gameBoardSide[1]._arr4[0], Common::Point(_item6._stationPos.x + 12, _item6._stationPos.y + 12)) != 0) { for (int k = 0; k <= 7; k++) { - if (_arrunkObj1337[1]._arr2[k]._field34 == 0) { + if (_gameBoardSide[1]._outpostStation[k]._cardId == 0) { found = true; subC358E(&_item6, 1); } @@ -6617,48 +6625,48 @@ void Scene1337::subD02CA() { } else { actionDisplay(1330, 128, 159, 10, 1, 200, 0, 7, 0, 154, 154); } - } else if (_item6._field34 == 25) { + } else if (_item6._cardId == 25) { int k; - if (subC2BF8(&_arrunkObj1337[0]._arr4[0], Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { - if ( (_arrunkObj1337[0]._arr1[0]._field34 != 0) - || (_arrunkObj1337[0]._arr1[1]._field34 != 0) - || (_arrunkObj1337[0]._arr1[2]._field34 != 0) - || (_arrunkObj1337[0]._arr1[3]._field34 != 0) ) { + if (subC2BF8(&_gameBoardSide[0]._arr4[0], Common::Point(_item6._stationPos.x + 12, _item6._stationPos.y + 12)) != 0) { + if ( (_gameBoardSide[0]._handCard[0]._cardId != 0) + || (_gameBoardSide[0]._handCard[1]._cardId != 0) + || (_gameBoardSide[0]._handCard[2]._cardId != 0) + || (_gameBoardSide[0]._handCard[3]._cardId != 0) ) { for (k = 0; k <= 3; k++){ - if (_arrunkObj1337[2]._arr1[k]._field34 == 0) + if (_gameBoardSide[2]._handCard[k]._cardId == 0) break; } - subC318B(2, &_arrunkObj1337[2]._arr1[k], 0); + subC318B(2, &_gameBoardSide[2]._handCard[k], 0); return; } else { actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154); } - } else if (subC2BF8(&_arrunkObj1337[1]._arr4[0], Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { - if ( (_arrunkObj1337[1]._arr1[0]._field34 != 0) - || (_arrunkObj1337[1]._arr1[1]._field34 != 0) - || (_arrunkObj1337[1]._arr1[2]._field34 != 0) - || (_arrunkObj1337[1]._arr1[3]._field34 != 0) ) { + } else if (subC2BF8(&_gameBoardSide[1]._arr4[0], Common::Point(_item6._stationPos.x + 12, _item6._stationPos.y + 12)) != 0) { + if ( (_gameBoardSide[1]._handCard[0]._cardId != 0) + || (_gameBoardSide[1]._handCard[1]._cardId != 0) + || (_gameBoardSide[1]._handCard[2]._cardId != 0) + || (_gameBoardSide[1]._handCard[3]._cardId != 0) ) { for (k = 0; k <= 3; k++){ - if (_arrunkObj1337[2]._arr1[k]._field34 == 0) + if (_gameBoardSide[2]._handCard[k]._cardId == 0) break; } - subC318B(2, &_arrunkObj1337[2]._arr1[k], 1); + subC318B(2, &_gameBoardSide[2]._handCard[k], 1); return; } else { actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154); } } - if (subC2BF8(&_arrunkObj1337[3]._arr4[0], Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { - if ( (_arrunkObj1337[3]._arr1[0]._field34 != 0) - || (_arrunkObj1337[3]._arr1[1]._field34 != 0) - || (_arrunkObj1337[3]._arr1[2]._field34 != 0) - || (_arrunkObj1337[3]._arr1[3]._field34 != 0) ) { + if (subC2BF8(&_gameBoardSide[3]._arr4[0], Common::Point(_item6._stationPos.x + 12, _item6._stationPos.y + 12)) != 0) { + if ( (_gameBoardSide[3]._handCard[0]._cardId != 0) + || (_gameBoardSide[3]._handCard[1]._cardId != 0) + || (_gameBoardSide[3]._handCard[2]._cardId != 0) + || (_gameBoardSide[3]._handCard[3]._cardId != 0) ) { for (k = 0; k <= 3; k++){ - if (_arrunkObj1337[2]._arr1[k]._field34 == 0) + if (_gameBoardSide[2]._handCard[k]._cardId == 0) break; } - subC318B(2, &_arrunkObj1337[2]._arr1[k], 3); + subC318B(2, &_gameBoardSide[2]._handCard[k], 3); return; } else { actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154); @@ -6666,17 +6674,17 @@ void Scene1337::subD02CA() { } else { actionDisplay(1330, 129, 159, 10, 1, 200, 0, 7, 0, 154, 154); } - } else if (_item6._field34 == 29) { + } else if (_item6._cardId == 29) { actionDisplay(1330, 136, 159, 10, 1, 200, 0, 7, 0, 154, 154); - } else if (_item6._field34 == 27) { + } else if (_item6._cardId == 27) { actionDisplay(1330, 137, 159, 10, 1, 200, 0, 7, 0, 154, 154); } } else { - if (subC2BF8(&_arrunkObj1337[0]._arr3[0], Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { - if (_arrunkObj1337[0]._arr3[0]._field34 != 0) { + if (subC2BF8(&_gameBoardSide[0]._delayPile[0], Common::Point(_item6._stationPos.x + 12, _item6._stationPos.y + 12)) != 0) { + if (_gameBoardSide[0]._delayPile[0]._cardId != 0) { actionDisplay(1330, 15, 159, 10, 1, 200, 0, 7, 0, 154, 154); - } else if (!subC32B1(0, _item6._field34)) { - switch (_item6._field34) { + } else if (!subC32B1(0, _item6._cardId)) { + switch (_item6._cardId) { case 10: actionDisplay(1330, 66, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; @@ -6705,14 +6713,14 @@ void Scene1337::subD02CA() { break; } } else { - subC3456(&_item6, &_arrunkObj1337[0]._arr3[0]); + subC3456(&_item6, &_gameBoardSide[0]._delayPile[0]); found = true; } - } else if (subC2BF8(&_arrunkObj1337[3]._arr3[0], Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { - if (_arrunkObj1337[3]._arr3[0]._field34 != 0) { + } else if (subC2BF8(&_gameBoardSide[3]._delayPile[0], Common::Point(_item6._stationPos.x + 12, _item6._stationPos.y + 12)) != 0) { + if (_gameBoardSide[3]._delayPile[0]._cardId != 0) { actionDisplay(1330, 17, 159, 10, 1, 200, 0, 7, 0, 154, 154); - } else if (!subC32B1(3, _item6._field34)) { - switch (_item6._field34) { + } else if (!subC32B1(3, _item6._cardId)) { + switch (_item6._cardId) { case 10: actionDisplay(1330, 66, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; @@ -6741,14 +6749,14 @@ void Scene1337::subD02CA() { break; } } else { - subC3456(&_item6, &_arrunkObj1337[3]._arr3[0]); + subC3456(&_item6, &_gameBoardSide[3]._delayPile[0]); found = true; } - } else if (subC2BF8(&_arrunkObj1337[1]._arr3[0], Common::Point(_item6._field36.x + 12, _item6._field36.y + 12)) != 0) { - if (_arrunkObj1337[1]._arr3[0]._field34 != 0) { + } else if (subC2BF8(&_gameBoardSide[1]._delayPile[0], Common::Point(_item6._stationPos.x + 12, _item6._stationPos.y + 12)) != 0) { + if (_gameBoardSide[1]._delayPile[0]._cardId != 0) { actionDisplay(1330, 19, 159, 10, 1, 200, 0, 7, 0, 154, 154); - } else if (!subC32B1(1, _item6._field34)) { - switch (_item6._field34) { + } else if (!subC32B1(1, _item6._cardId)) { + switch (_item6._cardId) { case 10: actionDisplay(1330, 66, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; @@ -6777,7 +6785,7 @@ void Scene1337::subD02CA() { break; } } else { - subC3456(&_item6, &_arrunkObj1337[1]._arr3[0]); + subC3456(&_item6, &_gameBoardSide[1]._delayPile[0]); found = true; } } else { @@ -6813,54 +6821,65 @@ void Scene1337::subD183F(int arg1, int arg2) { R2_GLOBALS._v5780E = 1; } + // The original was using an intermediate function to call setCursorData. + // It has been removed to improve readability if (R2_GLOBALS._v5780E == 1) { R2_GLOBALS._v57810 = 200; - subD195F(1, 4); + setCursorData(5, 1, 4); } else if (R2_GLOBALS._v5780E == 2) { R2_GLOBALS._v57810 = 300; - subD195F(1, 5); + setCursorData(5, 1, 5); } else { R2_GLOBALS._v57810 = 0; - subD195F(0, 0); + setCursorData(5, 0, 0); } } -void Scene1337::subD18B5(int resNum, int rlbNum, int arg3) { - warning("STUBBED lvl3 Scene1337::subD18B5()"); +void Scene1337::setCursorData(int resNum, int rlbNum, int frameNum) { + _cursorCurRes = resNum; + _cursorCurStrip = rlbNum; + _cursorCurFrame = frameNum; + + if (!frameNum) { + // Should be a hardcoded cursor displaying only a dot. + // FIXME: Use another cursor when possible + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); + } else { + uint size; + byte *cursor = g_resourceManager->getSubResource(resNum, rlbNum, frameNum, &size); + // Decode the cursor + GfxSurface s = surfaceFromRes(cursor); + + Graphics::Surface surface = s.lockSurface(); + const byte *cursorData = (const byte *)surface.getPixels(); + CursorMan.replaceCursor(cursorData, surface.w, surface.h, s._centroid.x, s._centroid.y, s._transColor); + s.unlockSurface(); + } } -int Scene1337::subD18F5() { +void Scene1337::subD18F5() { if (R2_GLOBALS._v57709 == 0) - // The cursor looks... very dummy - // To be checked - warning("TODO: CursorManager.setData(R2_GLOBALS.off_57705)"); + R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); ++R2_GLOBALS._v57709; - - return R2_GLOBALS._v57709; } -int Scene1337::subD1917() { +void Scene1337::subD1917() { if (R2_GLOBALS._v57709 != 0) { R2_GLOBALS._v57709--; - if (R2_GLOBALS._v57709 != 0) - warning("FIXME: subD195F(_width, _data);"); + if (R2_GLOBALS._v57709 != 0) { + // The original was using an intermediate function to call setCursorData. + // It has been removed to improve readability + setCursorData(5, _cursorCurStrip, _cursorCurFrame); + } } - - return R2_GLOBALS._v57709; } -int Scene1337::subD1940(bool flag) { +void Scene1337::subD1940(bool flag) { if (flag) ++R2_GLOBALS._v5780C; else if (R2_GLOBALS._v5780C != 0) --R2_GLOBALS._v5780C; - - return R2_GLOBALS._v5780C; -} - -void Scene1337::subD195F(int arg1, int arg2) { - subD18B5(5, arg1, arg2); } void Scene1337::subD1975(int arg1, int arg2) { diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.h b/engines/tsage/ringworld2/ringworld2_scenes1.h index cc114b2033..45ed746bac 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.h +++ b/engines/tsage/ringworld2/ringworld2_scenes1.h @@ -185,10 +185,10 @@ public: class Scene1337 : public SceneExt { class unkObj1337sub1: public SceneHotspot { public: - SceneObject _object1; + SceneObject _card; - int _field34; - Common::Point _field36; + int _cardId; + Common::Point _stationPos; unkObj1337sub1(); void synchronize(Serializer &s); @@ -196,9 +196,9 @@ class Scene1337 : public SceneExt { class unkObj1337_1: public SceneHotspot { public: - unkObj1337sub1 _arr1[4]; - unkObj1337sub1 _arr2[8]; - unkObj1337sub1 _arr3[1]; + unkObj1337sub1 _handCard[4]; + unkObj1337sub1 _outpostStation[8]; + unkObj1337sub1 _delayPile[1]; unkObj1337sub1 _arr4[1]; Common::Point _fieldB94; @@ -213,8 +213,7 @@ class Scene1337 : public SceneExt { class Action1337: public Action { public: - void subD18B5(int resNum, int stripNum, int frameNum); - void skipFrames(int32 skipCount); + void waitFrames(int32 frameCount); }; class Action1: public Action1337 { @@ -277,9 +276,9 @@ public: ASound _aSound2; BackgroundSceneObject _background1; bool _autoplay; - unkObj1337_1 _arrunkObj1337[4]; + unkObj1337_1 _gameBoardSide[4]; SceneItem _item1; - SceneObject _object1; + SceneObject _currentPlayerArrow; Action1 _action1; Action2 _action2; Action3 _action3; @@ -293,33 +292,35 @@ public: Action11 _action11; Action12 _action12; Action13 _action13; - unkObj1337sub1 _item2; - unkObj1337sub1 _item3; + unkObj1337sub1 _animatedCard; + unkObj1337sub1 _shuffleAnimation; unkObj1337sub1 _item4; BackgroundSceneObject _background2; - int _field3E24; + int _cardsAvailableNumb; int _field3E26; - int _field3E28[100]; + int _availableCardsPile[100]; unkObj1337sub1 *_field3EF0; unkObj1337sub1 *_field3EF4; unkObj1337sub1 *_field3EF8; unkObj1337sub1 _item5; unkObj1337sub1 _item6; - unkObj1337sub1 _item7; + unkObj1337sub1 _discardPile; unkObj1337sub1 _item8; - int _field423C; - int _field423E; + bool _shuffleEndedFl; + int _currentPlayerNumb; int _field4240; int _field4242; - int _field4244; - int _field4246; - int _field4248; + bool _field4244; + bool _field4246; int _field424A; - int _field424C; - int _field424E; + int _instructionsDisplayedFl; + int _instructionsWaitCount; + int _cursorCurRes; + int _cursorCurStrip; + int _cursorCurFrame; - SceneObject _arrObject1[8]; - SceneObject _arrObject2[8]; + SceneObject _upperDisplayCard[8]; + SceneObject _lowerDisplayCard[8]; Scene1337(); virtual void synchronize(Serializer &s); @@ -358,10 +359,10 @@ public: void subC51A0(unkObj1337sub1 *subObj1, unkObj1337sub1 *subObj2); void displayDialog(int dialogNumb); void subPostInit(); - void subCB59B(); + void displayInstructions(); void suggestInstructions(); void shuffleCards(); - void subCCF26(); + void firstShuffle(); void subCD193(); void subCDB90(int arg1, Common::Point pt); void subCF31D(); @@ -370,11 +371,10 @@ public: void subD0281(); void subD02CA(); void subD183F(int arg1, int arg2); - void subD18B5(int resNum, int rlbNum, int arg3); - int subD18F5(); - int subD1917(); - int subD1940(bool flag); - void subD195F(int arg1, int arg2); + void setCursorData(int resNum, int rlbNum, int frameNum); + void subD18F5(); + void subD1917(); + void subD1940(bool flag); void subD1975(int arg1, int arg2); void subD1A48(int arg1); |