aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorMax Horn2009-02-28 22:19:22 +0000
committerMax Horn2009-02-28 22:19:22 +0000
commitd7b06b7d4267c0ea6ff537455f940deed303eefb (patch)
tree9c255c0407f2dec30eaf3ff2bdef95c34de26e2b /engines/sci/engine
parente1599798693eedc88e7fa2545e0976d89d9fa736 (diff)
downloadscummvm-rg350-d7b06b7d4267c0ea6ff537455f940deed303eefb.tar.gz
scummvm-rg350-d7b06b7d4267c0ea6ff537455f940deed303eefb.tar.bz2
scummvm-rg350-d7b06b7d4267c0ea6ff537455f940deed303eefb.zip
SCI: Renamed ResourceManager::sci_version to _sciVersion, to avoid var shadowing warnings; some other tweaks
svn-id: r38984
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/game.cpp12
-rw-r--r--engines/sci/engine/kernel.cpp2
-rw-r--r--engines/sci/engine/kgraphics.cpp18
-rw-r--r--engines/sci/engine/savegame.cfsml4
-rw-r--r--engines/sci/engine/savegame.cpp2
-rw-r--r--engines/sci/engine/scriptconsole.cpp2
6 files changed, 20 insertions, 20 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index 3b53dcb659..597735d771 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -47,7 +47,7 @@ static int _init_vocabulary(EngineState *s) { // initialize vocabulary and relat
sciprintf("Initializing vocabulary\n");
- if ((s->resmgr->sci_version < SCI_VERSION_01_VGA) && (s->parser_words = vocab_get_words(s->resmgr, &(s->parser_words_nr)))) {
+ if ((s->resmgr->_sciVersion < SCI_VERSION_01_VGA) && (s->parser_words = vocab_get_words(s->resmgr, &(s->parser_words_nr)))) {
s->parser_suffices = vocab_get_suffices(s->resmgr, &(s->parser_suffices_nr));
if ((s->parser_branches = vocab_get_branches(s->resmgr, &(s->parser_branches_nr))))
// Now build a GNF grammar out of this
@@ -124,7 +124,7 @@ int _reset_graphics_input(EngineState *s) {
gfx_color_t transparent;
sciprintf("Initializing graphics\n");
- if (s->resmgr->sci_version <= SCI_VERSION_01) {
+ if (s->resmgr->_sciVersion <= SCI_VERSION_01) {
int i;
for (i = 0; i < 16; i++) {
@@ -185,7 +185,7 @@ int _reset_graphics_input(EngineState *s) {
font_nr = -1;
do {
resource = s->resmgr->testResource(sci_font, ++font_nr);
- } while ((!resource) && (font_nr < sci_max_resource_nr[s->resmgr->sci_version]));
+ } while ((!resource) && (font_nr < sci_max_resource_nr[s->resmgr->_sciVersion]));
if (!resource) {
sciprintf("No text font was found.\n");
@@ -198,7 +198,7 @@ int _reset_graphics_input(EngineState *s) {
s->iconbar_port = gfxw_new_port(s->visual, NULL, gfx_rect(0, 0, 320, 200), s->ega_colors[0], transparent);
s->iconbar_port->flags |= GFXW_FLAG_NO_IMPLICIT_SWITCH;
- if (s->resmgr->sci_version >= SCI_VERSION_01_VGA) {
+ if (s->resmgr->_sciVersion >= SCI_VERSION_01_VGA) {
// This bit sets the foreground and background colors in VGA SCI games
gfx_color_t fgcolor;
gfx_color_t bgcolor;
@@ -267,7 +267,7 @@ static void _free_graphics_input(EngineState *s) {
}
int game_init_sound(EngineState *s, int sound_flags) {
- if (s->resmgr->sci_version >= SCI_VERSION_01)
+ if (s->resmgr->_sciVersion >= SCI_VERSION_01)
sound_flags |= SFX_STATE_FLAG_MULTIPLAY;
s->sfx_init_flags = sound_flags;
@@ -611,7 +611,7 @@ int game_init(EngineState *s) {
s->successor = NULL; // No successor
s->status_bar_text = NULL; // Status bar is blank
s->status_bar_foreground = 0;
- s->status_bar_background = s->resmgr->sci_version >= SCI_VERSION_01_VGA ? 255 : 15;
+ s->status_bar_background = s->resmgr->_sciVersion >= SCI_VERSION_01_VGA ? 255 : 15;
SystemString *str = &s->sys_strings->strings[SYS_STRING_PARSER_BASE];
str->name = strdup("parser-base");
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index afd01ee17a..f36f34dd92 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -736,7 +736,7 @@ int script_map_kernel(EngineState *s) {
int mapped = 0;
int ignored = 0;
int functions_nr = s->kernel_names_nr;
- int max_functions_nr = sci_max_allowed_unknown_kernel_functions[s->resmgr->sci_version];
+ int max_functions_nr = sci_max_allowed_unknown_kernel_functions[s->resmgr->_sciVersion];
if (functions_nr < max_functions_nr) {
warning("SCI version believed to have %d kernel"
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index b90153e98d..522ca74d5b 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -270,7 +270,7 @@ void graph_restore_box(EngineState *s, reg_t handle) {
static gfx_pixmap_color_t white = {GFX_COLOR_INDEX_UNMAPPED, 255, 255, 255};
gfx_pixmap_color_t *get_pic_color(EngineState *s, int color) {
- if (s->resmgr->sci_version < SCI_VERSION_01_VGA)
+ if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA)
return &(s->ega_colors[color].visual);
if (color == 255)
@@ -287,7 +287,7 @@ gfx_pixmap_color_t *get_pic_color(EngineState *s, int color) {
static gfx_color_t graph_map_color(EngineState *s, int color, int priority, int control) {
gfx_color_t retval;
- if (s->resmgr->sci_version < SCI_VERSION_01_VGA) {
+ if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA) {
retval = s->ega_colors[(color >=0 && color < 16)? color : 0];
gfxop_set_color(s->gfx_state, &retval, (color < 0) ? -1 : retval.visual.r, retval.visual.g, retval.visual.b,
(color == -1) ? 255 : 0, priority, control);
@@ -506,7 +506,7 @@ reg_t kGraph(EngineState *s, int funct_nr, int argc, reg_t *argv) {
case K_GRAPH_GET_COLORS_NR:
- return make_reg(0, (s->resmgr->sci_version < SCI_VERSION_01_VGA) ? 0x10 : 0x100);
+ return make_reg(0, (s->resmgr->_sciVersion < SCI_VERSION_01_VGA) ? 0x10 : 0x100);
break;
case K_GRAPH_DRAW_LINE: {
@@ -2463,7 +2463,7 @@ reg_t kNewWindow(EngineState *s, int funct_nr, int argc, reg_t *argv) {
bgcolor.mask = 0;
if (SKPV_OR_ALT(8 + argextra, 255) >= 0) {
- if (s->resmgr->sci_version < SCI_VERSION_01_VGA)
+ if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA)
bgcolor.visual = *(get_pic_color(s, SKPV_OR_ALT(8 + argextra, 15)));
else
bgcolor.visual = *(get_pic_color(s, SKPV_OR_ALT(8 + argextra, 255)));
@@ -2481,7 +2481,7 @@ reg_t kNewWindow(EngineState *s, int funct_nr, int argc, reg_t *argv) {
black.visual = *(get_pic_color(s, 0));
black.mask = GFX_MASK_VISUAL;
black.alpha = 0;
- lWhite.visual = *(get_pic_color(s, s->resmgr->sci_version < SCI_VERSION_01_VGA ? 15 : 255)), lWhite.mask = GFX_MASK_VISUAL;
+ lWhite.visual = *(get_pic_color(s, s->resmgr->_sciVersion < SCI_VERSION_01_VGA ? 15 : 255)), lWhite.mask = GFX_MASK_VISUAL;
lWhite.alpha = 0;
window = sciw_new_window(s, gfx_rect(x, y, xl, yl), s->titlebar_port->font_nr, fgcolor, bgcolor,
@@ -3131,10 +3131,10 @@ reg_t kDisplay(EngineState *s, int funct_nr, int argc, reg_t *argv) {
temp = KP_SINT(argv[argpt++]);
SCIkdebug(SCIkGRAPHICS, "Display: set_color(%d)\n", temp);
- if ((s->resmgr->sci_version < SCI_VERSION_01_VGA) && temp >= 0 && temp <= 15)
+ if ((s->resmgr->_sciVersion < SCI_VERSION_01_VGA) && temp >= 0 && temp <= 15)
color0 = (s->ega_colors[temp]);
else
- if ((s->resmgr->sci_version >= SCI_VERSION_01_VGA) && temp >= 0 && temp < 256) {
+ if ((s->resmgr->_sciVersion >= SCI_VERSION_01_VGA) && temp >= 0 && temp < 256) {
color0.visual = *(get_pic_color(s, temp));
color0.mask = GFX_MASK_VISUAL;
} else
@@ -3148,10 +3148,10 @@ reg_t kDisplay(EngineState *s, int funct_nr, int argc, reg_t *argv) {
temp = KP_SINT(argv[argpt++]);
SCIkdebug(SCIkGRAPHICS, "Display: set_bg_color(%d)\n", temp);
- if ((s->resmgr->sci_version < SCI_VERSION_01_VGA) && temp >= 0 && temp <= 15)
+ if ((s->resmgr->_sciVersion < SCI_VERSION_01_VGA) && temp >= 0 && temp <= 15)
bg_color = s->ega_colors[temp];
else
- if ((s->resmgr->sci_version >= SCI_VERSION_01_VGA) && temp >= 0 && temp <= 256) {
+ if ((s->resmgr->_sciVersion >= SCI_VERSION_01_VGA) && temp >= 0 && temp <= 256) {
bg_color.visual = *get_pic_color(s, temp);
bg_color.mask = GFX_MASK_VISUAL;
} else
diff --git a/engines/sci/engine/savegame.cfsml b/engines/sci/engine/savegame.cfsml
index 9d8833715e..6de4b737fc 100644
--- a/engines/sci/engine/savegame.cfsml
+++ b/engines/sci/engine/savegame.cfsml
@@ -846,7 +846,7 @@ static int clone_entry_used(CloneTable *table, int n) {
}
static void load_script(EngineState *s, SegmentId seg) {
- resource_t *script, *heap = NULL;
+ Resource *script, *heap = NULL;
Script *scr = &(s->seg_manager->heap[seg]->data.script);
scr->buf = (byte *)malloc(scr->buf_size);
@@ -1007,7 +1007,7 @@ song_iterator_t *new_fast_forward_iterator(song_iterator_t *it, int delta);
static void reconstruct_sounds(EngineState *s) {
song_t *seeker;
- int it_type = s->resmgr->sci_version >= SCI_VERSION_01 ? SCI_SONG_ITERATOR_TYPE_SCI1 : SCI_SONG_ITERATOR_TYPE_SCI0;
+ int it_type = s->resmgr->_sciVersion >= SCI_VERSION_01 ? SCI_SONG_ITERATOR_TYPE_SCI1 : SCI_SONG_ITERATOR_TYPE_SCI0;
if (s->sound.songlib.lib)
seeker = *(s->sound.songlib.lib);
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index dedcc84090..02c11a5d7a 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -5103,7 +5103,7 @@ song_iterator_t *new_fast_forward_iterator(song_iterator_t *it, int delta);
static void reconstruct_sounds(EngineState *s) {
song_t *seeker;
- int it_type = s->resmgr->sci_version >= SCI_VERSION_01 ? SCI_SONG_ITERATOR_TYPE_SCI1 : SCI_SONG_ITERATOR_TYPE_SCI0;
+ int it_type = s->resmgr->_sciVersion >= SCI_VERSION_01 ? SCI_SONG_ITERATOR_TYPE_SCI1 : SCI_SONG_ITERATOR_TYPE_SCI0;
if (s->sound.songlib.lib)
seeker = *(s->sound.songlib.lib);
diff --git a/engines/sci/engine/scriptconsole.cpp b/engines/sci/engine/scriptconsole.cpp
index f46c3ccf5c..ca7cdcfd18 100644
--- a/engines/sci/engine/scriptconsole.cpp
+++ b/engines/sci/engine/scriptconsole.cpp
@@ -840,7 +840,7 @@ static int c_list(EngineState *s) {
if (res == -1)
sciprintf("Unknown resource type: '%s'\n", cmd_params[0].str);
else {
- for (i = 0; i < sci_max_resource_nr[s->resmgr->sci_version]; i++)
+ for (i = 0; i < sci_max_resource_nr[s->resmgr->_sciVersion]; i++)
if (s->resmgr->testResource(res, i))
sciprintf("%s.%03d\n", sci_resource_types[res], i);
}