diff options
author | Nicola Mettifogo | 2007-08-12 13:10:04 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-08-12 13:10:04 +0000 |
commit | 6bbeb8c6d1dfa29f7d4bf27d5b11b64e21e55459 (patch) | |
tree | f4d5406bd575fa67c95d0bcc7a542c35bb9d1cfa /engines | |
parent | 9125ccb3eb31259e48a6b905829dba133188efa6 (diff) | |
download | scummvm-rg350-6bbeb8c6d1dfa29f7d4bf27d5b11b64e21e55459.tar.gz scummvm-rg350-6bbeb8c6d1dfa29f7d4bf27d5b11b64e21e55459.tar.bz2 scummvm-rg350-6bbeb8c6d1dfa29f7d4bf27d5b11b64e21e55459.zip |
Added simple game loop to BRA. The game still crashes after menu.
svn-id: r28560
Diffstat (limited to 'engines')
-rw-r--r-- | engines/parallaction/parallaction.h | 4 | ||||
-rw-r--r-- | engines/parallaction/parallaction_br.cpp | 43 |
2 files changed, 44 insertions, 3 deletions
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index e8331ac767..e7ba49f451 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -584,6 +584,7 @@ public: Table *_audioCommandsNames; const char **_audioCommandsNamesRes; + int _part; int _progress; private: @@ -591,6 +592,9 @@ private: void initFonts(); void freeFonts(); + void initPart(); + void freePart(); + void setMousePointer(int16 index); void initCursors(); diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index 78fe775072..84bed3eec2 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -66,6 +66,8 @@ int Parallaction_br::init() { initFonts(); initCursors(); + _part = -1; + Parallaction::init(); return 0; @@ -97,10 +99,34 @@ int Parallaction_br::go() { // TODO: load progress value from special save game _progress = 3; - // TODO: game loop :P + while ((_engineFlags & kEngineQuit) == 0) { + +// initCharacter(); + + int option = showMenu(); + switch (option) { + case kMenuQuit: + _engineFlags |= kEngineQuit; + break; + + case kMenuLoadGame: + warning("loadgame not yet implemented"); + break; + + default: + _part = option; + initPart(); + break; + } + + + runGame(); - int option = showMenu(); - printf("option = %i\n", option); + freePart(); +// freeLocation(); +// freeCharacter(); + + } return 0; } @@ -274,4 +300,15 @@ void Parallaction_br::setMousePointer(int16 index) { } +void Parallaction_br::initPart() { + + +} + +void Parallaction_br::freePart() { + + +} + + } // namespace Parallaction |