[Scummvm-cvs-logs] scummvm master -> 509755a010967cc685001762b11996cc73891015
bluegr
md5 at scummvm.org
Wed Dec 14 23:31:58 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
509755a010 DREAMWEB: Further simplification of findSetObject() and findExObject() (thanks wjp)
Commit: 509755a010967cc685001762b11996cc73891015
https://github.com/scummvm/scummvm/commit/509755a010967cc685001762b11996cc73891015
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-14T14:30:31-08:00
Commit Message:
DREAMWEB: Further simplification of findSetObject() and findExObject() (thanks wjp)
Changed paths:
engines/dreamweb/stubs.cpp
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index a3acfe8..01169a8 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1785,14 +1785,12 @@ void DreamGenContext::findSetObject() {
}
uint16 DreamGenContext::findSetObject(const char *id) {
- uint16 index = 0;
-
- do {
+ for (uint16 index = 0; index < 128; index++) {
if (objectMatches(getSetAd(index), id))
return index;
- } while (index++ < 128);
+ }
- return index; // 128, not found
+ return 128;
}
void DreamGenContext::findExObject() {
@@ -1807,14 +1805,12 @@ void DreamGenContext::findExObject() {
}
uint16 DreamGenContext::findExObject(const char *id) {
- uint16 index = 0;
-
- do {
+ for (uint16 index = 0; index < kNumexobjects; index++) {
if (objectMatches(getExAd(index), id))
return index;
- } while (index++ < 114);
+ }
- return index; // 114, not found
+ return kNumexobjects;
}
bool DreamGenContext::isItDescribed(const ObjPos *pos) {
More information about the Scummvm-git-logs
mailing list