mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
added bootparam handling, minor cleanup
svn-id: r29364
This commit is contained in:
parent
e6e144d494
commit
d9d15f9e7e
@ -153,7 +153,10 @@ void IgorEngine::restart() {
|
||||
int IgorEngine::go() {
|
||||
restart();
|
||||
setupDefaultPalette();
|
||||
_currentPart = kStartupPart;
|
||||
_currentPart = ConfMan.getInt("boot_param");
|
||||
if (_currentPart == 0) {
|
||||
_currentPart = kStartupPart;
|
||||
}
|
||||
if (!_ovlFile.open("IGOR.DAT")) {
|
||||
error("Unable to open 'IGOR.DAT'");
|
||||
}
|
||||
@ -204,7 +207,8 @@ void IgorEngine::waitForTimer(int ticks) {
|
||||
while (_eventMan->pollEvent(ev)) {
|
||||
switch (ev.type) {
|
||||
case Common::EVENT_QUIT:
|
||||
_currentPart = 255;
|
||||
_inputVars[kInputEscape] = 1;
|
||||
_currentPart = kInvalidPart;
|
||||
_eventQuitGame = true;
|
||||
break;
|
||||
case Common::EVENT_KEYDOWN:
|
||||
|
@ -58,6 +58,8 @@ enum {
|
||||
|
||||
enum {
|
||||
kStartupPart = 900,
|
||||
kInvalidPart = 255,
|
||||
kSharewarePart = 950,
|
||||
kTalkColor = 240,
|
||||
kTalkShadowColor = 241,
|
||||
kTickDelay = 1193180 / 4096
|
||||
|
@ -143,7 +143,7 @@ void IgorEngine::handleOptionsMenu_paintQuit() {
|
||||
|
||||
bool IgorEngine::handleOptionsMenu_handleKeyDownQuit(int key) {
|
||||
if (key == Common::KEYCODE_y) {
|
||||
_currentPart = 255; // display the shareware screens
|
||||
_currentPart = kInvalidPart;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -257,13 +257,13 @@ void IgorEngine::handleOptionsMenu() {
|
||||
int currentPage = 0;
|
||||
bool menuLoop = true;
|
||||
bool focusOnPage = false;
|
||||
while (menuLoop && _currentPart != 255) {
|
||||
while (menuLoop && !_eventQuitGame && _currentPart != kInvalidPart) {
|
||||
int previousPage = currentPage;
|
||||
Common::Event ev;
|
||||
while (_eventMan->pollEvent(ev)) {
|
||||
switch (ev.type) {
|
||||
case Common::EVENT_QUIT:
|
||||
_currentPart = 255;
|
||||
_currentPart = kInvalidPart;
|
||||
_eventQuitGame = true;
|
||||
break;
|
||||
case Common::EVENT_KEYDOWN:
|
||||
@ -333,6 +333,11 @@ void IgorEngine::handleOptionsMenu() {
|
||||
_system->updateScreen();
|
||||
_system->delayMillis(1000 / 60);
|
||||
}
|
||||
if (!_eventQuitGame && _currentPart == kInvalidPart) {
|
||||
if (_gameVersion == kIdEngDemo100 || _gameVersion == kIdEngDemo110) {
|
||||
_currentPart = kSharewarePart;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IgorEngine::handlePause() {
|
||||
|
@ -27,7 +27,9 @@
|
||||
|
||||
namespace Igor {
|
||||
|
||||
static const char *STR_COPYRIGHT = "(C) 1995 Optik Software. All rights reserved.";
|
||||
static const char *STR_COPYRIGHT_1995 = "(C) 1995 Optik Software. All rights reserved.";
|
||||
|
||||
static const char *STR_COPYRIGHT_1994 = "(C) 1994 PENDULO STUDIOS. All rights reserved.";
|
||||
|
||||
void IgorEngine::PART_90() {
|
||||
memset(_currentPalette, 0, 768);
|
||||
@ -52,11 +54,11 @@ void IgorEngine::PART_90() {
|
||||
case 904:
|
||||
loadData(PAL_TitleScreen, _paletteBuffer);
|
||||
loadData(IMG_TitleScreen, _screenVGA);
|
||||
drawString(_screenVGA, STR_COPYRIGHT, 2, 187, 0xF5, 0, 0);
|
||||
drawString(_screenVGA, (_gameVersion == kIdEngDemo110) ? STR_COPYRIGHT_1994 : STR_COPYRIGHT_1995, 2, 187, 0xF5, 0, 0);
|
||||
break;
|
||||
}
|
||||
fadeInPalette(768);
|
||||
while (!_inputVars[kInputEscape] && !_eventQuitGame) {
|
||||
while (!_inputVars[kInputEscape]) {
|
||||
waitForTimer();
|
||||
if (_inputVars[kInputOptions]) {
|
||||
_inputVars[kInputOptions] = 0;
|
||||
@ -66,10 +68,12 @@ void IgorEngine::PART_90() {
|
||||
}
|
||||
_inputVars[kInputEscape] = 0;
|
||||
fadeOutPalette(768);
|
||||
if (_currentPart == 904) {
|
||||
_currentPart = 850;
|
||||
} else {
|
||||
++_currentPart;
|
||||
if (_currentPart != kInvalidPart) {
|
||||
if (_currentPart == 904) {
|
||||
_currentPart = 850;
|
||||
} else {
|
||||
++_currentPart;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -929,9 +929,18 @@ void IgorEngine::PART_MAIN() {
|
||||
case 904:
|
||||
PART_90();
|
||||
break;
|
||||
case 950:
|
||||
case 951:
|
||||
case 952:
|
||||
case 953:
|
||||
case 954:
|
||||
case 955:
|
||||
case 956:
|
||||
PART_95();
|
||||
break;
|
||||
default:
|
||||
warning("PART_MAIN() Unhandled part %d", _currentPart);
|
||||
_currentPart = 255;
|
||||
_currentPart = kInvalidPart;
|
||||
break;
|
||||
}
|
||||
if (_currentPart >= 10) {
|
||||
@ -966,9 +975,6 @@ void IgorEngine::PART_MAIN() {
|
||||
_gameState.nextMusicCounter = 0;
|
||||
}
|
||||
} while (_currentPart != 255 && !_eventQuitGame);
|
||||
for (_currentPart = 950; _currentPart <= 956 && !_eventQuitGame; ++_currentPart) {
|
||||
PART_95();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Igor
|
||||
|
Loading…
Reference in New Issue
Block a user