mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 00:12:59 +00:00
TOLTECS: - Implemented RTL
- Fixed return values in savegame/loadgame - Some minor cleanup
This commit is contained in:
parent
ec6f0d23a7
commit
1f4764ad1c
@ -134,7 +134,7 @@ bool ToltecsMetaEngine::hasFeature(MetaEngineFeature f) const {
|
||||
|
||||
bool Toltecs::ToltecsEngine::hasFeature(EngineFeature f) const {
|
||||
return
|
||||
// (f == kSupportsRTL) ||
|
||||
(f == kSupportsRTL) ||
|
||||
(f == kSupportsLoadingDuringRuntime) ||
|
||||
(f == kSupportsSavingDuringRuntime);
|
||||
}
|
||||
|
@ -254,15 +254,18 @@ bool MoviePlayer::handleInput() {
|
||||
if (event.kbd.keycode == Common::KEYCODE_ESCAPE)
|
||||
return false;
|
||||
break;
|
||||
case Common::EVENT_LBUTTONDOWN:
|
||||
case Common::EVENT_RBUTTONDOWN:
|
||||
return false;
|
||||
case Common::EVENT_QUIT:
|
||||
g_system->quit();
|
||||
_vm->quitGame();
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return !_vm->shouldQuit();
|
||||
}
|
||||
|
||||
} // End of namespace Toltecs
|
||||
|
@ -193,11 +193,13 @@ void ToltecsEngine::loadgame(const char *filename) {
|
||||
Common::Error ToltecsEngine::loadGameState(int slot) {
|
||||
const char *fileName = getSavegameFilename(slot);
|
||||
loadgame(fileName);
|
||||
return Common::kNoError;
|
||||
}
|
||||
|
||||
Common::Error ToltecsEngine::saveGameState(int slot, const char *description) {
|
||||
const char *fileName = getSavegameFilename(slot);
|
||||
savegame(fileName, description);
|
||||
return Common::kNoError;
|
||||
}
|
||||
|
||||
const char *ToltecsEngine::getSavegameFilename(int num) {
|
||||
|
@ -125,7 +125,6 @@ void Screen::loadMouseCursor(uint resIndex) {
|
||||
*mouseCursorP++ = pixel;
|
||||
}
|
||||
}
|
||||
//CursorMan.replaceCursor((const byte*)mouseCursor, 16, 16, 0, 0, 0);
|
||||
// FIXME: Where's the cursor hotspot? Using 8, 8 seems good enough for now.
|
||||
CursorMan.replaceCursor((const byte*)mouseCursor, 16, 16, 8, 8, 0);
|
||||
}
|
||||
@ -540,7 +539,7 @@ void Screen::drawGuiTextMulti(byte *textData) {
|
||||
wrapState.sourceString += 4;
|
||||
} else if (*wrapState.sourceString == 0x0B) {
|
||||
// Inc text position
|
||||
y += wrapState.sourceString[1]; // CHECKME: Maybe these are signed?
|
||||
y += wrapState.sourceString[1];
|
||||
x += wrapState.sourceString[2];
|
||||
wrapState.sourceString += 3;
|
||||
} else {
|
||||
|
@ -96,7 +96,7 @@ void ScriptInterpreter::runScript(uint slotIndex) {
|
||||
|
||||
_code = getSlotData(_regs.reg4);
|
||||
|
||||
while (1) {
|
||||
while (!_vm->shouldQuit()) {
|
||||
|
||||
if (_vm->_movieSceneFlag)
|
||||
_vm->_mouseButton = 0;
|
||||
@ -124,7 +124,7 @@ void ScriptInterpreter::runScript(uint slotIndex) {
|
||||
// Call updateScreen roughly every 10ms else the mouse cursor will be jerky
|
||||
if (_vm->_system->getMillis() % 10 == 0)
|
||||
_vm->_system->updateScreen();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -451,7 +451,7 @@ void ScriptInterpreter::execKernelOpcode(uint16 kernelOpcode) {
|
||||
|
||||
_vm->_screen->updateShakeScreen();
|
||||
|
||||
if (_vm->_quitGame)
|
||||
if (_vm->shouldQuit())
|
||||
return;
|
||||
|
||||
if (!_vm->_movieSceneFlag)
|
||||
|
@ -102,7 +102,6 @@ Common::Error ToltecsEngine::go() {
|
||||
|
||||
_isSaveAllowed = true;
|
||||
|
||||
_quitGame = false;
|
||||
_counter01 = 0;
|
||||
_counter02 = 0;
|
||||
_movieSceneFlag = false;
|
||||
@ -248,6 +247,7 @@ void ToltecsEngine::updateScreen() {
|
||||
_system->updateScreen();
|
||||
|
||||
updateCamera();
|
||||
|
||||
}
|
||||
|
||||
void ToltecsEngine::updateInput() {
|
||||
@ -272,8 +272,7 @@ void ToltecsEngine::updateInput() {
|
||||
|
||||
break;
|
||||
case Common::EVENT_QUIT:
|
||||
// FIXME: Find a nicer way to quit
|
||||
_system->quit();
|
||||
quitGame();
|
||||
break;
|
||||
case Common::EVENT_MOUSEMOVE:
|
||||
_mouseX = event.mouse.x;
|
||||
@ -338,6 +337,7 @@ void ToltecsEngine::setGuiHeight(int16 guiHeight) {
|
||||
if (guiHeight != _guiHeight) {
|
||||
_guiHeight = guiHeight;
|
||||
_cameraHeight = 400 - _guiHeight;
|
||||
_screen->_guiRefresh = true;
|
||||
debug(0, "ToltecsEngine::setGuiHeight() _guiHeight = %d; _cameraHeight = %d", _guiHeight, _cameraHeight);
|
||||
// TODO: clearScreen();
|
||||
}
|
||||
|
@ -115,7 +115,6 @@ public:
|
||||
uint _sceneResIndex;
|
||||
int16 _sceneWidth, _sceneHeight;
|
||||
|
||||
bool _quitGame;
|
||||
int _counter01, _counter02;
|
||||
bool _movieSceneFlag;
|
||||
byte _flag01;
|
||||
|
Loading…
x
Reference in New Issue
Block a user