From 6bbeb8c6d1dfa29f7d4bf27d5b11b64e21e55459 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sun, 12 Aug 2007 13:10:04 +0000 Subject: Added simple game loop to BRA. The game still crashes after menu. svn-id: r28560 --- engines/parallaction/parallaction.h | 4 +++ engines/parallaction/parallaction_br.cpp | 43 +++++++++++++++++++++++++++++--- 2 files changed, 44 insertions(+), 3 deletions(-) (limited to 'engines/parallaction') 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 -- cgit v1.2.3