diff options
author | Willem Jan Palenstijn | 2011-12-23 20:45:51 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-12-23 20:45:51 +0100 |
commit | 625a5ef2ed8f947e43e8e8d12bd72ffe9d1776c6 (patch) | |
tree | e99f879f736e9157c0b557c561c2a46de8091dca | |
parent | b6a6778843051d9150ac64c640ba19f3df08fce0 (diff) | |
download | scummvm-rg350-625a5ef2ed8f947e43e8e8d12bd72ffe9d1776c6.tar.gz scummvm-rg350-625a5ef2ed8f947e43e8e8d12bd72ffe9d1776c6.tar.bz2 scummvm-rg350-625a5ef2ed8f947e43e8e8d12bd72ffe9d1776c6.zip |
DREAMWEB: Minor cleanup
-rw-r--r-- | engines/dreamweb/backdrop.cpp | 10 | ||||
-rw-r--r-- | engines/dreamweb/dreambase.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/engines/dreamweb/backdrop.cpp b/engines/dreamweb/backdrop.cpp index 9d13eef210..cb72454a41 100644 --- a/engines/dreamweb/backdrop.cpp +++ b/engines/dreamweb/backdrop.cpp @@ -100,8 +100,8 @@ uint8 DreamBase::getMapAd(const uint8 *setData, uint16 *x, uint16 *y) { return 1; } -void DreamBase::calcFrFrame(uint16 frameSeg, uint16 frameNum, uint8 *width, uint8 *height, uint16 x, uint16 y, ObjPos *objPos) { - const Frame *frame = (const Frame *)getSegment(frameSeg).ptr(frameNum * sizeof(Frame), sizeof(Frame)); +void DreamBase::calcFrFrame(const Frame *frameBase, uint16 frameNum, uint8 *width, uint8 *height, uint16 x, uint16 y, ObjPos *objPos) { + const Frame *frame = frameBase + frameNum; *width = frame->width; *height = frame->height; @@ -148,7 +148,7 @@ void DreamBase::showAllObs() { if (currentFrame == 0xff) continue; uint8 width, height; - calcFrFrame(data.word(kSetframes), currentFrame, &width, &height, x, y, objPos); + calcFrFrame(frameBase, currentFrame, &width, &height, x, y, objPos); setEntry->index = setEntry->frames[0]; if ((setEntry->type == 0) && (setEntry->priority != 5) && (setEntry->priority != 6)) { x += data.word(kMapadx); @@ -229,7 +229,7 @@ void DreamBase::showAllFree() { if (mapAd != 0) { uint8 width, height; uint16 currentFrame = 3 * i; - calcFrFrame(data.word(kFreeframes), currentFrame, &width, &height, x, y, objPos); + calcFrFrame(frameBase, currentFrame, &width, &height, x, y, objPos); if ((width != 0) || (height != 0)) { x += data.word(kMapadx); y += data.word(kMapady); @@ -277,7 +277,7 @@ void DreamBase::showAllEx() { continue; uint8 width, height; uint16 currentFrame = 3 * i; - calcFrFrame(data.word(kExtras), currentFrame, &width, &height, x, y, objPos); + calcFrFrame(frameBase, currentFrame, &width, &height, x, y, objPos); if ((width != 0) || (height != 0)) { assert(currentFrame < 256); showFrame(frameBase, x + data.word(kMapadx), y + data.word(kMapady), currentFrame, 0); diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index b49787e3b2..3c2283636e 100644 --- a/engines/dreamweb/dreambase.h +++ b/engines/dreamweb/dreambase.h @@ -78,7 +78,7 @@ public: uint8 getXAd(const uint8 *setData, uint8 *result); uint8 getYAd(const uint8 *setData, uint8 *result); uint8 getMapAd(const uint8 *setData, uint16 *x, uint16 *y); - void calcFrFrame(uint16 frameSeg, uint16 frameNum, uint8* width, uint8* height, uint16 x, uint16 y, ObjPos *objPos); + void calcFrFrame(const Frame *frameBase, uint16 frameNum, uint8* width, uint8* height, uint16 x, uint16 y, ObjPos *objPos); void makeBackOb(SetObject *objData, uint16 x, uint16 y); void showAllObs(); bool addAlong(const uint8 *mapFlags); |