aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2009-10-18 19:43:27 +0000
committerMax Horn2009-10-18 19:43:27 +0000
commit9e64255bd1d81e5432d02f5183f202f2c1eb75ab (patch)
tree82a076fb953f9463df3ad7d19460abafcbec4a7e /engines
parentf3ab3051d889fd03e9abaeb00a0735cd8a9a9d54 (diff)
downloadscummvm-rg350-9e64255bd1d81e5432d02f5183f202f2c1eb75ab.tar.gz
scummvm-rg350-9e64255bd1d81e5432d02f5183f202f2c1eb75ab.tar.bz2
scummvm-rg350-9e64255bd1d81e5432d02f5183f202f2c1eb75ab.zip
SCI: Rename game_obj to _gameObj
svn-id: r45235
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/game.cpp6
-rw-r--r--engines/sci/engine/kstring.cpp4
-rw-r--r--engines/sci/engine/savegame.cpp2
-rw-r--r--engines/sci/engine/state.cpp10
-rw-r--r--engines/sci/engine/state.h2
-rw-r--r--engines/sci/engine/vm.cpp8
6 files changed, 16 insertions, 16 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index 75cafd7a43..75820f6024 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -437,11 +437,11 @@ int game_init(EngineState *s) {
// script_dissect(0, s->_selectorNames);
// The first entry in the export table of script 0 points to the game object
- s->game_obj = s->_segMan->lookupScriptExport(0, 0);
+ s->_gameObj = s->_segMan->lookupScriptExport(0, 0);
uint32 gameFlags = 0; // unused
- s->_gameName = convertSierraGameId(s->_segMan->getObjectName(s->game_obj), &gameFlags);
+ s->_gameName = convertSierraGameId(s->_segMan->getObjectName(s->_gameObj), &gameFlags);
- debug(2, " \"%s\" at %04x:%04x", s->_gameName.c_str(), PRINT_REG(s->game_obj));
+ debug(2, " \"%s\" at %04x:%04x", s->_gameName.c_str(), PRINT_REG(s->_gameObj));
s->_menubar = new Menubar(); // Create menu bar
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index 36a20bbbc7..8e4f72631b 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -215,7 +215,7 @@ reg_t kParse(EngineState *s, int argc, reg_t *argv) {
s->r_acc = make_reg(0, 1);
PUT_SEL32V(segMan, event, claimed, 1);
- invoke_selector(INV_SEL(s->game_obj, syntaxFail, kStopOnInvalidSelector), 2, s->parser_base, stringpos);
+ invoke_selector(INV_SEL(s->_gameObj, syntaxFail, kStopOnInvalidSelector), 2, s->parser_base, stringpos);
/* Issue warning */
debugC(2, kDebugLevelParser, "Tree building failed\n");
@@ -238,7 +238,7 @@ reg_t kParse(EngineState *s, int argc, reg_t *argv) {
debugC(2, kDebugLevelParser, "Word unknown: %s\n", error);
/* Issue warning: */
- invoke_selector(INV_SEL(s->game_obj, wordFail, kStopOnInvalidSelector), 2, s->parser_base, stringpos);
+ invoke_selector(INV_SEL(s->_gameObj, wordFail, kStopOnInvalidSelector), 2, s->parser_base, stringpos);
free(error);
return make_reg(0, 1); /* Tell them that it dind't work */
}
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index a7bdef8b63..3ce6032ce8 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -762,7 +762,7 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
reconstruct_stack(retval);
retval->_segMan->reconstructScripts(retval);
retval->_segMan->reconstructClones();
- retval->game_obj = s->game_obj;
+ retval->_gameObj = s->_gameObj;
retval->script_000 = retval->_segMan->getScript(retval->_segMan->getScriptSegment(0, SCRIPT_GET_DONT_LOAD));
retval->gc_countdown = GC_INTERVAL - 1;
retval->sys_strings_segment = retval->_segMan->findSegmentByType(SEG_TYPE_SYS_STRINGS);
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index dee94d6985..331c1a5d5b 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -99,7 +99,7 @@ EngineState::EngineState(ResourceManager *res, Kernel *kernel, Vocabulary *voc,
parserIsValid = false;
- game_obj = NULL_REG;
+ _gameObj = NULL_REG;
_segMan = 0;
gc_countdown = 0;
@@ -177,7 +177,7 @@ kLanguage EngineState::getLanguage() {
kLanguage lang = K_LANG_ENGLISH;
if (_kernel->_selectorCache.printLang != -1) {
- lang = (kLanguage)GET_SEL32V(_segMan, this->game_obj, printLang);
+ lang = (kLanguage)GET_SEL32V(_segMan, _gameObj, printLang);
if ((getSciVersion() == SCI_VERSION_1_1) || (lang == K_LANG_NONE)) {
// If language is set to none, we use the language from the game detector.
@@ -212,7 +212,7 @@ kLanguage EngineState::getLanguage() {
}
// Store language in printLang selector
- PUT_SEL32V(_segMan, this->game_obj, printLang, lang);
+ PUT_SEL32V(_segMan, _gameObj, printLang, lang);
}
}
@@ -224,7 +224,7 @@ Common::String EngineState::strSplit(const char *str, const char *sep) {
kLanguage subLang = K_LANG_NONE;
if (_kernel->_selectorCache.subtitleLang != -1) {
- subLang = (kLanguage)GET_SEL32V(_segMan, this->game_obj, subtitleLang);
+ subLang = (kLanguage)GET_SEL32V(_segMan, _gameObj, subtitleLang);
}
Common::String retval = getLanguageString(str, lang);
@@ -359,7 +359,7 @@ SciVersion EngineState::detectDoSoundType() {
SciVersion EngineState::detectSetCursorType() {
if (_setCursorType == SCI_VERSION_AUTODETECT) {
- int sum = methodChecksum(game_obj, _kernel->_selectorCache.setCursor, 0, 21);
+ int sum = methodChecksum(_gameObj, _kernel->_selectorCache.setCursor, 0, 21);
if ((sum == 0x4D5) || (sum == 0x552)) {
// Standard setCursor
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index 4f08994ffc..f1498ac561 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -273,7 +273,7 @@ public:
SegmentId sys_strings_segment;
SystemStrings *sys_strings;
- reg_t game_obj; /**< Pointer to the game object */
+ reg_t _gameObj; /**< Pointer to the game object */
SegManager *_segMan;
int gc_countdown; /**< Number of kernel calls until next gc */
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 43d8ae53b3..1f3f203dcf 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -1770,7 +1770,7 @@ static EngineState *_game_run(EngineState *&s, int restoring) {
s->_sound.sfx_reset_player();
_init_stack_base_with_selector(s, s->_kernel->_selectorCache.play);
- send_selector(s, s->game_obj, s->game_obj, s->stack_base, 2, s->stack_base);
+ send_selector(s, s->_gameObj, s->_gameObj, s->stack_base, 2, s->stack_base);
script_abort_flag = 0;
s->restarting_flags = SCI_GAME_WAS_RESTARTED | SCI_GAME_WAS_RESTARTED_AT_LEAST_ONCE;
@@ -1789,7 +1789,7 @@ static EngineState *_game_run(EngineState *&s, int restoring) {
_init_stack_base_with_selector(s, s->_kernel->_selectorCache.replay);
- send_selector(s, s->game_obj, s->game_obj, s->stack_base, 2, s->stack_base);
+ send_selector(s, s->_gameObj, s->_gameObj, s->stack_base, 2, s->stack_base);
}
script_abort_flag = 0;
@@ -1809,9 +1809,9 @@ int game_run(EngineState **_s) {
_init_stack_base_with_selector(s, s->_kernel->_selectorCache.play); // Call the play selector
// Now: Register the first element on the execution stack-
- if (!send_selector(s, s->game_obj, s->game_obj, s->stack_base, 2, s->stack_base)) {
+ if (!send_selector(s, s->_gameObj, s->_gameObj, s->stack_base, 2, s->stack_base)) {
Console *con = ((SciEngine *)g_engine)->getSciDebugger();
- con->printObject(s->game_obj);
+ con->printObject(s->_gameObj);
warning("Failed to run the game! Aborting...");
return 1;
}