aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-11-28 16:18:43 +0000
committerMax Horn2003-11-28 16:18:43 +0000
commit8a6b0e2e1837711d06e0ed66913f340d8d923bb3 (patch)
tree6a644ddcd5b6f771c9483c1cc721dc2e152726b7
parentd7e0e4b01a490c73b66fe10272b142d84c859238 (diff)
downloadscummvm-rg350-8a6b0e2e1837711d06e0ed66913f340d8d923bb3.tar.gz
scummvm-rg350-8a6b0e2e1837711d06e0ed66913f340d8d923bb3.tar.bz2
scummvm-rg350-8a6b0e2e1837711d06e0ed66913f340d8d923bb3.zip
cleanup
svn-id: r11414
-rw-r--r--scumm/boxes.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/scumm/boxes.cpp b/scumm/boxes.cpp
index 99022f2cb0..c68e44ccc6 100644
--- a/scumm/boxes.cpp
+++ b/scumm/boxes.cpp
@@ -239,7 +239,6 @@ void ScummEngine::convertScaleTableToScaleSlot(int slot) {
assert(1 <= slot && slot <= ARRAYSIZE(_scaleSlots));
byte *resptr = getResourceAddress(rtScaleTable, slot);
- ScaleSlot &s = _scaleSlots[slot-1];
int lowerIdx, upperIdx;
float m, oldM;
@@ -251,9 +250,7 @@ void ScummEngine::convertScaleTableToScaleSlot(int slot) {
// The scale is constant This usually means we encountered one of the
// "broken" cases. We set pseudo scale item values which lead to a
// constant scale of 255.
- s.y1 = 0;
- s.y2 = 199;
- s.scale1 = s.scale2 = 255;
+ setScaleSlot(slot, 0, 0, 255, 0, 199, 255);
return;
}
@@ -310,13 +307,10 @@ void ScummEngine::convertScaleTableToScaleSlot(int slot) {
}
// The values of y1 and y2, as well as the scale, can now easily be computed
- s.y1 = lowerIdx;
- s.y2 = upperIdx;
- s.scale1 = resptr[lowerIdx];
- s.scale2 = resptr[upperIdx];
-
+ setScaleSlot(slot, 0, lowerIdx, resptr[lowerIdx], 0, upperIdx, resptr[upperIdx]);
// Compute the variance, for debugging. It shouldn't exceed 1
+ ScaleSlot &s = _scaleSlots[slot-1];
int y;
int sum = 0;
int scale;
@@ -332,7 +326,7 @@ void ScummEngine::convertScaleTableToScaleSlot(int slot) {
}
variance = sum / (200.0 - 1.0);
if (variance > 1)
- warning("scale item %d, variance %f exceeds 1 (room %d)\n", slot, variance, _currentRoom);
+ debug(1, "scale item %d, variance %f exceeds 1 (room %d)", slot, variance, _currentRoom);
}
void ScummEngine::setScaleSlot(int slot, int x1, int y1, int scale1, int x2, int y2, int scale2) {