mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
GLK: ADVSYS: Added singleAction method
This commit is contained in:
parent
8612697409
commit
06ffbab3c5
@ -26,12 +26,6 @@
|
||||
namespace Glk {
|
||||
namespace AdvSys {
|
||||
|
||||
bool singleAction() {
|
||||
// TODO: Stub
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void AdvSys::runGame() {
|
||||
if (!initialize()) {
|
||||
GUIErrorMessage(_("Could not start AdvSys game"));
|
||||
@ -75,6 +69,28 @@ bool AdvSys::initialize() {
|
||||
void AdvSys::deinitialize() {
|
||||
}
|
||||
|
||||
bool AdvSys::singleAction() {
|
||||
// Do the before code
|
||||
switch (execute(_beforeOffset)) {
|
||||
case ABORT:
|
||||
// Script aborted
|
||||
return false;
|
||||
case CHAIN:
|
||||
// Execute the action handler
|
||||
if (execute(getActionField(getVariable(V_ACTION), A_CODE)) == ABORT)
|
||||
return false;
|
||||
|
||||
// fall through
|
||||
case FINISH:
|
||||
// Do the after code
|
||||
if (execute(_afterOffset) == ABORT)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Common::Error AdvSys::loadGameData(strid_t save) {
|
||||
return Common::kNoError;
|
||||
}
|
||||
|
@ -43,6 +43,11 @@ private:
|
||||
* Engine cleanup
|
||||
*/
|
||||
void deinitialize();
|
||||
|
||||
/**
|
||||
* Handle a single action
|
||||
*/
|
||||
bool singleAction();
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
|
Loading…
Reference in New Issue
Block a user