[Scummvm-cvs-logs] SF.net SVN: scummvm:[38982] scummvm/trunk/engines/sci

gregfrieger at users.sourceforge.net gregfrieger at users.sourceforge.net
Sat Feb 28 22:59:49 CET 2009


Revision: 38982
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38982&view=rev
Author:   gregfrieger
Date:     2009-02-28 21:59:49 +0000 (Sat, 28 Feb 2009)

Log Message:
-----------
resource_t struct replaced with stub Resource class for future objectifying. Also the crash when exiting SCI1 games was fixed

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/game.cpp
    scummvm/trunk/engines/sci/engine/kmenu.cpp
    scummvm/trunk/engines/sci/engine/kscripts.cpp
    scummvm/trunk/engines/sci/engine/ksound.cpp
    scummvm/trunk/engines/sci/engine/kstring.cpp
    scummvm/trunk/engines/sci/engine/message.cpp
    scummvm/trunk/engines/sci/engine/message.h
    scummvm/trunk/engines/sci/engine/savegame.cpp
    scummvm/trunk/engines/sci/engine/scriptconsole.cpp
    scummvm/trunk/engines/sci/engine/scriptdebug.cpp
    scummvm/trunk/engines/sci/engine/seg_manager.cpp
    scummvm/trunk/engines/sci/engine/vm.cpp
    scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp
    scummvm/trunk/engines/sci/scicore/decompress0.cpp
    scummvm/trunk/engines/sci/scicore/decompress01.cpp
    scummvm/trunk/engines/sci/scicore/decompress1.cpp
    scummvm/trunk/engines/sci/scicore/decompress11.cpp
    scummvm/trunk/engines/sci/scicore/resource.cpp
    scummvm/trunk/engines/sci/scicore/resource.h
    scummvm/trunk/engines/sci/scicore/resource_map.cpp
    scummvm/trunk/engines/sci/scicore/resource_patch.cpp
    scummvm/trunk/engines/sci/scicore/script.cpp
    scummvm/trunk/engines/sci/scicore/vocab.cpp
    scummvm/trunk/engines/sci/scicore/vocab_debug.cpp
    scummvm/trunk/engines/sci/sfx/player/polled.cpp
    scummvm/trunk/engines/sci/sfx/player/realtime.cpp

Modified: scummvm/trunk/engines/sci/engine/game.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/game.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/engine/game.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -119,7 +119,7 @@
 }
 
 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 @@
 
 /* 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 @@
 	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 @@
 	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 @@
 	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 @@
 
 	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)

Modified: scummvm/trunk/engines/sci/engine/kmenu.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmenu.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/engine/kmenu.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -203,7 +203,7 @@
 	int page;
 	gfxw_port_t *port;
 	int bodyfont, titlefont;
-	resource_t *bodyfont_res = NULL;
+	Resource *bodyfont_res = NULL;
 	int i;
 
 	titlefont = s->titlebar_port->font_nr;

Modified: scummvm/trunk/engines/sci/engine/kscripts.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kscripts.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/engine/kscripts.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -129,7 +129,7 @@
 	int resnr = UKPV(1);
 	int state = argc > 2 ? UKPV(2) : 1;
 
-	resource_t *which;
+	Resource *which;
 
 	switch (state) {
 	case 1 :

Modified: scummvm/trunk/engines/sci/engine/ksound.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/ksound.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/engine/ksound.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -93,7 +93,7 @@
 
 static void script_set_priority(EngineState *s, reg_t obj, int priority) {
 	int song_nr = GET_SEL32V(obj, number);
-	resource_t *song = s->resmgr->findResource(sci_sound, song_nr, 0);
+	Resource *song = s->resmgr->findResource(sci_sound, song_nr, 0);
 	int flags = GET_SEL32V(obj, flags);
 
 	if (priority == -1) {
@@ -110,7 +110,7 @@
 }
 
 song_iterator_t *build_iterator(EngineState *s, int song_nr, int type, songit_id_t id) {
-	resource_t *song = s->resmgr->findResource(sci_sound, song_nr, 0);
+	Resource *song = s->resmgr->findResource(sci_sound, song_nr, 0);
 
 	if (!song)
 		return NULL;

Modified: scummvm/trunk/engines/sci/engine/kstring.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kstring.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -41,7 +41,7 @@
 /* Returns the string the script intended to address */
 char *kernel_lookup_text(EngineState *s, reg_t address, int index) {
 	char *seeker;
-	resource_t *textres;
+	Resource *textres;
 
 	if (address.segment)
 		return (char *)kernel_dereference_bulk_pointer(s, address, 0);
@@ -709,7 +709,7 @@
 
 
 reg_t kGetFarText(EngineState *s, int funct_nr, int argc, reg_t *argv) {
-	resource_t *textres = s->resmgr->findResource(sci_text, UKPV(0), 0);
+	Resource *textres = s->resmgr->findResource(sci_text, UKPV(0), 0);
 	char *seeker;
 	int counter = UKPV(1);
 

Modified: scummvm/trunk/engines/sci/engine/message.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/message.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/engine/message.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -186,7 +186,7 @@
 };
 
 void message_state_initialize(ResourceManager *resmgr, MessageState *state) {
-	//resource_t *tester = resmgr->findResource(sci_message, 0, 0);
+	//Resource *tester = resmgr->findResource(sci_message, 0, 0);
 	//int version;
 
 	//if (tester == NULL)

Modified: scummvm/trunk/engines/sci/engine/message.h
===================================================================
--- scummvm/trunk/engines/sci/engine/message.h	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/engine/message.h	2009-02-28 21:59:49 UTC (rev 38982)
@@ -64,7 +64,7 @@
 	int initialized;
 	MessageHandler *handler;
 	ResourceManager *resmgr;
-	resource_t *current_res;
+	Resource *current_res;
 	int module;
 	int record_count;
 	byte *index_records;

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -4942,7 +4942,7 @@
 }
 
 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);

Modified: scummvm/trunk/engines/sci/engine/scriptconsole.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptconsole.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/engine/scriptconsole.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -913,7 +913,7 @@
 	if (res == -1)
 		sciprintf("Resource type '%s' is not valid\n", cmd_params[0].str);
 	else {
-		resource_t *resource = s->resmgr->findResource(res, cmd_params[1].val, 0);
+		Resource *resource = s->resmgr->findResource(res, cmd_params[1].val, 0);
 		if (resource) {
 			sciprintf("Size: %d\n", resource->size);
 		} else
@@ -929,7 +929,7 @@
 	if (res == -1)
 		sciprintf("Resource type '%s' is not valid\n", cmd_params[0].str);
 	else {
-		resource_t *resource = s->resmgr->findResource(res, cmd_params[1].val, 0);
+		Resource *resource = s->resmgr->findResource(res, cmd_params[1].val, 0);
 		if (resource)
 			sci_hexdump(resource->data, resource->size, 0);
 		else
@@ -942,7 +942,7 @@
 static int c_hexgrep(EngineState *s) {
 	int i, seeklen, resnr, restype, resmax;
 	unsigned char *seekstr = NULL;
-	resource_t *script = NULL;
+	Resource *script = NULL;
 	char *dot = strchr(cmd_params[0].str, '.');
 
 	if (NULL == s) {

Modified: scummvm/trunk/engines/sci/engine/scriptdebug.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -245,7 +245,7 @@
 #undef SONGDATA
 
 int c_sfx_01_header(EngineState *s) {
-	resource_t *song = s->resmgr->findResource(sci_sound, cmd_params[0].val, 0);
+	Resource *song = s->resmgr->findResource(sci_sound, cmd_params[0].val, 0);
 
 	if (!song) {
 		sciprintf("Doesn't exist\n");
@@ -258,7 +258,7 @@
 }
 
 int c_sfx_01_track(EngineState *s) {
-	resource_t *song = s->resmgr->findResource(sci_sound, cmd_params[0].val, 0);
+	Resource *song = s->resmgr->findResource(sci_sound, cmd_params[0].val, 0);
 
 	int offset = cmd_params[1].val;
 
@@ -2406,7 +2406,7 @@
 }
 
 static int c_is_sample(EngineState *s) {
-	resource_t *song = s->resmgr->findResource(sci_sound, cmd_params[0].val, 0);
+	Resource *song = s->resmgr->findResource(sci_sound, cmd_params[0].val, 0);
 	song_iterator_t *songit;
 	sfx_pcm_feed_t *data;
 

Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -152,8 +152,8 @@
 }
 
 void SegManager::setScriptSize(MemObject *mem, EngineState *s, int script_nr) {
-	resource_t *script = s->resmgr->findResource(sci_script, script_nr, 0);
-	resource_t *heap = s->resmgr->findResource(sci_heap, script_nr, 0);
+	Resource *script = s->resmgr->findResource(sci_script, script_nr, 0);
+	Resource *heap = s->resmgr->findResource(sci_heap, script_nr, 0);
 
 	mem->data.script.script_size = script->size;
 	mem->data.script.heap_size = 0; // Set later

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -1593,7 +1593,7 @@
 // Detects SCI versions by their different script header
 void script_detect_versions(EngineState *s) {
 	int c;
-	resource_t *script = {0};
+	Resource *script = {0};
 
 	if (s->resmgr->findResource(sci_heap, 0, 0)) {
 		version_require_later_than(s, SCI_VERSION(1, 001, 000));
@@ -1670,7 +1670,7 @@
 
 #define INST_LOOKUP_CLASS(id) ((id == 0xffff)? NULL_REG : get_class_address(s, id, SCRIPT_GET_LOCK, reg))
 
-int script_instantiate_common(EngineState *s, int script_nr, resource_t **script, resource_t **heap, int *was_new) {
+int script_instantiate_common(EngineState *s, int script_nr, Resource **script, Resource **heap, int *was_new) {
 	int seg;
 	int seg_id;
 	int marked_for_deletion;
@@ -1740,7 +1740,7 @@
 	int seg_id;
 	int relocation = -1;
 	int magic_pos_adder; // Usually 0; 2 for older SCI versions
-	resource_t *script;
+	Resource *script;
 	int was_new;
 
 	seg_id = script_instantiate_common(s, script_nr, &script, NULL, &was_new);
@@ -1888,7 +1888,7 @@
 }
 
 int script_instantiate_sci11(EngineState *s, int script_nr) {
-	resource_t *script, *heap;
+	Resource *script, *heap;
 	int seg_id;
 	int heap_start;
 	reg_t reg;

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -71,7 +71,7 @@
 int gfxr_interpreter_calculate_pic(gfx_resstate_t *state, gfxr_pic_t *scaled_pic, gfxr_pic_t *unscaled_pic,
 	int flags, int default_palette, int nr, void *internal) {
 	ResourceManager *resmgr = (ResourceManager *)state->misc_payload;
-	resource_t *res = resmgr->findResource(sci_pic, nr, 0);
+	Resource *res = resmgr->findResource(sci_pic, nr, 0);
 	int need_unscaled = unscaled_pic != NULL;
 	gfxr_pic0_params_t style, basic_style;
 
@@ -149,7 +149,7 @@
 
 gfxr_view_t *gfxr_interpreter_get_view(gfx_resstate_t *state, int nr, void *internal, int palette) {
 	ResourceManager *resmgr = (ResourceManager *) state->misc_payload;
-	resource_t *res = resmgr->findResource(sci_view, nr, 0);
+	Resource *res = resmgr->findResource(sci_view, nr, 0);
 	int resid = GFXR_RES_ID(GFX_RESOURCE_TYPE_VIEW, nr);
 	gfxr_view_t *result = 0;
 
@@ -188,7 +188,7 @@
 
 gfx_bitmap_font_t *gfxr_interpreter_get_font(gfx_resstate_t *state, int nr, void *internal) {
 	ResourceManager *resmgr = (ResourceManager *)state->misc_payload;
-	resource_t *res = resmgr->findResource(sci_font, nr, 0);
+	Resource *res = resmgr->findResource(sci_font, nr, 0);
 	if (!res || !res->data)
 		return NULL;
 
@@ -197,7 +197,7 @@
 
 gfx_pixmap_t *gfxr_interpreter_get_cursor(gfx_resstate_t *state, int nr, void *internal) {
 	ResourceManager *resmgr = (ResourceManager *) state->misc_payload;
-	resource_t *res = resmgr->findResource(sci_cursor, nr, 0);
+	Resource *res = resmgr->findResource(sci_cursor, nr, 0);
 	int resid = GFXR_RES_ID(GFX_RESOURCE_TYPE_CURSOR, nr);
 
 	if (!res || !res->data)
@@ -265,7 +265,7 @@
 
 gfx_pixmap_color_t *gfxr_interpreter_get_palette(gfx_resstate_t *state, int version, int *colors_nr, void *internal, int nr) {
 	ResourceManager *resmgr = (ResourceManager *)state->misc_payload;
-	resource_t *res;
+	Resource *res;
 
 	if (version < SCI_VERSION_01_VGA)
 		return NULL;

Modified: scummvm/trunk/engines/sci/scicore/decompress0.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/decompress0.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/scicore/decompress0.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -234,7 +234,7 @@
 	return compressionMethod;
 }
 
-int decompress0(resource_t *result, Common::ReadStream &stream, int sci_version) {
+int decompress0(Resource *result, Common::ReadStream &stream, int sci_version) {
 	uint16 compressedLength;
 	uint16 compressionMethod;
 	uint8 *buffer;

Modified: scummvm/trunk/engines/sci/scicore/decompress01.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/decompress01.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/scicore/decompress01.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -490,7 +490,7 @@
 	return outbuffer;
 }
 
-int decompress01(resource_t *result, Common::ReadStream &stream, int sci_version) {
+int decompress01(Resource *result, Common::ReadStream &stream, int sci_version) {
 	uint16 compressedLength;
 	uint16 compressionMethod;
 	uint8 *buffer;

Modified: scummvm/trunk/engines/sci/scicore/decompress1.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/decompress1.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/scicore/decompress1.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -267,7 +267,7 @@
 void decryptinit3();
 int decrypt3(uint8* dest, uint8* src, int length, int complength);
 
-int decompress1(resource_t *result, Common::ReadStream &stream, int sci_version) {
+int decompress1(Resource *result, Common::ReadStream &stream, int sci_version) {
 	uint16 compressedLength;
 	uint16 compressionMethod;
 	uint8 *buffer;

Modified: scummvm/trunk/engines/sci/scicore/decompress11.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/decompress11.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/scicore/decompress11.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -38,7 +38,7 @@
 int decrypt3(uint8* dest, uint8* src, int length, int complength);
 int decrypt4(uint8* dest, uint8* src, int length, int complength);
 
-int decompress11(resource_t *result, Common::ReadStream &stream, int sci_version) {
+int decompress11(Resource *result, Common::ReadStream &stream, int sci_version) {
 	uint16 compressedLength;
 	uint16 compressionMethod;
 	uint8 *buffer;

Modified: scummvm/trunk/engines/sci/scicore/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/scicore/resource.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -81,8 +81,8 @@
 
 int resourcecmp(const void *first, const void *second);
 
-typedef int decomp_funct(resource_t *result, Common::ReadStream &stream, int sci_version);
-typedef void patch_sprintf_funct(char *string, resource_t *res);
+typedef int decomp_funct(Resource *result, Common::ReadStream &stream, int sci_version);
+typedef void patch_sprintf_funct(char *string, Resource *res);
 
 static decomp_funct *decompressors[] = {
 	NULL,
@@ -110,21 +110,21 @@
 
 
 int resourcecmp(const void *first, const void *second) {
-	if (((resource_t *)first)->type ==
-	        ((resource_t *)second)->type)
-		return (((resource_t *)first)->number <
-		        ((resource_t *)second)->number) ? -1 :
-		       !(((resource_t *)first)->number ==
-		         ((resource_t *)second)->number);
+	if (((Resource *)first)->type ==
+	        ((Resource *)second)->type)
+		return (((Resource *)first)->number <
+		        ((Resource *)second)->number) ? -1 :
+		       !(((Resource *)first)->number ==
+		         ((Resource *)second)->number);
 	else
-		return (((resource_t *)first)->type <
-		        ((resource_t *)second)->type) ? -1 : 1;
+		return (((Resource *)first)->type <
+		        ((Resource *)second)->type) ? -1 : 1;
 }
 
 
 //-- Resmgr helper functions --
 
-void ResourceManager::addAltSource(resource_t *res, ResourceSource *source, unsigned int file_offset) {
+void ResourceManager::addAltSource(Resource *res, ResourceSource *source, unsigned int file_offset) {
 	resource_altsource_t *rsrc = (resource_altsource_t *)sci_malloc(sizeof(resource_altsource_t));
 
 	rsrc->next = res->alt_sources;
@@ -133,7 +133,7 @@
 	res->alt_sources = rsrc;
 }
 
-resource_t *ResourceManager::findResourceUnsorted(resource_t *res, int res_nr, int type, int number) {
+Resource *ResourceManager::findResourceUnsorted(Resource *res, int res_nr, int type, int number) {
 	int i;
 	for (i = 0; i < res_nr; i++)
 		if (res[i].number == number && res[i].type == type)
@@ -203,7 +203,7 @@
 
 // Resource manager constructors and operations
 
-void ResourceManager::loadFromPatchFile(Common::File &file, resource_t *res, char *filename) {
+void ResourceManager::loadFromPatchFile(Common::File &file, Resource *res, char *filename) {
 	unsigned int really_read;
 
 	res->data = (unsigned char *)sci_malloc(res->size);
@@ -216,12 +216,12 @@
 	res->status = SCI_STATUS_ALLOCATED;
 }
 
-void ResourceManager::loadResource(resource_t *res, bool protect) {
+void ResourceManager::loadResource(Resource *res, bool protect) {
 	char filename[MAXPATHLEN];
 	Common::File file;
-	resource_t backup;
+	Resource backup;
 
-	memcpy(&backup, res, sizeof(resource_t));
+	memcpy(&backup, res, sizeof(Resource));
 
 	// First try lower-case name
 	if (res->source->source_type == RESSOURCE_TYPE_DIRECTORY) {
@@ -261,7 +261,7 @@
 			          error, sci_resource_types[res->type], res->number, sci_error_types[error]);
 
 			if (protect)
-				memcpy(res, &backup, sizeof(resource_t));
+				memcpy(res, &backup, sizeof(Resource));
 
 			res->data = NULL;
 			res->status = SCI_STATUS_NOMALLOC;
@@ -271,11 +271,11 @@
 
 }
 
-resource_t *ResourceManager::testResource(int type, int number) {
-	resource_t binseeker;
+Resource *ResourceManager::testResource(int type, int number) {
+	Resource binseeker;
 	binseeker.type = type;
 	binseeker.number = number;
-	return (resource_t *)bsearch(&binseeker, _resources, _resourcesNr, sizeof(resource_t), resourcecmp);
+	return (Resource *)bsearch(&binseeker, _resources, _resourcesNr, sizeof(Resource), resourcecmp);
 }
 
 int sci0_get_compression_method(Common::ReadStream &stream);
@@ -284,7 +284,7 @@
 	Common::File file;
 	char filename[MAXPATHLEN];
 	int compression;
-	resource_t *res;
+	Resource *res;
 	int i;
 
 	mgr->sci_version = SCI_VERSION_AUTODETECT;
@@ -367,7 +367,7 @@
 	int preset_version = sci_version;
 	int resource_error = 0;
 	int dummy = sci_version;
-	//resource_t **concat_ptr = &(mgr->_resources[mgr->_resourcesNr - 1].next);
+	//Resource **concat_ptr = &(mgr->_resources[mgr->_resourcesNr - 1].next);
 
 	if (detected_version == NULL)
 		detected_version = &dummy;
@@ -404,7 +404,7 @@
 				if (resource_error == SCI_ERROR_NO_RESOURCE_FILES_FOUND) {
 					// Initialize empty resource manager
 					mgr->_resourcesNr = 0;
-					mgr->_resources = 0; // FIXME: Was = (resource_t*)sci_malloc(1);
+					mgr->_resources = 0; // FIXME: Was = (Resource*)sci_malloc(1);
 					resource_error = 0;
 				}
 #endif
@@ -421,7 +421,7 @@
 				if (resource_error == SCI_ERROR_NO_RESOURCE_FILES_FOUND) {
 					// Initialize empty resource manager
 					_resourcesNr = 0;
-					_resources = 0; // FIXME: Was = (resource_t*)sci_malloc(1);
+					_resources = 0; // FIXME: Was = (Resource*)sci_malloc(1);
 					resource_error = 0;
 				}
 			}
@@ -431,7 +431,7 @@
 		default:
 			break;
 		}
-		qsort(_resources, _resourcesNr, sizeof(resource_t), resourcecmp); // Sort resources
+		qsort(_resources, _resourcesNr, sizeof(Resource), resourcecmp); // Sort resources
 	}
 	return resource_error;
 }
@@ -474,7 +474,7 @@
 //		return NULL;
 	}
 
-	qsort(_resources, _resourcesNr, sizeof(resource_t), resourcecmp); // Sort resources
+	qsort(_resources, _resourcesNr, sizeof(Resource), resourcecmp); // Sort resources
 
 	if (version == SCI_VERSION_AUTODETECT)
 		switch (resmap_version) {
@@ -515,7 +515,7 @@
 			sciprintf("Resmgr: Detected Jones/CD or similar\n");
 			break;
 		case SCI_VERSION_1: {
-			resource_t *res = testResource(sci_script, 0);
+			Resource *res = testResource(sci_script, 0);
 
 			sci_version = version = SCI_VERSION_1_EARLY;
 			loadResource(res, true);
@@ -533,7 +533,7 @@
 		}
 
 	if (!resource_error) {
-		qsort(_resources, _resourcesNr, sizeof(resource_t), resourcecmp); // Sort resources
+		qsort(_resources, _resourcesNr, sizeof(Resource), resourcecmp); // Sort resources
 	}
 
 	sci_version = version;
@@ -546,11 +546,11 @@
 	}
 }
 
-void ResourceManager::freeResources(resource_t *resources, int _resourcesNr) {
+void ResourceManager::freeResources(Resource *resources, int _resourcesNr) {
 	int i;
 
 	for (i = 0; i < _resourcesNr; i++) {
-		resource_t *res = resources + i;
+		Resource *res = resources + i;
 
 		// FIXME: alt_sources->next may point to an invalid memory location
 		freeAltSources(res->alt_sources);
@@ -568,13 +568,13 @@
 	_resources = NULL;
 }
 
-void ResourceManager::unalloc(resource_t *res) {
+void ResourceManager::unalloc(Resource *res) {
 	free(res->data);
 	res->data = NULL;
 	res->status = SCI_STATUS_NOMALLOC;
 }
 
-void ResourceManager::removeFromLRU(resource_t *res) {
+void ResourceManager::removeFromLRU(Resource *res) {
 	if (res->status != SCI_STATUS_ENQUEUED) {
 		sciprintf("Resmgr: Oops: trying to remove resource that isn't enqueued\n");
 		return;
@@ -594,7 +594,7 @@
 	res->status = SCI_STATUS_ALLOCATED;
 }
 
-void ResourceManager::addToLRU(resource_t *res) {
+void ResourceManager::addToLRU(Resource *res) {
 	if (res->status != SCI_STATUS_ALLOCATED) {
 		sciprintf("Resmgr: Oops: trying to enqueue resource with state %d\n", res->status);
 		return;
@@ -622,7 +622,7 @@
 void ResourceManager::printLRU() {
 	int mem = 0;
 	int entries = 0;
-	resource_t *res = lru_first;
+	Resource *res = lru_first;
 
 	while (res) {
 		fprintf(stderr, "\t%s.%03d: %d bytes\n",
@@ -639,7 +639,7 @@
 
 void ResourceManager::freeOldResources(int last_invulnerable) {
 	while (_maxMemory < _memoryLRU && (!last_invulnerable || lru_first != lru_last)) {
-		resource_t *goner = lru_last;
+		Resource *goner = lru_last;
 		if (!goner) {
 			fprintf(stderr, "Internal error: mgr->lru_last is NULL!\n");
 			fprintf(stderr, "LRU-mem= %d\n", _memoryLRU);
@@ -655,8 +655,8 @@
 	}
 }
 
-resource_t *ResourceManager::findResource(int type, int number, int lock) {
-	resource_t *retval;
+Resource *ResourceManager::findResource(int type, int number, int lock) {
+	Resource *retval;
 
 	if (number >= sci_max_resource_nr[sci_version]) {
 		int modded_number = number % sci_max_resource_nr[sci_version];
@@ -702,7 +702,7 @@
 	}
 }
 
-void ResourceManager::unlockResource(resource_t *res, int resnum, int restype) {
+void ResourceManager::unlockResource(Resource *res, int resnum, int restype) {
 	if (!res) {
 		if (restype >= ARRAYSIZE(sci_resource_types))
 			sciprintf("Resmgr: Warning: Attempt to unlock non-existant resource %03d.%03d!\n", restype, resnum);

Modified: scummvm/trunk/engines/sci/scicore/resource.h
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource.h	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/scicore/resource.h	2009-02-28 21:59:49 UTC (rev 38982)
@@ -83,7 +83,7 @@
 
 #define SCI_VERSION_1 SCI_VERSION_1_EARLY
 
-enum ResourceType {
+enum ResSourceType {
 	RESSOURCE_TYPE_DIRECTORY = 0,
 	RESSOURCE_TYPE_VOLUME = 2,
 	RESSOURCE_TYPE_EXTERNAL_MAP = 3,
@@ -123,7 +123,7 @@
 typedef struct resource_index_struct resource_index_t;
 
 struct ResourceSource {
-	ResourceType source_type;
+	ResSourceType source_type;
 	bool scanned;
 	Common::String location_name;	// FIXME: Replace by FSNode ?
 	Common::String location_dir_name;	// FIXME: Get rid of this again, only a temporary HACK!
@@ -140,24 +140,22 @@
 
 
 /** Struct for storing resources in memory */
-struct resource_t {
-	unsigned char *data;
+class Resource {
 
+public:
+// NOTE : Currently all member data has the same name and public visibility
+// to let the rest of the engine compile without changes
+	unsigned char *data;
 	unsigned short number;
 	unsigned short type;
 	uint16 id; /* contains number and type */
-
 	unsigned int size;
-
 	unsigned int file_offset; /* Offset in file */
-	ResourceSource *source;
-
 	unsigned char status;
 	unsigned short lockers; /* Number of places where this resource was locked */
-
-	resource_t *next; /* Position marker for the LRU queue */
-	resource_t *prev;
-
+	Resource *next; /* Position marker for the LRU queue */
+	Resource *prev;
+	ResourceSource *source;
 	resource_altsource_t *alt_sources; /* SLL of alternative resource data sources */
 };
 
@@ -207,74 +205,74 @@
 	/**	@param type: The resource type to look for
 	 *	@param number: The resource number to search
 	 *	@param lock: non-zero iff the resource should be locked
-	 *	@return (resource_t *): The resource, or NULL if it doesn't exist
+	 *	@return (Resource *): The resource, or NULL if it doesn't exist
 	 *	@note Locked resources are guaranteed not to have their contents freed until
 	 *		they are unlocked explicitly (by unlockResource).
 	 */
-	resource_t *findResource(int type, int number, int lock);
+	Resource *findResource(int type, int number, int lock);
 	/* Unlocks a previously locked resource
-	**             (resource_t *) res: The resource to free
+	**             (Resource *) res: The resource to free
 	**             (int) type: Type of the resource to check (for error checking)
 	**             (int) number: Number of the resource to check (ditto)
 	** Returns   : (void)
 	*/
-	void unlockResource(resource_t *res, int restype, int resnum);
+	void unlockResource(Resource *res, int restype, int resnum);
 	/* Tests whether a resource exists
 	**             (int) type: Type of the resource to check
 	**             (int) number: Number of the resource to check
-	** Returns   : (resource_t *) non-NULL if the resource exists, NULL otherwise
+	** Returns   : (Resource *) non-NULL if the resource exists, NULL otherwise
 	** This function may often be much faster than finding the resource
 	** and should be preferred for simple tests.
 	** The resource object returned is, indeed, the resource in question, but
 	** it should be used with care, as it may be unallocated.
 	** Use scir_find_resource() if you want to use the data contained in the resource.
 	*/
-	resource_t *testResource(int type, int number);
+	Resource *testResource(int type, int number);
 
 protected:
 	int _maxMemory; /* Config option: Maximum total byte number allocated */
 	int _resourcesNr;
 	ResourceSource *_sources;
-	resource_t *_resources;
+	Resource *_resources;
 	int _memoryLocked;	// Amount of resource bytes in locked memory
 	int _memoryLRU;		// Amount of resource bytes under LRU control
-	resource_t *lru_first, *lru_last;	// Pointers to the first and last LRU queue entries
+	Resource *lru_first, *lru_last;	// Pointers to the first and last LRU queue entries
 										// LRU queue: lru_first points to the most recent entry
 
 
 	/* Frees a block of resources and associated data
-	** Parameters: (resource_t *) resources: The resources to free
+	** Parameters: (Resource *) resources: The resources to free
 	**             (int) _resourcesNr: Number of resources in the block
 	** Returns   : (void)
 	*/
-	void freeResources(resource_t *resources, int _resourcesNr);
-	/* Finds a resource matching type.number in an unsorted resource_t block
+	void freeResources(Resource *resources, int _resourcesNr);
+	/* Finds a resource matching type.number in an unsorted Resource block
 	** To be used during initial resource loading, when the resource list
 	** may not have been sorted yet.
-	** Parameters: (resource_t *) res: Pointer to the block to search in
-	**             (int) res_nr: Number of resource_t structs allocated and defined
+	** Parameters: (Resource *) res: Pointer to the block to search in
+	**             (int) res_nr: Number of Resource structs allocated and defined
 	**                           in the block pointed to by res
 	**             (int) type: Type of the resource to look for
 	**             (int) number: Number of the resource to look for
-	** Returns   : (resource_t) The matching resource entry, or NULL if not found
+	** Returns   : (Resource) The matching resource entry, or NULL if not found
 	*/
-	resource_t *findResourceUnsorted(resource_t *res, int res_nr, int type, int number);
+	Resource *findResourceUnsorted(Resource *res, int res_nr, int type, int number);
 	/* Adds an alternative source to a resource
-	** Parameters: (resource_t *) res: The resource to add to
+	** Parameters: (Resource *) res: The resource to add to
 	**             (ResourceSource *) source: The source of the resource
 	**             (unsigned int) file_offset: Offset in the file the resource
 	**                            is stored at
 	** Returns   : (void)
 	*/
 	int addAppropriateSources();
-	void addAltSource(resource_t *res, ResourceSource *source, unsigned int file_offset);
+	void addAltSource(Resource *res, ResourceSource *source, unsigned int file_offset);
 	void freeResourceSources(ResourceSource *rss);
 	void freeAltSources(resource_altsource_t *dynressrc);
 
-	void loadResource(resource_t *res, bool protect);
-	void loadFromPatchFile(Common::File &file, resource_t *res, char *filename);
+	void loadResource(Resource *res, bool protect);
+	void loadFromPatchFile(Common::File &file, Resource *res, char *filename);
 	void freeOldResources(int last_invulnerable);
-	void unalloc(resource_t *res);
+	void unalloc(Resource *res);
 
 	/**--- Resource map decoding functions ---*/
 
@@ -292,7 +290,7 @@
 	int readResourceMapSCI1(ResourceSource *map, ResourceSource *vol, int *sci_version);
 	int isSCI10or11(int *types);
 	int detectOddSCI01(Common::File &file);
-	int resReadEntry(ResourceSource *map, byte *buf, resource_t *res, int sci_version);
+	int resReadEntry(ResourceSource *map, byte *buf, Resource *res, int sci_version);
 	int resTypeSCI1(int ofs, int *types, int lastrt);
 	int parseHeaderSCI1(Common::ReadStream &stream, int *types, int *lastrt);
 
@@ -300,7 +298,7 @@
 
 	/* Reads SCI0 patch files from a local directory
 	** Parameters: (char *) path: (unused)
-	**             (resource_t **) resources: Pointer to a pointer
+	**             (Resource **) resources: Pointer to a pointer
 	**                                        that will be set to the
 	**                                        location of the resources
 	**                                        (in one large chunk)
@@ -312,7 +310,7 @@
 
 	/* Reads SCI1 patch files from a local directory
 	** Parameters: (char *) path: (unused)
-	**             (resource_t **) resources: Pointer to a pointer
+	**             (Resource **) resources: Pointer to a pointer
 	**                                        that will be set to the
 	**                                        location of the resources
 	**                                        (in one large chunk)
@@ -325,49 +323,49 @@
 		int resnumber);
 
 	void printLRU();
-	void addToLRU(resource_t *res);
-	void removeFromLRU(resource_t *res);
+	void addToLRU(Resource *res);
+	void removeFromLRU(Resource *res);
 };
 
 
 	/* Prints the name of a matching patch to a string buffer
 	** Parameters: (char *) string: The buffer to print to
-	**             (resource_t *) res: Resource containing the number and type of the
+	**             (Resource *) res: Resource containing the number and type of the
 	**                                 resource whose name is to be print
 	** Returns   : (void)
 	*/
-	void sci0_sprintf_patch_file_name(char *string, resource_t *res);
+	void sci0_sprintf_patch_file_name(char *string, Resource *res);
 
 	/* Prints the name of a matching patch to a string buffer
 	** Parameters: (char *) string: The buffer to print to
-	**             (resource_t *) res: Resource containing the number and type of the
+	**             (Resource *) res: Resource containing the number and type of the
 	**                                 resource whose name is to be print
 	** Returns   : (void)
 	*/
-	void sci1_sprintf_patch_file_name(char *string, resource_t *res);
+	void sci1_sprintf_patch_file_name(char *string, Resource *res);
 
 	/**--- Decompression functions ---**/
-	int decompress0(resource_t *result, Common::ReadStream &stream, int sci_version);
+	int decompress0(Resource *result, Common::ReadStream &stream, int sci_version);
 	/* Decrypts resource data and stores the result for SCI0-style compression.
-	** Parameters : result: The resource_t the decompressed data is stored in.
+	** Parameters : result: The Resource the decompressed data is stored in.
 	**              stream: Stream of the resource file
 	**              sci_version : Actual SCI resource version
 	** Returns    : (int) 0 on success, one of SCI_ERROR_* if a problem was
 	**               encountered.
 	*/
 
-	int decompress01(resource_t *result, Common::ReadStream &stream, int sci_version);
+	int decompress01(Resource *result, Common::ReadStream &stream, int sci_version);
 	/* Decrypts resource data and stores the result for SCI01-style compression.
-	** Parameters : result: The resource_t the decompressed data is stored in.
+	** Parameters : result: The Resource the decompressed data is stored in.
 	**              stream: Stream of the resource file
 	**              sci_version : Actual SCI resource version
 	** Returns    : (int) 0 on success, one of SCI_ERROR_* if a problem was
 	**               encountered.
 	*/
 
-	int decompress1(resource_t *result, Common::ReadStream &stream, int sci_version);
+	int decompress1(Resource *result, Common::ReadStream &stream, int sci_version);
 	/* Decrypts resource data and stores the result for SCI1.1-style compression.
-	** Parameters : result: The resource_t the decompressed data is stored in.
+	** Parameters : result: The Resource the decompressed data is stored in.
 	**              sci_version : Actual SCI resource version
 	**              stream: Stream of the resource file
 	** Returns    : (int) 0 on success, one of SCI_ERROR_* if a problem was
@@ -375,9 +373,9 @@
 	*/
 
 
-	int decompress11(resource_t *result, Common::ReadStream &stream, int sci_version);
+	int decompress11(Resource *result, Common::ReadStream &stream, int sci_version);
 	/* Decrypts resource data and stores the result for SCI1.1-style compression.
-	** Parameters : result: The resource_t the decompressed data is stored in.
+	** Parameters : result: The Resource the decompressed data is stored in.
 	**              sci_version : Actual SCI resource version
 	**              stream: Stream of the resource file
 	** Returns    : (int) 0 on success, one of SCI_ERROR_* if a problem was

Modified: scummvm/trunk/engines/sci/scicore/resource_map.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource_map.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/scicore/resource_map.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -119,7 +119,7 @@
 	return files_ok;
 }
 
-int ResourceManager::resReadEntry(ResourceSource *map, byte *buf, resource_t *res, int sci_version) {
+int ResourceManager::resReadEntry(ResourceSource *map, byte *buf, Resource *res, int sci_version) {
 	res->id = buf[0] | (buf[1] << 8);
 	res->type = SCI0_RESID_GET_TYPE(buf);
 	res->number = SCI0_RESID_GET_NUMBER(buf);
@@ -200,7 +200,7 @@
 int ResourceManager::readResourceMapSCI0(ResourceSource *map, int *sci_version) {
 	int fsize;
 	Common::File file;
-	resource_t *resources;
+	Resource *resources;
 	int resource_nr;
 	int resource_index = 0;
 	int resources_total_read = 0;
@@ -257,7 +257,7 @@
 
 	resource_nr = fsize / SCI0_RESMAP_ENTRIES_SIZE;
 
-	resources = (resource_t *)sci_calloc(resource_nr, sizeof(resource_t));
+	resources = (Resource *)sci_calloc(resource_nr, sizeof(Resource));
 	// Sets valid default values for most entries
 
 	do {
@@ -330,7 +330,7 @@
 	}
 
 	if (resource_index < resource_nr)
-		resources = (resource_t *)sci_realloc(resources, sizeof(resource_t) * resource_index);
+		resources = (Resource *)sci_realloc(resources, sizeof(Resource) * resource_index);
 
 	_resources = resources;
 	_resourcesNr = resource_index;
@@ -374,7 +374,7 @@
 int ResourceManager::readResourceMapSCI1(ResourceSource *map, ResourceSource *vol, int *sci_version) {
 	int fsize;
 	Common::File file;
-	resource_t *resources, *resource_start;
+	Resource *resources, *resource_start;
 	int resource_nr;
 	int resource_index = 0;
 	int ofs, header_size;
@@ -412,7 +412,8 @@
 	}
 
 	resource_nr = (fsize - types[0]) / entrysize;
-	resource_start = resources = (resource_t*)sci_realloc(_resources, (_resourcesNr + resource_nr) * sizeof(resource_t));
+	resource_start = resources = (Resource*)sci_realloc(_resources, (_resourcesNr + resource_nr) * sizeof(Resource));
+	memset(resource_start + sizeof(Resource) * _resourcesNr, 0, resource_nr * sizeof(Resource));
 	resources += _resourcesNr;
 
 	i = 0;
@@ -425,7 +426,7 @@
 	for (i = 0; i < resource_nr; i++) {
 		int read_ok = file.read(&buf, entrysize);
 		int j;
-		resource_t *res;
+		Resource *res;
 		int addto = resource_index;
 		int fresh = 1;
 
@@ -487,7 +488,7 @@
 #ifdef TEST_RESOURCE_MAP
 int main(int argc, char **argv) {
 	int resource_nr;
-	resource_t *resources;
+	Resource *resources;
 	int notok = sci0_read_resource_map(".", &resources, &resource_nr);
 
 	if (notok) {
@@ -501,7 +502,7 @@
 		printf("Found %d resources:\n", resource_nr);
 
 		for (i = 0; i < resource_nr; i++) {
-			resource_t *res = resources + i;
+			Resource *res = resources + i;
 
 			printf("#%04d:\tRESOURCE.%03d:%8d\t%s.%03d\n", i, res->file, res->file_offset,
 					sci_resource_types[res->type], res->number);

Modified: scummvm/trunk/engines/sci/scicore/resource_patch.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource_patch.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/scicore/resource_patch.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -31,11 +31,11 @@
 
 namespace Sci {
 
-void sci0_sprintf_patch_file_name(char *string, resource_t *res) {
+void sci0_sprintf_patch_file_name(char *string, Resource *res) {
 	sprintf(string, "%s.%03i", sci_resource_types[res->type], res->number);
 }
 
-void sci1_sprintf_patch_file_name(char *string, resource_t *res) {
+void sci1_sprintf_patch_file_name(char *string, Resource *res) {
 	sprintf(string, "%d.%s", res->number, sci_resource_type_suffixes[res->type]);
 }
 
@@ -52,7 +52,7 @@
 		perror("""__FILE__"": (""__LINE__""): failed to open");
 	else {
 		uint8 filehdr[2];
-		resource_t *newrsc = findResourceUnsorted(_resources, _resourcesNr, restype, resnumber);
+		Resource *newrsc = findResourceUnsorted(_resources, _resourcesNr, restype, resnumber);
 		int fsize = file.size();
 		if (fsize < 3) {
 			printf("File too small\n");
@@ -77,7 +77,7 @@
 			if (!newrsc) {
 				// Completely new resource!
 				_resourcesNr++;
-				_resources = (resource_t *)sci_realloc(_resources, _resourcesNr * sizeof(resource_t));
+				_resources = (Resource *)sci_realloc(_resources, _resourcesNr * sizeof(Resource));
 				newrsc = (_resources - 1) + _resourcesNr;
 				newrsc->alt_sources = NULL;
 			}

Modified: scummvm/trunk/engines/sci/scicore/script.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/script.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/scicore/script.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -329,7 +329,7 @@
 void script_dissect(ResourceManager *resmgr, int res_no, const Common::StringList &selectorNames) {
 	int objectctr[11] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 	unsigned int _seeker = 0;
-	resource_t *script = resmgr->findResource(sci_script, res_no, 0);
+	Resource *script = resmgr->findResource(sci_script, res_no, 0);
 	word_t **words;
 	int word_count;
 

Modified: scummvm/trunk/engines/sci/scicore/vocab.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/vocab.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/scicore/vocab.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -72,7 +72,7 @@
 	char currentword[256] = ""; // They're not going to use words longer than 255 ;-)
 	int currentwordpos = 0;
 
-	resource_t *resource;
+	Resource *resource;
 
 	// First try to load the SCI0 vocab resource.
 	resource = resmgr->findResource(sci_vocab, VOCAB_RESOURCE_SCI0_MAIN_VOCAB, 0);
@@ -179,7 +179,7 @@
 suffix_t **vocab_get_suffices(ResourceManager *resmgr, int *suffices_nr) {
 	int counter = 0;
 	suffix_t **suffices;
-	resource_t *resource = resmgr->findResource(sci_vocab, VOCAB_RESOURCE_SUFFIX_VOCAB, 1);
+	Resource *resource = resmgr->findResource(sci_vocab, VOCAB_RESOURCE_SUFFIX_VOCAB, 1);
 	unsigned int seeker = 1;
 
 	if (!resource) {
@@ -241,7 +241,7 @@
 }
 
 parse_tree_branch_t *vocab_get_branches(ResourceManager * resmgr, int *branches_nr) {
-	resource_t *resource = resmgr->findResource(sci_vocab, VOCAB_RESOURCE_PARSE_TREE_BRANCHES, 0);
+	Resource *resource = resmgr->findResource(sci_vocab, VOCAB_RESOURCE_PARSE_TREE_BRANCHES, 0);
 	parse_tree_branch_t *retval;
 	int i;
 

Modified: scummvm/trunk/engines/sci/scicore/vocab_debug.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/vocab_debug.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/scicore/vocab_debug.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -155,7 +155,7 @@
 }
 
 int *vocabulary_get_classes(ResourceManager *resmgr, int* count) {
-	resource_t* r;
+	Resource* r;
 	int *c;
 	unsigned int i;
 
@@ -172,7 +172,7 @@
 }
 
 int vocabulary_get_class_count(ResourceManager *resmgr) {
-	resource_t* r;
+	Resource* r;
 
 	if ((r = resmgr->findResource(sci_vocab, 996, 0)) == 0)
 		return 0;
@@ -183,7 +183,7 @@
 bool vocabulary_get_snames(ResourceManager *resmgr, sci_version_t version, Common::StringList &selectorNames) {
 	int count;
 
-	resource_t *r = resmgr->findResource(sci_vocab, 997, 0);
+	Resource *r = resmgr->findResource(sci_vocab, 997, 0);
 
 	if (!r) // No such resource?
 		return false;
@@ -218,7 +218,7 @@
 opcode* vocabulary_get_opcodes(ResourceManager *resmgr) {
 	opcode* o;
 	int count, i = 0;
-	resource_t* r = resmgr->findResource(sci_vocab, VOCAB_RESOURCE_OPCODES, 0);
+	Resource* r = resmgr->findResource(sci_vocab, VOCAB_RESOURCE_OPCODES, 0);
 
 	// if the resource couldn't be loaded, leave
 	if (r == NULL) {
@@ -263,7 +263,7 @@
 }
 
 // Alternative kernel func names retriever. Required for KQ1/SCI (at least).
-static char **_vocabulary_get_knames0alt(int *names, resource_t *r) {
+static char **_vocabulary_get_knames0alt(int *names, Resource *r) {
 	unsigned int mallocsize = 32;
 	char **retval = (char **)sci_malloc(sizeof(char *) * mallocsize);
 	unsigned int i = 0, index = 0;
@@ -295,7 +295,7 @@
 static char **vocabulary_get_knames0(ResourceManager *resmgr, int* names) {
 	char** t;
 	int count, i, index = 2, empty_to_add = 1;
-	resource_t *r = resmgr->findResource(sci_vocab, VOCAB_RESOURCE_KNAMES, 0);
+	Resource *r = resmgr->findResource(sci_vocab, VOCAB_RESOURCE_KNAMES, 0);
 
 	if (!r) { // No kernel name table found? Fall back to default table
 		t = (char **)sci_malloc((SCI0_KNAMES_DEFAULT_ENTRIES_NR + 1) * sizeof(char*));
@@ -345,7 +345,7 @@
 static char **vocabulary_get_knames1(ResourceManager *resmgr, int *count) {
 	char **t = NULL;
 	unsigned int size = 64, used = 0, pos = 0;
-	resource_t *r = resmgr->findResource(sci_vocab, VOCAB_RESOURCE_KNAMES, 0);
+	Resource *r = resmgr->findResource(sci_vocab, VOCAB_RESOURCE_KNAMES, 0);
 
 	while (pos < r->size) {
 		int len;

Modified: scummvm/trunk/engines/sci/sfx/player/polled.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/player/polled.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/sfx/player/polled.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -159,7 +159,7 @@
 }
 
 static int pp_init(ResourceManager *resmgr, int expected_latency) {
-	resource_t *res = NULL, *res2 = NULL;
+	Resource *res = NULL, *res2 = NULL;
 
 	if (!mixer)
 		return SFX_ERROR;

Modified: scummvm/trunk/engines/sci/sfx/player/realtime.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/player/realtime.cpp	2009-02-28 21:05:21 UTC (rev 38981)
+++ scummvm/trunk/engines/sci/sfx/player/realtime.cpp	2009-02-28 21:59:49 UTC (rev 38982)
@@ -128,8 +128,8 @@
 	}
 }
 
-static resource_t *find_patch(ResourceManager *resmgr, const char *seq_name, int patchfile) {
-	resource_t *res = NULL;
+static Resource *find_patch(ResourceManager *resmgr, const char *seq_name, int patchfile) {
+	Resource *res = NULL;
 
 	if (patchfile != SFX_SEQ_PATCHFILE_NONE) {
 		res = resmgr->findResource(sci_patch, patchfile, 0);
@@ -149,7 +149,7 @@
 }
 
 static int rt_init(ResourceManager *resmgr, int expected_latency) {
-	resource_t *res = NULL, *res2 = NULL;
+	Resource *res = NULL, *res2 = NULL;
 	void *seq_dev = NULL;
 
 	seq = sfx_find_sequencer(NULL);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list