aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-03-23 14:24:10 +0000
committerFilippos Karapetis2009-03-23 14:24:10 +0000
commit3b5a14916d43b2133c103ec168678bc98e224512 (patch)
tree39969d266c09c8474e650233586d8fe1e5777477 /engines
parent92e788dbb60e782151a81f33c22185b5de37b6b3 (diff)
downloadscummvm-rg350-3b5a14916d43b2133c103ec168678bc98e224512.tar.gz
scummvm-rg350-3b5a14916d43b2133c103ec168678bc98e224512.tar.bz2
scummvm-rg350-3b5a14916d43b2133c103ec168678bc98e224512.zip
Cleanup
svn-id: r39633
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/game.cpp16
-rw-r--r--engines/sci/gfx/gfx_resmgr.h20
2 files changed, 8 insertions, 28 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index 564bbf6598..d7c5249ca8 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -92,14 +92,6 @@ static void _free_vocabulary(EngineState *s) {
s->opcodes = NULL;
}
-
-static int _init_graphics_input(EngineState *s) {
- s->pic_priority_table = NULL;
- s->pics = NULL;
- s->pics_nr = 0;
- return 0;
-}
-
static void _sci1_alloc_system_colors(EngineState *s) {
gfx_color_t black = { PaletteEntry(0, 0, 0), 0, 0, 0, GFX_MASK_VISUAL };
gfxop_set_system_color(s->gfx_state, 0, &black);
@@ -509,8 +501,9 @@ int script_init_engine(EngineState *s, sci_version_t version) {
sciprintf("Engine initialized\n");
- if (_init_graphics_input(s))
- return 1;
+ s->pic_priority_table = NULL;
+ s->pics = NULL;
+ s->pics_nr = 0;
return 0;
}
@@ -525,11 +518,14 @@ void script_set_gamestate_save_dir(EngineState *s, const char *path) {
void internal_stringfrag_strncpy(EngineState *s, reg_t *dest, reg_t *src, int len);
+#if 0
+// Unreferenced - removed
void script_set_gamestate_save_dir(EngineState *s, reg_t path) {
SystemString *str = &s->sys_strings->strings[SYS_STRING_SAVEDIR];
reg_t *srcbuf = kernel_dereference_reg_pointer(s, path, 1);
internal_stringfrag_strncpy(s, str->value, srcbuf, MAX_SAVE_DIR_SIZE);
}
+#endif
void script_free_vm_memory(EngineState *s) {
sciprintf("Freeing VM memory\n");
diff --git a/engines/sci/gfx/gfx_resmgr.h b/engines/sci/gfx/gfx_resmgr.h
index cb18ca5ae7..8f5d02038a 100644
--- a/engines/sci/gfx/gfx_resmgr.h
+++ b/engines/sci/gfx/gfx_resmgr.h
@@ -60,7 +60,7 @@ enum gfx_resource_type_t {
struct gfx_resource_t {
int ID; /* Resource ID */
- int lock_sequence_nr; /* See description of lock_counter in gfx_resstate_t */
+ int lock_sequence_nr; /* See description of lock_counter in GfxResManager */
int mode; /* A mode type hash */
union {
@@ -84,21 +84,6 @@ struct gfx_options_t;
typedef Common::HashMap<int, gfx_resource_t *> IntResMap;
-struct gfx_resstate_t {
- int version; /* Interpreter version */
- gfx_options_t *options;
- gfx_driver_t *driver;
- Palette *static_palette;
- int lock_counter; /* Global lock counter; increased for each new resource allocated.
- ** The newly allocated resource will then be assigned the new value
- ** of the lock_counter, as will any resources referenced afterwards.
- */
- int tag_lock_counter; /* lock counter value at tag time */
-
- IntResMap _resourceMaps[GFX_RESOURCE_TYPES_NR];
- ResourceManager *resManager;
-};
-
class GfxResManager {
public:
@@ -195,8 +180,7 @@ public:
gfxr_pic_t *addToPic(int old_nr, int new_nr, int flags, int old_default_palette, int default_palette);
/* Calculate a picture
- ** Parameters: (gfx_resstate_t *) state: The resource state, containing options and version information
- ** (gfxr_pic_t *) scaled_pic: The pic structure that is to be written to
+ ** Parameters: (gfxr_pic_t *) scaled_pic: The pic structure that is to be written to
** (gfxr_pic_t *) unscaled_pic: The pic structure the unscaled pic is to be written to,
** or NULL if it isn't needed.
** (int) flags: Pic drawing flags (interpreter dependant)