From 8a6b0e2e1837711d06e0ed66913f340d8d923bb3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 28 Nov 2003 16:18:43 +0000 Subject: cleanup svn-id: r11414 --- scumm/boxes.cpp | 14 ++++---------- 1 file 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) { -- cgit v1.2.3