aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/game.cpp
diff options
context:
space:
mode:
authorGreg Frieger2009-02-28 21:59:49 +0000
committerGreg Frieger2009-02-28 21:59:49 +0000
commit61ab59138a1e1ba1bac9cdb0dbf3c5372667930d (patch)
tree2c9095b54e01b8e0761f70a6d63bf71638d07b6b /engines/sci/engine/game.cpp
parent4f3a50913e3305d5e13986ada915451312cd3707 (diff)
downloadscummvm-rg350-61ab59138a1e1ba1bac9cdb0dbf3c5372667930d.tar.gz
scummvm-rg350-61ab59138a1e1ba1bac9cdb0dbf3c5372667930d.tar.bz2
scummvm-rg350-61ab59138a1e1ba1bac9cdb0dbf3c5372667930d.zip
resource_t struct replaced with stub Resource class for future objectifying. Also the crash when exiting SCI1 games was fixed
svn-id: r38982
Diffstat (limited to 'engines/sci/engine/game.cpp')
-rw-r--r--engines/sci/engine/game.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index 9d5f20043b..3b53dcb659 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -119,7 +119,7 @@ static void _sci1_alloc_system_colors(EngineState *s) {
}
int _reset_graphics_input(EngineState *s) {
- resource_t *resource;
+ Resource *resource;
int font_nr;
gfx_color_t transparent;
sciprintf("Initializing graphics\n");
@@ -279,7 +279,7 @@ int game_init_sound(EngineState *s, int sound_flags) {
/* Maps a class ID to the script the corresponding class is contained in
Returns the script number suggested by vocab.996, or -1 if there's none */
-static int suggested_script(resource_t *res, unsigned int classId) {
+static int suggested_script(Resource *res, unsigned int classId) {
int offset;
if (!res || classId >= res->size >> 2)
@@ -307,7 +307,7 @@ int create_class_table_sci11(EngineState *s) {
char *seeker_ptr;
int classnr;
- resource_t *vocab996 = s->resmgr->findResource(sci_vocab, 996, 1);
+ Resource *vocab996 = s->resmgr->findResource(sci_vocab, 996, 1);
if (!vocab996)
s->classtable_size = 20;
@@ -317,7 +317,7 @@ int create_class_table_sci11(EngineState *s) {
s->classtable = (Class*)sci_calloc(sizeof(Class), s->classtable_size);
for (scriptnr = 0; scriptnr < 1000; scriptnr++) {
- resource_t *heap = s->resmgr->findResource(sci_heap, scriptnr, 0);
+ Resource *heap = s->resmgr->findResource(sci_heap, scriptnr, 0);
if (heap) {
int global_vars = getUInt16(heap->data + 2);
@@ -362,7 +362,7 @@ static int create_class_table_sci0(EngineState *s) {
int classnr;
int magic_offset; // For strange scripts in older SCI versions
- resource_t *vocab996 = s->resmgr->findResource(sci_vocab, 996, 1);
+ Resource *vocab996 = s->resmgr->findResource(sci_vocab, 996, 1);
if (!vocab996)
s->classtable_size = 20;
@@ -373,7 +373,7 @@ static int create_class_table_sci0(EngineState *s) {
for (scriptnr = 0; scriptnr < 1000; scriptnr++) {
int objtype = 0;
- resource_t *script = s->resmgr->findResource(sci_script, scriptnr, 0);
+ Resource *script = s->resmgr->findResource(sci_script, scriptnr, 0);
if (script) {
if (s->version < SCI_VERSION_FTU_NEW_SCRIPT_HEADER)