diff options
author | Willem Jan Palenstijn | 2011-12-14 12:17:32 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-12-14 12:17:32 +0100 |
commit | 5af0deba87afaac279db04da52241b6ad1c6d723 (patch) | |
tree | cdb965b468e30b11185d1e8baceb057101b8801b /engines | |
parent | 8d804a855307ba8d16854ab12a1d5a1a576a6475 (diff) | |
download | scummvm-rg350-5af0deba87afaac279db04da52241b6ad1c6d723.tar.gz scummvm-rg350-5af0deba87afaac279db04da52241b6ad1c6d723.tar.bz2 scummvm-rg350-5af0deba87afaac279db04da52241b6ad1c6d723.zip |
DREAMWEB: Cleanup
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreambase.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 14 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 6 | ||||
-rw-r--r-- | engines/dreamweb/use.cpp | 6 |
4 files changed, 15 insertions, 12 deletions
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index c7e9546069..2048f39e3b 100644 --- a/engines/dreamweb/dreambase.h +++ b/engines/dreamweb/dreambase.h @@ -151,6 +151,7 @@ public: SetObject *getSetAd(uint8 index); void *getAnyAd(uint8 *value1, uint8 *value2); const uint8 *getTextInFile1(uint16 index); + uint8 findNextColon(const uint8 **string); // from use.cpp void placeFreeObject(uint8 index); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 127724f7db..d931789746 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1917,13 +1917,13 @@ void DreamGenContext::hangOnP(uint16 count) { } void DreamGenContext::findNextColon() { - uint8 *initialString = es.ptr(si, 0); - uint8 *string = initialString; + const uint8 *initialString = es.ptr(si, 0); + const uint8 *string = initialString; al = findNextColon(&string); si += (string - initialString); } -uint8 DreamGenContext::findNextColon(uint8 **string) { +uint8 DreamBase::findNextColon(const uint8 **string) { uint8 c; do { c = **string; @@ -1932,11 +1932,11 @@ uint8 DreamGenContext::findNextColon(uint8 **string) { return c; } -uint8 *DreamGenContext::getObTextStartCPP() { +const uint8 *DreamGenContext::getObTextStartCPP() { push(es); push(si); getObTextStart(); - uint8 *result = es.ptr(si, 0); + const uint8 *result = es.ptr(si, 0); si = pop(); es = pop(); return result; @@ -2246,7 +2246,7 @@ void DreamGenContext::doLook() { dumpTextLine(); uint8 index = data.byte(kRoomnum) & 31; uint16 offset = getSegment(data.word(kRoomdesc)).word(kIntextdat + index * 2); - uint8 *string = getSegment(data.word(kRoomdesc)).ptr(kIntext, 0) + offset; + const uint8 *string = getSegment(data.word(kRoomdesc)).ptr(kIntext, 0) + offset; findNextColon(&string); uint16 x; if (data.byte(kReallocation) < 50) @@ -4655,7 +4655,7 @@ void DreamGenContext::lookAtCard() { loadKeypad(); createPanel2(); showFrame(tempGraphics(), 160, 80, 42, 128); - uint8 *obText = getObTextStartCPP(); + const uint8 *obText = getObTextStartCPP(); findNextColon(&obText); findNextColon(&obText); findNextColon(&obText); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index e60a5698eb..06033b50d0 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -227,9 +227,11 @@ void hangOnP(); void hangOnP(uint16 count); void showIcon(); - uint8 findNextColon(uint8 **string); + uint8 findNextColon(const uint8 **string) { + return DreamBase::findNextColon(string); + } void findNextColon(); - uint8 *getObTextStartCPP(); + const uint8 *getObTextStartCPP(); void useText(const uint8 *string); void useText(); void getBlockOfPixel(); diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp index c591eca826..a144f850b6 100644 --- a/engines/dreamweb/use.cpp +++ b/engines/dreamweb/use.cpp @@ -139,7 +139,7 @@ void DreamGenContext::useRoutine() { } delPointer(); - uint8 *obText = getObTextStartCPP(); + const uint8 *obText = getObTextStartCPP(); if (findNextColon(&obText) != 0) { if (findNextColon(&obText) != 0) { if (*obText != 0) { @@ -178,7 +178,7 @@ void DreamGenContext::useText(const uint8 *string) { } void DreamGenContext::showFirstUse() { - uint8 *obText = getObTextStartCPP(); + const uint8 *obText = getObTextStartCPP(); findNextColon(&obText); findNextColon(&obText); useText(obText); @@ -186,7 +186,7 @@ void DreamGenContext::showFirstUse() { } void DreamGenContext::showSecondUse() { - uint8 *obText = getObTextStartCPP(); + const uint8 *obText = getObTextStartCPP(); findNextColon(&obText); findNextColon(&obText); findNextColon(&obText); |