AVALANCHE: Rework use of Common::Rect.
Now the right and bottom coordinates of the rectangles aren't included in them.
This commit is contained in:
parent
91146e51f5
commit
e15dafb9e4
6 changed files with 25 additions and 27 deletions
|
@ -152,13 +152,13 @@ void Nim::setup() {
|
|||
_vm->fadeIn();
|
||||
_vm->_graphics->nimLoad();
|
||||
|
||||
_vm->_graphics->drawFilledRectangle(Common::Rect(0, 0, 639, 199), kColorBlack);
|
||||
_vm->_graphics->blackOutScreen();
|
||||
// Upper left rectangle.
|
||||
_vm->_graphics->drawRectangle(Common::Rect(10, 5, 380, 70), kColorRed);
|
||||
_vm->_graphics->drawFilledRectangle(Common::Rect(11, 6, 379, 69), kColorBrown);
|
||||
_vm->_graphics->drawRectangle(Common::Rect(10, 5, 381, 71), kColorRed);
|
||||
_vm->_graphics->drawFilledRectangle(Common::Rect(11, 6, 380, 70), kColorBrown);
|
||||
// Bottom right rectangle.
|
||||
_vm->_graphics->drawRectangle(Common::Rect(394, 50, 634, 197), kColorRed);
|
||||
_vm->_graphics->drawFilledRectangle(Common::Rect(395, 51, 633, 196), kColorBrown);
|
||||
_vm->_graphics->drawRectangle(Common::Rect(394, 50, 635, 198), kColorRed);
|
||||
_vm->_graphics->drawFilledRectangle(Common::Rect(395, 51, 634, 197), kColorBrown);
|
||||
|
||||
_vm->_graphics->nimDrawLogo();
|
||||
_vm->_graphics->nimDrawInitials();
|
||||
|
@ -383,8 +383,8 @@ void Nim::takeSome() {
|
|||
|
||||
int x1 = 63 + (_stones[_row] - _number) * 64;
|
||||
int y1 = 38 + 35 * (_row + 1);
|
||||
int x2 = 54 + _stones[_row] * 64;
|
||||
int y2 = 63 + 35 * (_row + 1);
|
||||
int x2 = 55 + _stones[_row] * 64;
|
||||
int y2 = 64 + 35 * (_row + 1);
|
||||
_vm->_graphics->drawRectangle(Common::Rect(x1, y1, x2, y2), kColorBlue); // Draw the selection rectangle.
|
||||
_vm->_graphics->refreshScreen();
|
||||
|
||||
|
@ -396,8 +396,8 @@ void Nim::takeSome() {
|
|||
_vm->_graphics->drawRectangle(Common::Rect(x1, y1, x2, y2), kColorBlack); // Erase the previous selection.
|
||||
x1 = 63 + (_stones[_row] - _number) * 64;
|
||||
y1 = 38 + 35 * (_row + 1);
|
||||
x2 = 54 + _stones[_row] * 64;
|
||||
y2 = 63 + 35 * (_row + 1);
|
||||
x2 = 55 + _stones[_row] * 64;
|
||||
y2 = 64 + 35 * (_row + 1);
|
||||
_vm->_graphics->drawRectangle(Common::Rect(x1, y1, x2, y2), kColorBlue); // Draw the new one.
|
||||
_vm->_graphics->refreshScreen();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue