diff options
Diffstat (limited to 'engines/dreamweb/stubs.cpp')
-rw-r--r-- | engines/dreamweb/stubs.cpp | 327 |
1 files changed, 91 insertions, 236 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 0c57d0d767..c353948abb 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -882,13 +882,13 @@ void DreamGenContext::triggerMessage(uint16 index) { void DreamGenContext::processTrigger() { if (data.byte(kLasttrigger) == '1') { - DreamBase::setLocation(8); + setLocation(8); triggerMessage(45); } else if (data.byte(kLasttrigger) == '2') { - DreamBase::setLocation(9); + setLocation(9); triggerMessage(55); } else if (data.byte(kLasttrigger) == '3') { - DreamBase::setLocation(2); + setLocation(2); triggerMessage(59); } } @@ -1000,7 +1000,7 @@ void DreamBase::deallocateMem(uint16 segment) { } } -void DreamGenContext::DOSReturn() { +void DreamBase::DOSReturn() { if (data.byte(kCommandtype) != 250) { data.byte(kCommandtype) = 250; commandOnly(46); @@ -1015,7 +1015,7 @@ void DreamGenContext::DOSReturn() { void DreamGenContext::set16ColPalette() { } -void DreamGenContext::eraseOldObs() { +void DreamBase::eraseOldObs() { if (data.byte(kNewobs) == 0) return; @@ -1191,7 +1191,7 @@ void DreamBase::crosshair() { showFrame(engine->icons1(), kZoomx + 24, kZoomy + 19, frame, 0); } -void DreamGenContext::delTextLine() { +void DreamBase::delTextLine() { uint16 x = data.word(kTextaddressx); uint16 y = data.word(kTextaddressy); if (data.byte(kForeignrelease) != 0) @@ -1200,10 +1200,10 @@ void DreamGenContext::delTextLine() { } void DreamGenContext::commandOnly() { - commandOnly(al); + commandOnly(al); } -void DreamGenContext::commandOnly(uint8 command) { +void DreamBase::commandOnly(uint8 command) { delTextLine(); uint16 index = command * 2; uint16 offset = kTextstart + getSegment(data.word(kCommandtext)).word(index); @@ -1409,7 +1409,7 @@ void *DreamBase::getAnyAd(uint8 *value1, uint8 *value2) { } } -void *DreamGenContext::getAnyAdDir(uint8 index, uint8 flag) { +void *DreamBase::getAnyAdDir(uint8 index, uint8 flag) { if (flag == 4) return getExAd(index); else if (flag == 2) @@ -1488,18 +1488,11 @@ bool DreamGenContext::finishedWalkingCPP() { return (data.byte(kLinepointer) == 254) && (data.byte(kFacing) == data.byte(kTurntoface)); } -void DreamGenContext::getFlagUnderP() { - uint8 flag, flagEx; - getFlagUnderP(&flag, &flagEx); - cl = flag; - ch = flagEx; -} - -void DreamGenContext::getFlagUnderP(uint8 *flag, uint8 *flagEx) { +void DreamBase::getFlagUnderP(uint8 *flag, uint8 *flagEx) { uint8 type, flagX, flagY; checkOne(data.word(kMousex) - data.word(kMapadx), data.word(kMousey) - data.word(kMapady), flag, flagEx, &type, &flagX, &flagY); - cl = data.byte(kLastflag) = *flag; - ch = data.byte(kLastflagex) = *flagEx; + data.byte(kLastflag) = *flag; + data.byte(kLastflagex) = *flagEx; } void DreamGenContext::walkAndExamine() { @@ -1574,7 +1567,8 @@ void DreamGenContext::obName(uint8 command, uint8 commandType) { } } - getFlagUnderP(); + uint8 flag, flagEx; + getFlagUnderP(&flag, &flagEx); if (data.byte(kLastflag) < 2) { blockNameText(); return; @@ -1691,7 +1685,7 @@ void DreamBase::showPointer() { } } -void DreamGenContext::animPointer() { +void DreamBase::animPointer() { if (data.byte(kPointermode) == 2) { data.byte(kPointerframe) = 0; @@ -1745,17 +1739,22 @@ void DreamGenContext::animPointer() { data.byte(kPointerframe) = 8; } -void DreamGenContext::printMessage() { - printMessage(di, bx, al, dl, (bool)(dl & 1)); +void DreamBase::printMessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered) { + uint16 offset = kTextstart + getSegment(data.word(kCommandtext)).word(index * 2); + const uint8 *string = getSegment(data.word(kCommandtext)).ptr(offset, 0); + printDirect(string, x, y, maxWidth, centered); } -void DreamGenContext::printMessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered) { +void DreamBase::printMessage2(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered, uint8 count) { uint16 offset = kTextstart + getSegment(data.word(kCommandtext)).word(index * 2); const uint8 *string = getSegment(data.word(kCommandtext)).ptr(offset, 0); - printDirect(&string, x, &y, maxWidth, centered); + while (count--) { + findNextColon(&string); + } + printDirect(string, x, y, maxWidth, centered); } -bool objectMatches(void *object, const char *id) { +static bool objectMatches(void *object, const char *id) { const char *objId = (const char *)(((const uint8 *)object) + 12); // whether it is a DynObject or a SetObject for (size_t i = 0; i < 4; ++i) { if (id[i] != objId[i] + 'A') @@ -1769,7 +1768,7 @@ void DreamGenContext::compare() { flags._z = compare(al, ah, id); } -bool DreamGenContext::compare(uint8 index, uint8 flag, const char id[4]) { +bool DreamBase::compare(uint8 index, uint8 flag, const char id[4]) { return objectMatches(getAnyAdDir(index, flag), id); } @@ -1813,7 +1812,7 @@ uint16 DreamGenContext::findExObject(const char *id) { return kNumexobjects; } -bool DreamGenContext::isItDescribed(const ObjPos *pos) { +bool DreamBase::isItDescribed(const ObjPos *pos) { uint16 offset = getSegment(data.word(kSetdesc)).word(kSettextdat + pos->index * 2); uint8 result = getSegment(data.word(kSetdesc)).byte(kSettext + offset); return result != 0; @@ -1827,7 +1826,7 @@ bool DreamGenContext::isCD() { return (data.byte(kSpeechloaded) == 1); } -void DreamGenContext::showIcon() { +void DreamBase::showIcon() { if (data.byte(kReallocation) < 50) { showPanel(); showMan(); @@ -1866,30 +1865,6 @@ bool DreamGenContext::checkIfSet(uint8 x, uint8 y) { return false; } -void DreamBase::showRyanPage() { - showFrame(engine->icons1(), kInventx + 167, kInventy - 12, 12, 0); - showFrame(engine->icons1(), kInventx + 167 + 18 * data.byte(kRyanpage), kInventy - 12, 13 + data.byte(kRyanpage), 0); -} - -void DreamGenContext::findAllRyan() { - findAllRyan(es.ptr(di, 60)); -} - -void DreamGenContext::findAllRyan(uint8 *inv) { - memset(inv, 0xff, 60); - for (size_t i = 0; i < kNumexobjects; ++i) { - DynObject *extra = getExAd(i); - if (extra->mapad[0] != 4) - continue; - if (extra->mapad[1] != 0xff) - continue; - uint8 slot = extra->mapad[2]; - assert(slot < 30); - inv[2 * slot + 0] = i; - inv[2 * slot + 1] = 4; - } -} - void DreamGenContext::hangOn() { hangOn(cx); } @@ -1903,11 +1878,7 @@ void DreamBase::hangOn(uint16 frameCount) { } } -void DreamGenContext::hangOnW() { - hangOnW(cx); -} - -void DreamGenContext::hangOnW(uint16 frameCount) { +void DreamBase::hangOnW(uint16 frameCount) { while (frameCount) { delPointer(); readMouse(); @@ -1925,7 +1896,7 @@ void DreamGenContext::hangOnP() { hangOnP(cx); } -void DreamGenContext::hangOnP(uint16 count) { +void DreamBase::hangOnP(uint16 count) { data.word(kMaintimer) = 0; uint8 pointerFrame = data.byte(kPointerframe); uint8 pickup = data.byte(kPickup); @@ -2009,12 +1980,12 @@ void DreamGenContext::enterSymbol() { dumpTextLine(); dumpSymbol(); RectWithCallback symbolList[] = { - { kSymbolx+40,kSymbolx+64,kSymboly+2,kSymboly+16,&DreamGenContext::quitSymbol }, - { kSymbolx,kSymbolx+52,kSymboly+20,kSymboly+50,&DreamGenContext::setTopLeft }, - { kSymbolx+52,kSymbolx+104,kSymboly+20,kSymboly+50,&DreamGenContext::setTopRight }, - { kSymbolx,kSymbolx+52,kSymboly+50,kSymboly+80,&DreamGenContext::setBotLeft }, - { kSymbolx+52,kSymbolx+104,kSymboly+50,kSymboly+80,&DreamGenContext::setBotRight }, - { 0,320,0,200,&DreamGenContext::blank }, + { kSymbolx+40,kSymbolx+64,kSymboly+2,kSymboly+16,&DreamBase::quitSymbol }, + { kSymbolx,kSymbolx+52,kSymboly+20,kSymboly+50,&DreamBase::setTopLeft }, + { kSymbolx+52,kSymbolx+104,kSymboly+20,kSymboly+50,&DreamBase::setTopRight }, + { kSymbolx,kSymbolx+52,kSymboly+50,kSymboly+80,&DreamBase::setBotLeft }, + { kSymbolx+52,kSymbolx+104,kSymboly+50,kSymboly+80,&DreamBase::setBotRight }, + { 0,320,0,200,&DreamBase::blank }, { 0xFFFF,0,0,0,0 } }; checkCoords(symbolList); @@ -2175,7 +2146,7 @@ void DreamGenContext::watchCount() { } } -void DreamGenContext::roomName() { +void DreamBase::roomName() { printMessage(88, 18, 53, 240, false); uint16 textIndex = data.byte(kRoomnum); if (textIndex >= 32) @@ -2189,7 +2160,7 @@ void DreamGenContext::roomName() { useCharset1(); } -void DreamGenContext::zoomIcon() { +void DreamBase::zoomIcon() { if (data.byte(kZoomon) == 0) return; showFrame(engine->icons1(), kZoomx, kZoomy-1, 8, 0); @@ -2312,31 +2283,31 @@ void DreamBase::useTempCharset() { engine->setCurrentCharset(engine->tempCharset()); } -void DreamGenContext::getRidOfTemp() { +void DreamBase::getRidOfTemp() { deallocateMem(data.word(kTempgraphics)); } -void DreamGenContext::getRidOfTempText() { +void DreamBase::getRidOfTempText() { deallocateMem(data.word(kTextfile1)); } -void DreamGenContext::getRidOfTemp2() { +void DreamBase::getRidOfTemp2() { deallocateMem(data.word(kTempgraphics2)); } -void DreamGenContext::getRidOfTemp3() { +void DreamBase::getRidOfTemp3() { deallocateMem(data.word(kTempgraphics3)); } -void DreamGenContext::getRidOfTempCharset() { +void DreamBase::getRidOfTempCharset() { engine->freeTempCharset(); } -void DreamGenContext::getRidOfTempsP() { +void DreamBase::getRidOfTempsP() { deallocateMem(data.word(kTempsprites)); } -void DreamGenContext::getRidOfAll() { +void DreamBase::getRidOfAll() { deallocateMem(data.word(kBackdrop)); deallocateMem(data.word(kSetframes)); deallocateMem(data.word(kReel1)); @@ -2398,7 +2369,7 @@ void DreamGenContext::restoreAll() { setAllChanges(); } -void DreamGenContext::restoreReels() { +void DreamBase::restoreReels() { if (data.byte(kRoomloaded) == 0) return; @@ -2425,7 +2396,7 @@ void DreamGenContext::restoreReels() { engine->closeFile(); } -void DreamGenContext::loadFolder() { +void DreamBase::loadFolder() { loadIntoTemp("DREAMWEB.G09"); // folder graphics 1 loadIntoTemp2("DREAMWEB.G10"); // folder graphics 2 loadIntoTemp3("DREAMWEB.G11"); // folder graphics 3 @@ -2433,7 +2404,7 @@ void DreamGenContext::loadFolder() { loadTempText("DREAMWEB.T50"); // folder text } -void DreamGenContext::showFolder() { +void DreamBase::showFolder() { data.byte(kCommandtype) = 255; if (data.byte(kFolderpage)) { useTempCharset(); @@ -2458,7 +2429,7 @@ void DreamGenContext::showFolder() { } } -void DreamGenContext::showLeftPage() { +void DreamBase::showLeftPage() { showFrame(tempGraphics2(), 0, 12, 3, 0); uint16 y = 12+5; for (size_t i = 0; i < 9; ++i) { @@ -2491,7 +2462,7 @@ void DreamGenContext::showLeftPage() { } } -void DreamGenContext::showRightPage() { +void DreamBase::showRightPage() { showFrame(tempGraphics2(), 143, 12, 0, 0); uint16 y = 12+37; for (size_t i = 0; i < 7; ++i) { @@ -2539,7 +2510,7 @@ void DreamBase::panelIcons1() { showWatch(); } -void DreamGenContext::examIcon() { +void DreamBase::examIcon() { showFrame(engine->icons2(), 254, 5, 3, 0); } @@ -2547,10 +2518,6 @@ uint8 DreamBase::getLocation(uint8 index) { return data.byte(kRoomscango + index); } -void DreamGenContext::getLocation() { - al = DreamBase::getLocation(al); -} - void DreamBase::setLocation(uint8 index) { data.byte(kRoomscango + index) = 1; } @@ -2568,10 +2535,10 @@ const uint8 *DreamBase::getTextInFile1(uint16 index) { void DreamGenContext::checkFolderCoords() { RectWithCallback folderList[] = { - { 280,320,160,200, &DreamGenContext::quitKey }, + { 280,320,160,200, &DreamBase::quitKey }, { 143,300,6,194, &DreamGenContext::nextFolder }, { 0,143,6,194, &DreamGenContext::lastFolder }, - { 0,320,0,200, &DreamGenContext::blank }, + { 0,320,0,200, &DreamBase::blank }, { 0xFFFF,0,0,0, 0 } }; checkCoords(folderList); @@ -2617,10 +2584,10 @@ void DreamGenContext::lastFolder() { } } -void DreamGenContext::folderHints() { +void DreamBase::folderHints() { if (data.byte(kFolderpage) == 5) { - if ((data.byte(kAidedead) != 1) && (DreamBase::getLocation(13) != 1)) { - DreamBase::setLocation(13); + if ((data.byte(kAidedead) != 1) && (getLocation(13) != 1)) { + setLocation(13); showFolder(); const uint8 *string = getTextInFile1(30); printDirect(string, 0, 86, 141, true); @@ -2628,8 +2595,8 @@ void DreamGenContext::folderHints() { hangOnP(200); } } else if (data.byte(kFolderpage) == 9) { - if (DreamBase::getLocation(7) != 1) { - DreamBase::setLocation(7); + if (getLocation(7) != 1) { + setLocation(7); showFolder(); const uint8 *string = getTextInFile1(31); printDirect(string, 0, 86, 141, true); @@ -2639,19 +2606,15 @@ void DreamGenContext::folderHints() { } } -void DreamGenContext::folderExit() { +void DreamBase::folderExit() { showFrame(tempGraphics2(), 296, 178, 6, 0); } -void DreamGenContext::loadTravelText() { +void DreamBase::loadTravelText() { data.word(kTraveltext) = standardLoad("DREAMWEB.T81"); // location descs } -void DreamGenContext::loadTempText() { - loadTempText((const char *)data.ptr(dx, 0)); -} - -void DreamGenContext::loadTempText(const char *fileName) { +void DreamBase::loadTempText(const char *fileName) { data.word(kTextfile1) = standardLoad(fileName); } @@ -2679,7 +2642,7 @@ void DreamGenContext::allocateBuffers() { data.word(kSounddata2) = allocateMem(2048/16); } -void DreamGenContext::workToScreenM() { +void DreamBase::workToScreenM() { animPointer(); readMouse(); showPointer(); @@ -2729,8 +2692,8 @@ void DreamGenContext::useMenu() { dumpMenu(); dumpTextLine(); RectWithCallback menuList[] = { - { kMenux+54,kMenux+68,kMenuy+72,kMenuy+88,&DreamGenContext::quitKey }, - { 0,320,0,200,&DreamGenContext::blank }, + { kMenux+54,kMenux+68,kMenuy+72,kMenuy+88,&DreamBase::quitKey }, + { 0,320,0,200,&DreamBase::blank }, { 0xFFFF,0,0,0,0 } }; checkCoords(menuList); @@ -3156,7 +3119,7 @@ void DreamGenContext::intro() { data.byte(kLasthardkey) = 0; } -void DreamGenContext::setTopLeft() { +void DreamBase::setTopLeft() { if (data.byte(kSymboltopdir) != 0) { blank(); return; @@ -3171,7 +3134,7 @@ void DreamGenContext::setTopLeft() { data.byte(kSymboltopdir) = 0xFF; } -void DreamGenContext::setTopRight() { +void DreamBase::setTopRight() { if (data.byte(kSymboltopdir) != 0) { blank(); return; @@ -3186,7 +3149,7 @@ void DreamGenContext::setTopRight() { data.byte(kSymboltopdir) = 1; } -void DreamGenContext::setBotLeft() { +void DreamBase::setBotLeft() { if (data.byte(kSymbolbotdir) != 0) { blank(); return; @@ -3201,7 +3164,7 @@ void DreamGenContext::setBotLeft() { data.byte(kSymbolbotdir) = 0xFF; } -void DreamGenContext::setBotRight() { +void DreamBase::setBotRight() { if (data.byte(kSymbolbotdir) != 0) { blank(); return; @@ -3226,14 +3189,14 @@ void DreamGenContext::newGame() { data.byte(kGetback) = 3; } -void DreamGenContext::getBackFromOps() { +void DreamBase::getBackFromOps() { if (data.byte(kMandead) == 2) blank(); else getBack1(); } -void DreamGenContext::getBackToOps() { +void DreamBase::getBackToOps() { if (data.byte(kCommandtype) != 201) { data.byte(kCommandtype) = 201; commandOnly(42); @@ -3343,13 +3306,7 @@ void DreamGenContext::redrawMainScrn() { data.byte(kCommandtype) = 255; } -void DreamGenContext::selectSlot2() { - if (data.word(kMousebutton)) - data.byte(kLoadingorsave) = 2; - selectSlot(); -} - -void DreamGenContext::blank() { +void DreamBase::blank() { if (data.byte(kCommandtype) != 199) { data.byte(kCommandtype) = 199; commandOnly(0); @@ -3379,7 +3336,7 @@ void DreamGenContext::makeMainScreen() { data.byte(kManisoffscreen) = 0; } -void DreamGenContext::openInv() { +void DreamBase::openInv() { data.byte(kInvopen) = 1; printMessage(80, 58 - 10, 61, 240, (240 & 1)); fillRyan(); @@ -3390,8 +3347,8 @@ void DreamGenContext::obsThatDoThings() { if (!compare(data.byte(kCommand), data.byte(kObjecttype), "MEMB")) return; // notlouiscard - if (DreamBase::getLocation(4) != 1) { - DreamBase::setLocation(4); + if (getLocation(4) != 1) { + setLocation(4); lookAtCard(); } } @@ -3691,7 +3648,7 @@ void DreamGenContext::selectLocation() { { 280,308,4,44,&DreamGenContext::lookAtPlace }, { 104,216,138,192,&DreamGenContext::destSelect }, { 273,320,157,198,&DreamGenContext::getBack1 }, - { 0,320,0,200,&DreamGenContext::blank }, + { 0,320,0,200,&DreamBase::blank }, { 0xFFFF,0,0,0,0 } }; checkCoords(destList); @@ -3709,7 +3666,7 @@ void DreamGenContext::selectLocation() { } -void DreamGenContext::examineInventory() { +void DreamBase::examineInventory() { if (data.byte(kCommandtype) != 249) { data.byte(kCommandtype) = 249; commandOnly(32); @@ -3768,13 +3725,11 @@ void DreamBase::showDiary() { showFrame(tempGraphics(), kDiaryx + 176, kDiaryy + 108, 2, 0); } -void DreamGenContext::underTextLine() { +void DreamBase::underTextLine() { uint16 y = data.word(kTextaddressy); if (data.byte(kForeignrelease)) y -= 3; - ds = data.word(kBuffers); - si = kTextunder; - multiGet(ds.ptr(si, 0), data.byte(kTextaddressx), y, kUndertextsizex, kUndertextsizey); + multiGet(textUnder(), data.byte(kTextaddressx), y, kUndertextsizex, kUndertextsizey); } void DreamGenContext::showDecisions() { @@ -3784,16 +3739,12 @@ void DreamGenContext::showDecisions() { underTextLine(); } -void DreamGenContext::getUnderZoom() { - ds = data.word(kBuffers); - si = kZoomspace; - multiGet(ds.ptr(si, 0), kZoomx + 5, kZoomy + 4, 46, 40); +void DreamBase::getUnderZoom() { + multiGet(getSegment(data.word(kBuffers)).ptr(kZoomspace, 0), kZoomx + 5, kZoomy + 4, 46, 40); } -void DreamGenContext::putUnderZoom() { - ds = data.word(kBuffers); - si = kZoomspace; - multiPut(ds.ptr(si, 0), kZoomx + 5, kZoomy + 4, 46, 40); +void DreamBase::putUnderZoom() { + multiPut(getSegment(data.word(kBuffers)).ptr(kZoomspace, 0), kZoomx + 5, kZoomy + 4, 46, 40); } void DreamGenContext::showWatchReel() { @@ -3926,9 +3877,9 @@ void DreamGenContext::decide() { RectWithCallback decideList[] = { { kOpsx+69,kOpsx+124,kOpsy+30,kOpsy+76,&DreamGenContext::newGame }, - { kOpsx+20,kOpsx+87,kOpsy+10,kOpsy+59,&DreamGenContext::DOSReturn }, + { kOpsx+20,kOpsx+87,kOpsy+10,kOpsy+59,&DreamBase::DOSReturn }, { kOpsx+123,kOpsx+190,kOpsy+10,kOpsy+59,&DreamGenContext::loadOld }, - { 0,320,0,200,&DreamGenContext::blank }, + { 0,320,0,200,&DreamBase::blank }, { 0xFFFF,0,0,0,0 } }; @@ -3972,7 +3923,7 @@ void DreamGenContext::talk() { RectWithCallback talkList[] = { { 273,320,157,198,&DreamGenContext::getBack1 }, { 240,290,2,44,&DreamGenContext::moreTalk }, - { 0,320,0,200,&DreamGenContext::blank }, + { 0,320,0,200,&DreamBase::blank }, { 0xFFFF,0,0,0,0 } }; @@ -4027,7 +3978,7 @@ void DreamGenContext::discOps() { { kOpsx+59,kOpsx+114,kOpsy+30,kOpsy+76,&DreamGenContext::loadGame }, { kOpsx+10,kOpsx+79,kOpsy+10,kOpsy+59,&DreamGenContext::saveGame }, { kOpsx+176,kOpsx+192,kOpsy+60,kOpsy+76,&DreamGenContext::getBackToOps }, - { 0,320,0,200,&DreamGenContext::blank }, + { 0,320,0,200,&DreamBase::blank }, { 0xFFFF,0,0,0,0 } }; @@ -4045,76 +3996,12 @@ void DreamGenContext::discOps() { } while (!data.byte(kGetback)); } -void DreamGenContext::doSaveLoad() { - data.byte(kPointerframe) = 0; - data.word(kTextaddressx) = 70; - data.word(kTextaddressy) = 182-8; - data.byte(kTextlen) = 181; - data.byte(kManisoffscreen) = 1; - clearWork(); - createPanel2(); - underTextLine(); - getRidOfAll(); - loadSaveBox(); - showOpBox(); - showMainOps(); - workToScreenCPP(); - - RectWithCallback opsList[] = { - { kOpsx+59,kOpsx+114,kOpsy+30,kOpsy+76,&DreamGenContext::getBackFromOps }, - { kOpsx+10,kOpsx+77,kOpsy+10,kOpsy+59,&DreamGenContext::DOSReturn }, - { kOpsx+128,kOpsx+190,kOpsy+16,kOpsy+100,&DreamGenContext::discOps }, - { 0,320,0,200,&DreamGenContext::blank }, - { 0xFFFF,0,0,0,0 } - }; - - bool firstOps = true; - - do { // restart ops - if (firstOps) { - firstOps = false; - } else { - showOpBox(); - showMainOps(); - workToScreenM(); - } - data.byte(kGetback) = 0; - - do { // wait ops - if (data.byte(kQuitrequested)) { - data.byte(kManisoffscreen) = 0; - return; - } - - readMouse(); - showPointer(); - vSync(); - dumpPointer(); - dumpTextLine(); - delPointer(); - checkCoords(opsList); - } while (!data.byte(kGetback)); - } while (data.byte(kGetback) == 2); - - data.word(kTextaddressx) = 13; - data.word(kTextaddressy) = 182; - data.byte(kTextlen) = 240; - if (data.byte(kGetback) != 4) { - getRidOfTemp(); - restoreAll(); - redrawMainScrn(); - workToScreenM(); - data.byte(kCommandtype) = 200; - } - data.byte(kManisoffscreen) = 0; -} - void DreamGenContext::hangOnPQ() { data.byte(kGetback) = 0; RectWithCallback quitList[] = { { 273,320,157,198,&DreamGenContext::getBack1 }, - { 0,320,0,200,&DreamGenContext::blank }, + { 0,320,0,200,&DreamBase::blank }, { 0xFFFF,0,0,0,0 } }; @@ -4263,7 +4150,7 @@ void DreamGenContext::cantDrop() { workToScreenM(); } -void DreamGenContext::getBack1() { +void DreamBase::getBack1() { if (data.byte(kPickup) != 0) { blank(); return; @@ -4370,7 +4257,7 @@ void DreamGenContext::autoAppear() { // In alley al = 5; resetLocation(); - DreamBase::setLocation(10); + setLocation(10); data.byte(kDestpos) = 10; return; } @@ -4401,7 +4288,7 @@ void DreamGenContext::autoAppear() { data.byte(kNewsitem) = 3; al = 6; resetLocation(); - DreamBase::setLocation(11); + setLocation(11); data.byte(kDestpos) = 11; } else { if (data.byte(kReallocation) == 2 && data.byte(kRockstardead) != 0) @@ -4410,7 +4297,7 @@ void DreamGenContext::autoAppear() { } } -void DreamGenContext::quitKey() { +void DreamBase::quitKey() { if (data.byte(kCommandtype) != 222) { data.byte(kCommandtype) = 222; commandOnly(4); @@ -4544,38 +4431,6 @@ void DreamGenContext::entryAnims() { } } -void DreamGenContext::selectSlot() { - if (data.byte(kCommandtype) != 244) { - data.byte(kCommandtype) = 244; - commandOnly(45); - } - - if (data.word(kMousebutton) != 1 || data.word(kMousebutton) == data.word(kOldbutton)) - return; // noselslot - if (data.byte(kLoadingorsave) == 3) - data.byte(kLoadingorsave)--; - - oldToNames(); - int y = data.word(kMousey) - (kOpsy + 4); - if (y < 11) - data.byte(kCurrentslot) = 0; - else - data.byte(kCurrentslot) = y / 11; - - delPointer(); - showOpBox(); - showSlots(); - showNames(); - if (data.byte(kLoadingorsave) == 1) - showLoadOps(); - else - showSaveOps(); - readMouse(); - showPointer(); - workToScreen(); - delPointer(); -} - void DreamGenContext::updateSymbolTop() { if (!data.byte(kSymboltopdir)) return; // topfinished |