aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-26 19:01:09 +0200
committerFilippos Karapetis2011-12-26 19:01:38 +0200
commit82b6f6c97b6c0ce3811fed0a51c20ddad77b09a4 (patch)
tree70a44e665da368a33f8188d3ef2ce9cb53b11bac
parent6ca8d9ffe33cea03c4f8371cc3f1aef349f6f380 (diff)
downloadscummvm-rg350-82b6f6c97b6c0ce3811fed0a51c20ddad77b09a4.tar.gz
scummvm-rg350-82b6f6c97b6c0ce3811fed0a51c20ddad77b09a4.tar.bz2
scummvm-rg350-82b6f6c97b6c0ce3811fed0a51c20ddad77b09a4.zip
DREAMWEB: Cleanup searchForFiles()
-rw-r--r--engines/dreamweb/monitor.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index e586999129..a877f17b8a 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -534,20 +534,16 @@ void DreamGenContext::signOn() {
}
void DreamGenContext::searchForFiles(uint16 segment) {
- uint16 offset = kTextstart;
+ const char *filesString = (const char *)getSegment(segment).ptr(kTextstart, 0);
byte curChar;
while (true) {
- curChar = getSegment(segment).byte(offset);
- offset++;
+ curChar = filesString[0];
+ filesString++;
if (curChar == '*')
return; // "endofdir"
- if (curChar == 34) {
- uint16 originalOffset = offset;
- const char *string = (const char *)getSegment(segment).ptr(offset, 0);
- const char *nextString = monPrint(string);
- offset = originalOffset + (nextString - string);
- }
+ if (curChar == 34)
+ filesString = monPrint(filesString);
}
}