TRECISION: Remove superfluous inventory state variables

This commit is contained in:
Filippos Karapetis 2021-06-11 23:18:55 +03:00
parent a8882c9478
commit 24d791ba76
5 changed files with 4 additions and 16 deletions

View File

@ -49,7 +49,6 @@ void TrecisionEngine::loadSaveSlots(Common::StringArray &saveNames) {
}
}
_inventoryRefreshStartIconOld = _inventoryRefreshStartLineOld = _lightIconOld = 0xFF;
refreshInventory(0, 0);
}

View File

@ -440,7 +440,6 @@ void TrecisionEngine::doIdle() {
dataSave();
showInventoryName(NO_OBJECTS, false);
showIconName();
_inventoryRefreshStartIconOld = _inventoryRefreshStartLineOld = _lightIconOld = 0xFF;
refreshInventory(_inventoryRefreshStartIcon, _inventoryRefreshStartLine);
}
break;
@ -452,7 +451,6 @@ void TrecisionEngine::doIdle() {
if (!dataLoad()) {
showInventoryName(NO_OBJECTS, false);
showIconName();
_inventoryRefreshStartIconOld = _inventoryRefreshStartLineOld = _lightIconOld = 0xFF;
refreshInventory(_inventoryRefreshStartIcon, _inventoryRefreshStartLine);
}
}

View File

@ -72,12 +72,9 @@ TrecisionEngine::TrecisionEngine(OSystem *syst, const ADGameDescription *desc) :
_iconBase = 0;
_inventoryRefreshStartIcon = 0;
_inventoryRefreshStartIconOld = 0xFF;
_curObj = 1;
_inventoryRefreshStartLine = INVENTORY_HIDE;
_inventoryRefreshStartLineOld = 0xFF;
_lightIcon = 0xFF;
_lightIconOld = 0xFF;
_inventoryStatus = INV_OFF;
_inventoryCounter = INVENTORY_HIDE;
_flagInventoryLocked = false;

View File

@ -251,9 +251,9 @@ public:
Common::Array<byte> _cyberInventory;
uint8 _iconBase;
uint8 _inventoryStatus;
uint8 _lightIcon, _lightIconOld;
uint8 _inventoryRefreshStartIcon, _inventoryRefreshStartIconOld;
uint8 _inventoryRefreshStartLine, _inventoryRefreshStartLineOld;
uint8 _lightIcon;
uint8 _inventoryRefreshStartIcon;
uint8 _inventoryRefreshStartLine;
int16 _inventoryCounter;
bool _flagInventoryLocked;
int16 _inventorySpeed[8];

View File

@ -195,14 +195,8 @@ void TrecisionEngine::processTime() {
if (_inventoryStatus == INV_PAINT || _inventoryStatus == INV_DEPAINT)
rollInventory(_inventoryStatus);
if (_inventoryStatus != INV_OFF && (
_inventoryRefreshStartIconOld != _inventoryRefreshStartIcon ||
_inventoryRefreshStartLineOld != _inventoryRefreshStartLine ||
_lightIconOld != _lightIcon)) {
if (_inventoryStatus != INV_OFF) {
refreshInventory(_inventoryRefreshStartIcon, _inventoryRefreshStartLine);
_inventoryRefreshStartIconOld = _inventoryRefreshStartIcon;
_inventoryRefreshStartLineOld = _inventoryRefreshStartLine;
_lightIconOld = _lightIcon;
}
_textMgr->drawTexts();