diff options
author | Max Horn | 2011-12-18 23:35:03 +0100 |
---|---|---|
committer | Filippos Karapetis | 2011-12-23 03:30:59 +0200 |
commit | 2bdcbadbfe6badc8ab7c75bd27b988be7916828d (patch) | |
tree | bd9eb077d874d7f0a9ff3ac52dc80ef6e902a575 /engines | |
parent | c7dbbc860677efd01bd2aaaa5944b21c0849dda4 (diff) | |
download | scummvm-rg350-2bdcbadbfe6badc8ab7c75bd27b988be7916828d.tar.gz scummvm-rg350-2bdcbadbfe6badc8ab7c75bd27b988be7916828d.tar.bz2 scummvm-rg350-2bdcbadbfe6badc8ab7c75bd27b988be7916828d.zip |
DREAMWEB: Yet more things to DreamBase
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreambase.h | 11 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 26 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 16 | ||||
-rw-r--r-- | engines/dreamweb/vgagrafx.cpp | 4 |
4 files changed, 20 insertions, 37 deletions
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index 6de854f452..0cdcefe233 100644 --- a/engines/dreamweb/dreambase.h +++ b/engines/dreamweb/dreambase.h @@ -440,6 +440,12 @@ public: void makeMainScreen(); void showWatchReel(); void watchReel(); + void commandWithOb(uint8 command, uint8 type, uint8 index); + void examineObText(); + void blockNameText(); + void personNameText(); + void walkToText(); + void entryTexts(); // from use.cpp void placeFreeObject(uint8 index); @@ -487,9 +493,8 @@ public: void panelToMap(); void mapToPanel(); void dumpMap(); - void transferInv(); - + void zoom(); void multiGet(uint8 *dst, uint16 x, uint16 y, uint8 width, uint8 height); void multiPut(const uint8 *src, uint16 x, uint16 y, uint8 width, uint8 height); void multiDump(uint16 x, uint16 y, uint8 width, uint8 height); @@ -506,11 +511,11 @@ public: void showPCX(const Common::String &name); void showFrame(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height); void showFrame(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag); + bool pixelCheckSet(const ObjPos *pos, uint8 x, uint8 y); void loadPalFromIFF(); void createPanel(); void createPanel2(); void showPanel(); - void entryTexts(); }; diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index c755b93dec..1a0c07cea5 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1266,7 +1266,7 @@ void DreamGenContext::commandWithOb() { commandWithOb(al, bh, bl); } -void DreamGenContext::commandWithOb(uint8 command, uint8 type, uint8 index) { +void DreamBase::commandWithOb(uint8 command, uint8 type, uint8 index) { uint8 commandLine[64] = "OBJECT NAME ONE "; delTextLine(); uint16 commandText = kTextstart + getSegment(data.word(kCommandtext)).word(command * 2); @@ -1283,19 +1283,19 @@ void DreamGenContext::commandWithOb(uint8 command, uint8 type, uint8 index) { data.byte(kNewtextline) = 1; } -void DreamGenContext::examineObText() { +void DreamBase::examineObText() { commandWithOb(1, data.byte(kCommandtype), data.byte(kCommand)); } -void DreamGenContext::blockNameText() { +void DreamBase::blockNameText() { commandWithOb(0, data.byte(kCommandtype), data.byte(kCommand)); } -void DreamGenContext::personNameText() { +void DreamBase::personNameText() { commandWithOb(2, data.byte(kCommandtype), data.byte(kCommand) & 127); } -void DreamGenContext::walkToText() { +void DreamBase::walkToText() { commandWithOb(3, data.byte(kCommandtype), data.byte(kCommand)); } @@ -1446,10 +1446,6 @@ void DreamGenContext::walkAndExamine() { examineOb(); } -void DreamGenContext::obName() { - obName(al, ah); -} - void DreamGenContext::obName(uint8 command, uint8 commandType) { if (data.byte(kReasseschanges) == 0) { if ((commandType == data.byte(kCommandtype)) && (command == data.byte(kCommand))) { @@ -1796,19 +1792,15 @@ void DreamBase::showIcon() { } } -void DreamGenContext::checkIfSet() { - flags._z = !checkIfSet(al, ah); -} - bool DreamGenContext::checkIfSet(uint8 x, uint8 y) { const ObjPos *setList = (const ObjPos *)getSegment(data.word(kBuffers)).ptr(kSetlist, sizeof(ObjPos) * 128); for (size_t i = 0; i < 128; ++i) { const ObjPos *pos = setList + 127 - i; if (pos->index == 0xff || !pos->contains(x,y)) continue; - if (! pixelCheckSet(pos, x, y)) + if (!pixelCheckSet(pos, x, y)) continue; - if (! isItDescribed(pos)) + if (!isItDescribed(pos)) continue; obName(pos->index, 1); return true; @@ -1843,10 +1835,6 @@ void DreamBase::hangOnW(uint16 frameCount) { } } -void DreamGenContext::hangOnP() { - hangOnP(cx); -} - void DreamBase::hangOnP(uint16 count) { data.word(kMaintimer) = 0; uint8 pointerFrame = data.byte(kPointerframe); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index f50f4d883d..987f04f65a 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -61,7 +61,6 @@ DreamBase::showFrame(frameData, x, y, frameNumber, effectsFlag); } void width160(); - void zoom(); void commandOnly(); void commandOnly(uint8 command) { DreamBase::commandOnly(command); @@ -73,10 +72,9 @@ void checkIfEx(); bool checkIfEx(uint8 x, uint8 y); void commandWithOb(); - void commandWithOb(uint8 command, uint8 type, uint8 index); - void blockNameText(); - void walkToText(); - void personNameText(); + void commandWithOb(uint8 command, uint8 type, uint8 index) { + DreamBase::commandWithOb(command, type, index); + } DynObject *getFreeAd(uint8 index) { return DreamBase::getFreeAd(index); } @@ -98,7 +96,6 @@ DreamBase::checkOne(x, y, flag, flagEx, type, flagX, flagY); } void walkAndExamine(); - void obName(); void obName(uint8 command, uint8 commandType); void checkCoords(const RectWithCallback *rectWithCallbacks); void getExPos(); @@ -106,8 +103,6 @@ bool compare(uint8 index, uint8 flag, const char id[4]) { return DreamBase::compare(index, flag, id); } - bool pixelCheckSet(const ObjPos *pos, uint8 x, uint8 y); - void checkIfSet(); bool checkIfSet(uint8 x, uint8 y); void isItWorn(); bool isItWorn(const DynObject *object) { @@ -125,17 +120,12 @@ void hangOn(uint16 frameCount) { DreamBase::hangOn(frameCount); } - void hangOnP(); - void hangOnP(uint16 count) { - DreamBase::hangOnP(count); - } uint8 findNextColon(const uint8 **string) { return DreamBase::findNextColon(string); } void findNextColon(); const uint8 *getObTextStartCPP(); void useText(const uint8 *string); - void examineObText(); void showCity(); uint16 getPersFrame(uint8 index); void convIcons(); diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp index cea9dbef8c..b1a23a6c96 100644 --- a/engines/dreamweb/vgagrafx.cpp +++ b/engines/dreamweb/vgagrafx.cpp @@ -371,7 +371,7 @@ void DreamBase::clearWork() { memset(workspace(), 0, 320*200); } -void DreamGenContext::zoom() { +void DreamBase::zoom() { if (data.word(kWatchingtime) != 0) return; if (data.byte(kZoomon) != 1) @@ -432,7 +432,7 @@ void DreamBase::transferInv() { data.word(kExframepos) += byteCount; } -bool DreamGenContext::pixelCheckSet(const ObjPos *pos, uint8 x, uint8 y) { +bool DreamBase::pixelCheckSet(const ObjPos *pos, uint8 x, uint8 y) { x -= pos->xMin; y -= pos->yMin; SetObject *setObject = getSetAd(pos->index); |