mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 02:10:28 +00:00
ASYLUM: * Added a console command to show the currently active game flags
* Tweaked the logic for the JumpIfFlagSet opcode * Added the two flag registrations that would be set if the intro ran to the main engine (so we can disable the intro for now) git-svn-id: http://asylumengine.googlecode.com/svn/trunk@301 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
This commit is contained in:
parent
f48ab391ac
commit
7cef62988d
@ -125,10 +125,12 @@ Common::Error AsylumEngine::go() {
|
||||
// Also, this routine is used to set game flags 4 and 12, so if we're
|
||||
// skipping the intro, but not loading a save file, those flags
|
||||
// need to be set somewhere else.
|
||||
playIntro();
|
||||
//playIntro();
|
||||
|
||||
// Enter first scene
|
||||
//_scene->enterScene();
|
||||
ScriptMan.setGameFlag(4);
|
||||
ScriptMan.setGameFlag(12);
|
||||
_scene->enterScene();
|
||||
|
||||
while (!shouldQuit()) {
|
||||
checkForEvent(true);
|
||||
|
@ -40,6 +40,7 @@ Console::Console(AsylumEngine *vm) : GUI::Debugger() {
|
||||
DCmd_Register("video", WRAP_METHOD(Console, cmdPlayVideo));
|
||||
DCmd_Register("script", WRAP_METHOD(Console, cmdRunScript));
|
||||
DCmd_Register("scene", WRAP_METHOD(Console, cmdChangeScene));
|
||||
DCmd_Register("flags", WRAP_METHOD(Console, cmdShowFlags));
|
||||
|
||||
DVar_Register("showpolygons", &g_debugPolygons, DVAR_INT, 0);
|
||||
DVar_Register("showbarriers", &g_debugBarriers, DVAR_INT, 0);
|
||||
@ -48,6 +49,16 @@ Console::Console(AsylumEngine *vm) : GUI::Debugger() {
|
||||
Console::~Console() {
|
||||
}
|
||||
|
||||
bool Console::cmdShowFlags(int argc, const char **argv) {
|
||||
for (int i = 0; i < 1512; i++) {
|
||||
if (ScriptMan.isGameFlagSet(i)) {
|
||||
DebugPrintf("Game Flag %d is Active\n", i);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Console::cmdPlayVideo(int argc, const char **argv) {
|
||||
if (argc != 2) {
|
||||
DebugPrintf("Usage %s <video number>\n", argv[0]);
|
||||
|
@ -43,6 +43,7 @@ private:
|
||||
bool cmdPlayVideo(int argc, const char **argv);
|
||||
bool cmdRunScript(int argc, const char **argv);
|
||||
bool cmdChangeScene(int argc, const char **argv);
|
||||
bool cmdShowFlags(int argc, const char **argv);
|
||||
|
||||
private:
|
||||
AsylumEngine *_vm;
|
||||
|
@ -162,9 +162,9 @@ void ScriptManager::processActionList() {
|
||||
/* 0x04 */ case kJumpIfGameFlag: {
|
||||
int flagNum = currentCommand->param1;
|
||||
if (flagNum) {
|
||||
bool doJump = isGameFlagNotSet(flagNum);
|
||||
bool doJump = isGameFlagSet(flagNum);
|
||||
if (currentCommand->param2)
|
||||
doJump = isGameFlagSet(flagNum);
|
||||
doJump = isGameFlagNotSet(flagNum);
|
||||
|
||||
if (doJump)
|
||||
_currentLine = currentCommand->param3;
|
||||
@ -319,12 +319,10 @@ void ScriptManager::processActionList() {
|
||||
uint32 v59 = currentCommand->param2;
|
||||
|
||||
if (!_currentScript->counter && Shared.getScene()->getSceneIndex() != 13 && sndIdx != 0) {
|
||||
// TODO
|
||||
// Find a script that actually has a valid param3
|
||||
// to see if this code is accurate :P
|
||||
ResourcePack *tmpRes = new ResourcePack(12);
|
||||
Shared.getSound()->playSfx(tmpRes, ((int)(sndIdx != 0) & 5) + 0x80120001);
|
||||
delete tmpRes;
|
||||
ResourcePack *sfx = new ResourcePack(18);
|
||||
Shared.getSound()->playSfx(sfx, ((unsigned int)(sndIdx != 0) & 5) + 0x80120001);
|
||||
delete sfx;
|
||||
//Shared.getSound()->playSfx(Shared.getScene()->getSpeechPack(),sndIdx + 86);
|
||||
}
|
||||
|
||||
if (_currentScript->counter >= 3 * v59 - 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user