diff options
author | Matthew Hoops | 2011-12-20 18:56:42 -0500 |
---|---|---|
committer | Matthew Hoops | 2011-12-20 18:56:42 -0500 |
commit | d29bde9abeb00a42977051bcf6067a71d35fefde (patch) | |
tree | c6c18cd0238adf6caaaa974e04fa03f87b4d068f /engines/pegasus/neighborhood/mars | |
parent | 331da45ae3e1192e348ae817456e9f121ee74577 (diff) | |
download | scummvm-rg350-d29bde9abeb00a42977051bcf6067a71d35fefde.tar.gz scummvm-rg350-d29bde9abeb00a42977051bcf6067a71d35fefde.tar.bz2 scummvm-rg350-d29bde9abeb00a42977051bcf6067a71d35fefde.zip |
PEGASUS: Remove another global construction
Diffstat (limited to 'engines/pegasus/neighborhood/mars')
-rwxr-xr-x | engines/pegasus/neighborhood/mars/reactor.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/engines/pegasus/neighborhood/mars/reactor.cpp b/engines/pegasus/neighborhood/mars/reactor.cpp index b044fc9f4b..478a01c155 100755 --- a/engines/pegasus/neighborhood/mars/reactor.cpp +++ b/engines/pegasus/neighborhood/mars/reactor.cpp @@ -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]); |