PEGASUS: Remove another global construction

This commit is contained in:
Matthew Hoops committed 2011-12-20 18:56:42 -05:00
1 parent 331da45ae3
commit d29bde9abe
1 file changed
+9 -10
+9 -10
View File
@@ -135,15 +135,6 @@ static const CoordType kReactorHistoryHeight = 168;
static const CoordType kColorWidths[5] = { 24, 25, 25, 26, 27 };
static const CoordType kColorHeights[5] = { 14, 15, 17, 17, 19};
// TODO: Remove global construction
static const CoordType kColorTops[5] = {
0,
kColorHeights[0],
kColorHeights[0] + kColorHeights[1],
kColorHeights[0] + kColorHeights[1] + kColorHeights[2],
kColorHeights[0] + kColorHeights[1] + kColorHeights[2] + kColorHeights[3],
};
static const CoordType kHistoryLefts[5][3] = {
{ 302 + kNavAreaLeft, 329 + kNavAreaLeft, 357 + kNavAreaLeft },
{ 302 + kNavAreaLeft, 331 + kNavAreaLeft, 360 + kNavAreaLeft },
@@ -249,7 +240,15 @@ bool ReactorHistory::isSolved() {
return false;
}
void ReactorHistory::draw(const Common::Rect &) {
void ReactorHistory::draw(const Common::Rect &) {
static const CoordType kColorTops[5] = {
0,
kColorHeights[0],
kColorHeights[0] + kColorHeights[1],
kColorHeights[0] + kColorHeights[1] + kColorHeights[2],
kColorHeights[0] + kColorHeights[1] + kColorHeights[2] + kColorHeights[3],
};
if (_colors.isSurfaceValid() && _digits.isSurfaceValid()) {
for (int i = 0; i < _numGuesses; ++i) {
Common::Rect r1(0, 0, kColorWidths[i], kColorHeights[i]);