aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction
diff options
context:
space:
mode:
authorNicola Mettifogo2007-07-29 16:29:41 +0000
committerNicola Mettifogo2007-07-29 16:29:41 +0000
commitb01232f08ad34ac16e36a83e32ca741fc8fc2169 (patch)
tree1c0cd579f751c39ed28e4c56ebe06957714c310b /engines/parallaction
parentbf5bb9280b1dc4a02b4c0ec9506a0723ed80b55e (diff)
downloadscummvm-rg350-b01232f08ad34ac16e36a83e32ca741fc8fc2169.tar.gz
scummvm-rg350-b01232f08ad34ac16e36a83e32ca741fc8fc2169.tar.bz2
scummvm-rg350-b01232f08ad34ac16e36a83e32ca741fc8fc2169.zip
- Added parser strings for Big Red Adventure
- Pushed parser strings initialization down to engine subclasses svn-id: r28295
Diffstat (limited to 'engines/parallaction')
-rw-r--r--engines/parallaction/animation.cpp2
-rw-r--r--engines/parallaction/parallaction.cpp2
-rw-r--r--engines/parallaction/parallaction.h22
-rw-r--r--engines/parallaction/parallaction_br.cpp2
-rw-r--r--engines/parallaction/parallaction_ns.cpp2
-rw-r--r--engines/parallaction/staticres.cpp193
6 files changed, 206 insertions, 17 deletions
diff --git a/engines/parallaction/animation.cpp b/engines/parallaction/animation.cpp
index 281e3e8da9..118f35e705 100644
--- a/engines/parallaction/animation.cpp
+++ b/engines/parallaction/animation.cpp
@@ -468,7 +468,7 @@ void jobRunScripts(void *parm, Job *j) {
while (((*inst)->_index != INST_SHOW) && (a->_flags & kFlagsActing)) {
- debugC(9, kDebugJobs, "Animation: %s, instruction: %s", a->_label._text, (*inst)->_index == INST_END ? "end" : _instructionNamesRes[(*inst)->_index - 1]);
+ debugC(9, kDebugJobs, "Animation: %s, instruction: %s", a->_label._text, (*inst)->_index == INST_END ? "end" : _vm->_instructionNamesRes[(*inst)->_index - 1]);
switch ((*inst)->_index) {
case INST_ENDLOOP: // endloop
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index a31559711b..e92d9f36d4 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -146,8 +146,6 @@ Parallaction::~Parallaction() {
int Parallaction::init() {
- initResources(); // needs to be pushed into subclass
-
_engineFlags = 0;
_objectsNames = NULL;
_globalTable = NULL;
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h
index 25753f60b2..eabdf33282 100644
--- a/engines/parallaction/parallaction.h
+++ b/engines/parallaction/parallaction.h
@@ -182,8 +182,6 @@ extern uint16 _introSarcData3; // sarcophagus stuff to be saved
extern uint16 _introSarcData2; // sarcophagus stuff to be saved
extern char _saveData1[];
extern uint32 _commandFlags;
-extern const char *_instructionNamesRes[];
-extern const char *_commandsNamesRes[];
extern const char *_dinoName;
extern const char *_donnaName;
extern const char *_doughName;
@@ -435,7 +433,6 @@ protected: // members
void initGame();
void initGlobals();
- void initResources();
void runGame();
uint32 getElapsedTime();
void resetTimer();
@@ -482,6 +479,13 @@ protected: // members
public:
virtual void callFunction(uint index, void* parm) { }
+public:
+ const char **_zoneFlagNamesRes;
+ const char **_zoneTypeNamesRes;
+ const char **_commandsNamesRes;
+ const char **_callableNamesRes;
+ const char **_instructionNamesRes;
+
};
class Parallaction_ns : public Parallaction {
@@ -494,6 +498,10 @@ public:
public:
virtual void callFunction(uint index, void* parm);
+
+private:
+ void initResources();
+
};
class Parallaction_br : public Parallaction {
@@ -504,6 +512,14 @@ public:
int init();
+public:
+ Table *_audioCommandsNames;
+ const char **_audioCommandsNamesRes;
+
+private:
+ void initResources();
+
+
};
// FIXME: remove global
diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp
index 1609921d85..44009bdf5c 100644
--- a/engines/parallaction/parallaction_br.cpp
+++ b/engines/parallaction/parallaction_br.cpp
@@ -50,6 +50,8 @@ int Parallaction_br::init() {
_soundMan = new DummySoundMan(this);
+ initResources();
+
Parallaction::init();
return 0;
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp
index 5f0fb0fe84..e971701d6f 100644
--- a/engines/parallaction/parallaction_ns.cpp
+++ b/engines/parallaction/parallaction_ns.cpp
@@ -61,6 +61,8 @@ int Parallaction_ns::init() {
_soundMan = new AmigaSoundMan(this);
}
+ initResources();
+
Parallaction::init();
return 0;
diff --git a/engines/parallaction/staticres.cpp b/engines/parallaction/staticres.cpp
index e6cbc303b0..30d2b0c95a 100644
--- a/engines/parallaction/staticres.cpp
+++ b/engines/parallaction/staticres.cpp
@@ -219,7 +219,7 @@ byte _amigaTopazFont[2600] =
-const char *_zoneFlagNamesRes[] = {
+const char *_zoneFlagNamesRes_ns[] = {
"closed",
"active",
"remove",
@@ -234,7 +234,7 @@ const char *_zoneFlagNamesRes[] = {
"nowalk"
};
-const char *_zoneTypeNamesRes[] = {
+const char *_zoneTypeNamesRes_ns[] = {
"examine",
"door",
"get",
@@ -262,7 +262,7 @@ const char _gameNames[10][20] = {
"GAME10"
};
-const char *_commandsNamesRes[] = {
+const char *_commandsNamesRes_ns[] = {
"set",
"clear",
"start",
@@ -281,7 +281,7 @@ const char *_commandsNamesRes[] = {
"stop"
};
-const char *_instructionNamesRes[] = {
+const char *_instructionNamesRes_ns[] = {
"on",
"off",
"x",
@@ -302,7 +302,7 @@ const char *_instructionNamesRes[] = {
"move"
};
-const char *_callableNamesRes[] = {
+const char *_callableNamesRes_ns[] = {
"Projector",
"HBOff",
"StartIntro",
@@ -330,6 +330,148 @@ const char *_callableNamesRes[] = {
"TestResult"
};
+const char *_zoneTypeNamesRes_br[] = {
+ "examine",
+ "door",
+ "get",
+ "merge",
+ "taste",
+ "hear",
+ "feel",
+ "speak",
+ "none",
+ "trap",
+ "you",
+ "command",
+ "path",
+ "box"
+};
+
+const char *_zoneFlagNamesRes_br[] = {
+ "closed",
+ "active",
+ "remove",
+ "acting",
+ "locked",
+ "fixed",
+ "noname",
+ "nomasked",
+ "looping",
+ "added",
+ "character",
+ "nowalk",
+ "yourself",
+ "scaled",
+ "selfuse"
+};
+
+const char *_instructionNamesRes_br[] = {
+ "on",
+ "off",
+ "x",
+ "y",
+ "z",
+ "f",
+ "loop",
+ "endloop",
+ "show",
+ "inc",
+ "dec",
+ "set",
+ "put",
+ "call",
+ "wait",
+ "start",
+ "process",
+ "move",
+ "color",
+ "sound",
+ "mask",
+ "print",
+ "text",
+ "mul",
+ "div",
+ "if",
+ "ifeq",
+ "iflt",
+ "ifgt",
+ "endif",
+ "stop"
+};
+
+const char *_commandsNamesRes_br[] = {
+ "set",
+ "clear",
+ "start",
+ "speak",
+ "get"
+ "location",
+ "open",
+ "close",
+ "on",
+ "off",
+ "call",
+ "toggle",
+ "drop",
+ "quit",
+ "move",
+ "stop",
+ "character",
+ "followme",
+ "onmouse",
+ "offmouse",
+ "add",
+ "leave",
+ "inc",
+ "dec",
+ "text",
+ "dummy",
+ "dummy",
+ "let",
+ "music",
+ "fix",
+ "unfix",
+ "zeta",
+ "scroll",
+ "swap",
+ "give",
+ "text",
+ "part",
+ "dummy",
+ "return",
+ "onsave",
+ "offsave"
+};
+
+const char *_callableNamesRes_br[] = {
+ "blufade",
+ "resetpalette",
+ "ferrcycle",
+ "lipsinc",
+ "albycle",
+ "password"
+};
+
+const char *_audioCommandsNamesRes_br[] = {
+ "play",
+ "stop",
+ "pause",
+ "channel_level",
+ "fadein",
+ "fadeout",
+ "volume",
+ " ",
+ "faderate",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ "loop"
+};
+
typedef void (*callable)(void*);
@@ -385,13 +527,19 @@ const char *_minidoughName = "minidough";
const char *_minidrkiName = "minidrki";
-void Parallaction::initResources() {
+void Parallaction_ns::initResources() {
- _callableNames = new Table(ARRAYSIZE(_callableNamesRes), _callableNamesRes);
- _instructionNames = new Table(ARRAYSIZE(_instructionNamesRes), _instructionNamesRes);
- _zoneFlagNames = new Table(ARRAYSIZE(_zoneFlagNamesRes), _zoneFlagNamesRes);
- _zoneTypeNames = new Table(ARRAYSIZE(_zoneTypeNamesRes), _zoneTypeNamesRes);
- _commandsNames = new Table(ARRAYSIZE(_commandsNamesRes), _commandsNamesRes);
+ _zoneFlagNamesRes = _zoneFlagNamesRes_ns;
+ _zoneTypeNamesRes = _zoneTypeNamesRes_ns;
+ _commandsNamesRes = _commandsNamesRes_ns;
+ _callableNamesRes = _callableNamesRes_ns;
+ _instructionNamesRes = _instructionNamesRes_ns;
+
+ _callableNames = new Table(ARRAYSIZE(_zoneFlagNamesRes_ns), _zoneFlagNamesRes_ns);
+ _instructionNames = new Table(ARRAYSIZE(_instructionNamesRes_ns), _instructionNamesRes_ns);
+ _zoneFlagNames = new Table(ARRAYSIZE(_zoneFlagNamesRes_ns), _zoneFlagNamesRes_ns);
+ _zoneTypeNames = new Table(ARRAYSIZE(_zoneTypeNamesRes_ns), _zoneTypeNamesRes_ns);
+ _commandsNames = new Table(ARRAYSIZE(_commandsNamesRes_ns), _commandsNamesRes_ns);
_localFlagNames = new Table(120);
_localFlagNames->addData("visited");
@@ -452,5 +600,28 @@ void Parallaction::initResources() {
}
+void Parallaction_br::initResources() {
+
+ _zoneFlagNamesRes = _zoneFlagNamesRes_br;
+ _zoneTypeNamesRes = _zoneTypeNamesRes_br;
+ _commandsNamesRes = _commandsNamesRes_br;
+ _callableNamesRes = _callableNamesRes_br;
+ _instructionNamesRes = _instructionNamesRes_br;
+ _audioCommandsNamesRes = _audioCommandsNamesRes_br;
+
+ _callableNames = new Table(ARRAYSIZE(_callableNamesRes_br), _callableNamesRes_br);
+ _instructionNames = new Table(ARRAYSIZE(_instructionNamesRes_br), _instructionNamesRes_br);
+ _zoneFlagNames = new Table(ARRAYSIZE(_zoneFlagNamesRes_br), _zoneFlagNamesRes_br);
+ _zoneTypeNames = new Table(ARRAYSIZE(_zoneTypeNamesRes_br), _zoneTypeNamesRes_br);
+ _commandsNames = new Table(ARRAYSIZE(_commandsNamesRes_br), _commandsNamesRes_br);
+ _audioCommandsNames = new Table(ARRAYSIZE(_audioCommandsNamesRes_br), _audioCommandsNamesRes_br);
+
+ // TODO: make sure there are 120 max locations in Big Red Adventure
+ _localFlagNames = new Table(120);
+ _localFlagNames->addData("visited");
+
+ // TODO: init callables for Big Red Adventure
+
+}
} // namespace Parallaction