[Scummvm-cvs-logs] scummvm master -> 8e36de736e88f1b7a70ad04fc3d09b7807ff94f9
wjp
wjp at usecode.org
Sat Dec 24 14:41:38 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:
8e36de736e DREAMWEB: Minor cleanup
Commit: 8e36de736e88f1b7a70ad04fc3d09b7807ff94f9
https://github.com/scummvm/scummvm/commit/8e36de736e88f1b7a70ad04fc3d09b7807ff94f9
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-12-24T05:41:12-08:00
Commit Message:
DREAMWEB: Minor cleanup
Changed paths:
engines/dreamweb/dreambase.h
engines/dreamweb/object.cpp
engines/dreamweb/sprite.cpp
engines/dreamweb/stubs.cpp
engines/dreamweb/stubs.h
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index 750cffd..0123943 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -537,6 +537,7 @@ public:
void dropError();
void cantDrop();
void entryAnims();
+ bool finishedWalking();
// from use.cpp
void placeFreeObject(uint8 index);
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index 1245187..ac5f313 100644
--- a/engines/dreamweb/object.cpp
+++ b/engines/dreamweb/object.cpp
@@ -231,8 +231,7 @@ void DreamGenContext::inventory() {
if (data.byte(kCommandtype) != 239) {
data.byte(kCommandtype) = 239;
- al = 32;
- commandOnly();
+ commandOnly(32);
}
if (data.word(kMousebutton) == data.word(kOldbutton))
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index e2e27bc..c9ea699 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -536,17 +536,6 @@ void DreamBase::moveMap(uint8 param) {
data.byte(kNowinnewroom) = 1;
}
-void DreamGenContext::checkOne() {
- uint8 flag, flagEx, type, flagX, flagY;
- checkOne(cl, ch, &flag, &flagEx, &type, &flagX, &flagY);
-
- cl = flag;
- ch = flagEx;
- dl = flagX;
- dh = flagY;
- al = type;
-}
-
void DreamBase::checkOne(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY) {
*flagX = x / 16;
*flagY = y / 16;
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 0f5b654..2120668 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1138,10 +1138,6 @@ void DreamBase::delTextLine() {
multiPut(_textUnder, data.byte(kTextaddressx), data.word(kTextaddressy), kUnderTextSizeX, kUnderTextSizeY);
}
-void DreamGenContext::commandOnly() {
- commandOnly(al);
-}
-
void DreamBase::commandOnly(uint8 command) {
delTextLine();
uint16 index = command * 2;
@@ -1152,10 +1148,6 @@ void DreamBase::commandOnly(uint8 command) {
data.byte(kNewtextline) = 1;
}
-void DreamGenContext::checkIfPerson() {
- flags._z = !checkIfPerson(al, ah);
-}
-
bool DreamGenContext::checkIfPerson(uint8 x, uint8 y) {
Common::List<People>::iterator i;
for (i = _peopleList.begin(); i != _peopleList.end(); ++i) {
@@ -1183,10 +1175,6 @@ bool DreamGenContext::checkIfPerson(uint8 x, uint8 y) {
return false;
}
-void DreamGenContext::checkIfFree() {
- flags._z = !checkIfFree(al, ah);
-}
-
bool DreamGenContext::checkIfFree(uint8 x, uint8 y) {
Common::List<ObjPos>::const_iterator i;
for (i = _freeList.reverse_begin(); i != _freeList.end(); --i) {
@@ -1200,10 +1188,6 @@ bool DreamGenContext::checkIfFree(uint8 x, uint8 y) {
return false;
}
-void DreamGenContext::checkIfEx() {
- flags._z = !checkIfEx(al, ah);
-}
-
bool DreamGenContext::checkIfEx(uint8 x, uint8 y) {
Common::List<ObjPos>::const_iterator i;
for (i = _exList.reverse_begin(); i != _exList.end(); --i) {
@@ -1411,11 +1395,7 @@ void DreamBase::removeSetObject(uint8 index) {
getSetAd(index)->mapad[0] = 0xff;
}
-void DreamGenContext::finishedWalking() {
- flags._z = finishedWalkingCPP();
-}
-
-bool DreamGenContext::finishedWalkingCPP() {
+bool DreamBase::finishedWalking() {
return (data.byte(kLinepointer) == 254) && (data.byte(kFacing) == data.byte(kTurntoface));
}
@@ -1426,7 +1406,7 @@ void DreamBase::getFlagUnderP(uint8 *flag, uint8 *flagEx) {
}
void DreamGenContext::walkAndExamine() {
- if (!finishedWalkingCPP())
+ if (!finishedWalking())
return;
data.byte(kCommandtype) = data.byte(kWalkexamtype);
data.byte(kCommand) = data.byte(kWalkexamnum);
@@ -1449,7 +1429,7 @@ void DreamGenContext::obName(uint8 command, uint8 commandType) {
setWalk();
data.byte(kReasseschanges) = 1;
return;
- } else if (! finishedWalkingCPP())
+ } else if (!finishedWalking())
return;
else if (data.byte(kCommandtype) == 5) {
if (data.word(kWatchingtime) == 0)
@@ -1690,11 +1670,6 @@ bool DreamBase::objectMatches(void *object, const char *id) {
return true;
}
-void DreamGenContext::compare() {
- char id[4] = { cl, ch, dl, dh };
- flags._z = compare(al, ah, id);
-}
-
bool DreamBase::compare(uint8 index, uint8 flag, const char id[4]) {
return objectMatches(getAnyAdDir(index, flag), id);
}
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index b24185b..c0c8aed 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -58,15 +58,8 @@
DreamBase::showFrame(frameData, x, y, frameNumber, effectsFlag);
}
void width160();
- void commandOnly();
- void commandOnly(uint8 command) {
- DreamBase::commandOnly(command);
- }
- void checkIfPerson();
bool checkIfPerson(uint8 x, uint8 y);
- void checkIfFree();
bool checkIfFree(uint8 x, uint8 y);
- void checkIfEx();
bool checkIfEx(uint8 x, uint8 y);
void commandWithOb();
void commandWithOb(uint8 command, uint8 type, uint8 index) {
@@ -84,20 +77,10 @@
SetObject *getSetAd(uint8 index) {
return DreamBase::getSetAd(index);
}
- bool finishedWalkingCPP();
- void finishedWalking();
- void checkOne();
- void checkOne(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY) {
- DreamBase::checkOne(x, y, flag, flagEx, type, flagX, flagY);
- }
void walkAndExamine();
void obName(uint8 command, uint8 commandType);
void getExPos();
- void compare();
- bool compare(uint8 index, uint8 flag, const char id[4]) {
- return DreamBase::compare(index, flag, id);
- }
bool checkIfSet(uint8 x, uint8 y);
void isItWorn();
bool isItWorn(const DynObject *object) {
More information about the Scummvm-git-logs
mailing list