ACCESS: MM - Implement cmdDispAbout, initialize some variables

This commit is contained in:
Strangerke 2015-01-21 23:43:45 +01:00
parent eed5116fef
commit 1d100589ab
3 changed files with 20 additions and 2 deletions

View File

@ -211,7 +211,7 @@ public:
// Fields used by MM
// TODO: Refactor
int TRAVEL[60];
int ASK[33];
int ASK[40];
int STARTTRAVELITEM;
int STARTTRAVELBOX;
int _startAboutItem;

View File

@ -73,7 +73,13 @@ void MartianEngine::initVariables() {
_events->setNormalCursor(CURSOR_CROSSHAIRS);
_mouseMode = 0;
_numAnimTimers = 0;
for (int i = 0; i < 60; i++)
TRAVEL[i] = 0;
TRAVEL[7] = 1;
for (int i = 0; i < 40; i++)
ASK[i] = 0;
ASK[33] = 1;
}

View File

@ -984,7 +984,19 @@ void Scripts::cmdPrintWatch() {
}
void Scripts::cmdDispAbout() {
error("TODO: DEMO - cmdDispAbout");
_vm->_travelBox->getList(Martian::ASKTBL, _vm->ASK);
int btnSelected = 0;
int boxX = _vm->_aboutBox->doBox_v1(_vm->_startAboutItem, _vm->_startAboutBox, btnSelected);
_vm->_startAboutItem = _vm->BOXDATASTART;
_vm->_startAboutBox = _vm->BOXSELECTY;
if (boxX == -1)
btnSelected = 2;
if (btnSelected == 2)
_vm->_useItem = -1;
else
_vm->_useItem = _vm->_travelBox->_tempListIdx[boxX];
}
void Scripts::cmdPushLocation() {