diff options
author | Strangerke | 2012-12-17 00:16:49 +0100 |
---|---|---|
committer | Strangerke | 2012-12-17 00:16:49 +0100 |
commit | e99d5b320a3e2737d0bb6aa9d4c401b2c3116beb (patch) | |
tree | e644f57bd67783d6700010ef78bc916c509f9d80 /engines/hopkins/graphics.cpp | |
parent | 385d097167a6aaa0a2c1edc0e23c4b55cbd41230 (diff) | |
download | scummvm-rg350-e99d5b320a3e2737d0bb6aa9d4c401b2c3116beb.tar.gz scummvm-rg350-e99d5b320a3e2737d0bb6aa9d4c401b2c3116beb.tar.bz2 scummvm-rg350-e99d5b320a3e2737d0bb6aa9d4c401b2c3116beb.zip |
HOPKINS: Renaming of members of Globals and ObjectsManager
Diffstat (limited to 'engines/hopkins/graphics.cpp')
-rw-r--r-- | engines/hopkins/graphics.cpp | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 27a39059cb..cb11b4ddb1 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -1230,7 +1230,7 @@ void GraphicsManager::VISU_ALL() { void GraphicsManager::RESET_SEGMENT_VESA() { if (_vm->_globals.NBBLOC > 0) { for (int idx = 0; idx != _vm->_globals.NBBLOC; idx++) - _vm->_globals.BLOC[idx].field0 = 0; + _vm->_globals.BLOC[idx]._activeFl = false; _vm->_globals.NBBLOC = 0; } @@ -1260,9 +1260,8 @@ void GraphicsManager::Ajoute_Segment_Vesa(int x1, int y1, int x2, int y2) { do { BlocItem &bloc = _vm->_globals.BLOC[blocIndex]; - if (bloc.field0 == 1 - && tempX >= bloc.x1 && x2 <= bloc.x2 - && y1 >= bloc.y1 && y2 <= bloc.y2) + if (bloc._activeFl && tempX >= bloc._x1 && x2 <= bloc._x2 + && y1 >= bloc._y1 && y2 <= bloc._y2) addFlag = false; ++blocIndex; blocCount = blocIndex; @@ -1273,11 +1272,11 @@ void GraphicsManager::Ajoute_Segment_Vesa(int x1, int y1, int x2, int y2) { assert(_vm->_globals.NBBLOC < 250); BlocItem &bloc = _vm->_globals.BLOC[++_vm->_globals.NBBLOC]; - bloc.field0 = 1; - bloc.x1 = tempX; - bloc.x2 = x2; - bloc.y1 = y1; - bloc.y2 = y2; + bloc._activeFl = true; + bloc._x1 = tempX; + bloc._x2 = x2; + bloc._y1 = y1; + bloc._y2 = y2; } } @@ -1292,34 +1291,34 @@ void GraphicsManager::Affiche_Segment_Vesa() { for (int idx = 1; idx <= _vm->_globals.NBBLOC; ++idx) { BlocItem &bloc = _vm->_globals.BLOC[idx]; Common::Rect &dstRect = dstrect[idx - 1]; - if (bloc.field0 != 1) + if (!bloc._activeFl) continue; if (_vm->_eventsManager._breakoutFl) { - Copy_Vga16(VESA_BUFFER, bloc.x1, bloc.y1, bloc.x2 - bloc.x1, bloc.y2 - bloc.y1, bloc.x1, bloc.y1); - dstRect.left = bloc.x1 * 2; - dstRect.top = bloc.y1 * 2 + 30; - dstRect.setWidth((bloc.x2 - bloc.x1) * 2); - dstRect.setHeight((bloc.y2 - bloc.y1) * 2); - } else if (bloc.x2 > _vm->_eventsManager._startPos.x && bloc.x1 < (_vm->_eventsManager._startPos.x + SCREEN_WIDTH)) { - if (bloc.x1 < _vm->_eventsManager._startPos.x) - bloc.x1 = _vm->_eventsManager._startPos.x; - if (bloc.x2 > (_vm->_eventsManager._startPos.x + SCREEN_WIDTH)) - bloc.x2 = _vm->_eventsManager._startPos.x + SCREEN_WIDTH; + Copy_Vga16(VESA_BUFFER, bloc._x1, bloc._y1, bloc._x2 - bloc._x1, bloc._y2 - bloc._y1, bloc._x1, bloc._y1); + dstRect.left = bloc._x1 * 2; + dstRect.top = bloc._y1 * 2 + 30; + dstRect.setWidth((bloc._x2 - bloc._x1) * 2); + dstRect.setHeight((bloc._y2 - bloc._y1) * 2); + } else if (bloc._x2 > _vm->_eventsManager._startPos.x && bloc._x1 < (_vm->_eventsManager._startPos.x + SCREEN_WIDTH)) { + if (bloc._x1 < _vm->_eventsManager._startPos.x) + bloc._x1 = _vm->_eventsManager._startPos.x; + if (bloc._x2 > (_vm->_eventsManager._startPos.x + SCREEN_WIDTH)) + bloc._x2 = _vm->_eventsManager._startPos.x + SCREEN_WIDTH; // WORKAROUND: Original didn't lock the screen for access DD_Lock(); - m_scroll16(VESA_BUFFER, bloc.x1, bloc.y1, bloc.x2 - bloc.x1, bloc.y2 - bloc.y1, bloc.x1 - _vm->_eventsManager._startPos.x, bloc.y1); + m_scroll16(VESA_BUFFER, bloc._x1, bloc._y1, bloc._x2 - bloc._x1, bloc._y2 - bloc._y1, bloc._x1 - _vm->_eventsManager._startPos.x, bloc._y1); - dstRect.left = bloc.x1 - _vm->_eventsManager._startPos.x; - dstRect.top = bloc.y1; - dstRect.setWidth(bloc.x2 - bloc.x1); - dstRect.setHeight(bloc.y2 - bloc.y1); + dstRect.left = bloc._x1 - _vm->_eventsManager._startPos.x; + dstRect.top = bloc._y1; + dstRect.setWidth(bloc._x2 - bloc._x1); + dstRect.setHeight(bloc._y2 - bloc._y1); DD_Unlock(); } - _vm->_globals.BLOC[idx].field0 = 0; + _vm->_globals.BLOC[idx]._activeFl = false; } _vm->_globals.NBBLOC = 0; |