[Scummvm-cvs-logs] SF.net SVN: scummvm:[38592] scummvm/trunk/engines/sci
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Feb 20 16:24:22 CET 2009
Revision: 38592
http://scummvm.svn.sourceforge.net/scummvm/?rev=38592&view=rev
Author: fingolfin
Date: 2009-02-20 15:24:22 +0000 (Fri, 20 Feb 2009)
Log Message:
-----------
SCI: Renamed resource_mgr_t -> ResourceManager; added remark to 'the other resource manager' that it should be renamed to GraphicsManager or so
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/message.cpp
scummvm/trunk/engines/sci/engine/message.h
scummvm/trunk/engines/sci/gfx/resmgr.cpp
scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp
scummvm/trunk/engines/sci/include/engine.h
scummvm/trunk/engines/sci/include/gfx_resmgr.h
scummvm/trunk/engines/sci/include/sciresource.h
scummvm/trunk/engines/sci/include/script.h
scummvm/trunk/engines/sci/include/sfx_engine.h
scummvm/trunk/engines/sci/include/sfx_player.h
scummvm/trunk/engines/sci/include/vocabulary.h
scummvm/trunk/engines/sci/sci.cpp
scummvm/trunk/engines/sci/scicore/resource.cpp
scummvm/trunk/engines/sci/scicore/resource_map.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/core.cpp
scummvm/trunk/engines/sci/sfx/player/polled.cpp
scummvm/trunk/engines/sci/sfx/player/realtime.cpp
Modified: scummvm/trunk/engines/sci/engine/message.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/message.cpp 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/engine/message.cpp 2009-02-20 15:24:22 UTC (rev 38592)
@@ -199,7 +199,7 @@
11
};
-void message_state_initialize(resource_mgr_t *resmgr, message_state_t *state) {
+void message_state_initialize(ResourceManager *resmgr, message_state_t *state) {
// resource_t *tester = scir_find_resource(resmgr, sci_message, 0, 0);
//int version;
Modified: scummvm/trunk/engines/sci/engine/message.h
===================================================================
--- scummvm/trunk/engines/sci/engine/message.h 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/engine/message.h 2009-02-20 15:24:22 UTC (rev 38592)
@@ -58,7 +58,7 @@
typedef struct {
int initialized;
message_handler_t *handler;
- resource_mgr_t *resmgr;
+ ResourceManager *resmgr;
resource_t *current_res;
int module;
int record_count;
@@ -72,6 +72,6 @@
int message_get_length(message_state_t *state);
int message_get_text(message_state_t *state, char *buffer, int length);
int message_state_load_res(message_state_t *state, int module);
-void message_state_initialize(resource_mgr_t *resmgr, message_state_t *state);
+void message_state_initialize(ResourceManager *resmgr, message_state_t *state);
Modified: scummvm/trunk/engines/sci/gfx/resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resmgr.cpp 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/gfx/resmgr.cpp 2009-02-20 15:24:22 UTC (rev 38592)
@@ -25,6 +25,9 @@
/* Resource manager core part */
+// FIXME/TODO: The name "(Graphics) resource manager", and the associated
+// filenames, are misleading. This should be renamed to "Graphics manager"
+// or something like that.
#include "sci/include/gfx_resource.h"
#include "sci/include/gfx_tools.h"
Modified: scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp 2009-02-20 15:24:22 UTC (rev 38592)
@@ -81,7 +81,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) {
- resource_mgr_t *resmgr = (resource_mgr_t *) state->misc_payload;
+ ResourceManager *resmgr = (ResourceManager *) state->misc_payload;
resource_t *res = scir_find_resource(resmgr, sci_pic, nr, 0);
int need_unscaled = unscaled_pic != NULL;
gfxr_pic0_params_t style, basic_style;
@@ -165,7 +165,7 @@
gfxr_view_t *
gfxr_interpreter_get_view(gfx_resstate_t *state, int nr, void *internal, int palette) {
- resource_mgr_t *resmgr = (resource_mgr_t *) state->misc_payload;
+ ResourceManager *resmgr = (ResourceManager *) state->misc_payload;
resource_t *res = scir_find_resource(resmgr, sci_view, nr, 0);
int resid = GFXR_RES_ID(GFX_RESOURCE_TYPE_VIEW, nr);
gfxr_view_t *result = 0;
@@ -206,7 +206,7 @@
gfx_bitmap_font_t *
gfxr_interpreter_get_font(gfx_resstate_t *state, int nr, void *internal) {
- resource_mgr_t *resmgr = (resource_mgr_t *) state->misc_payload;
+ ResourceManager *resmgr = (ResourceManager *) state->misc_payload;
resource_t *res = scir_find_resource(resmgr, sci_font, nr, 0);
if (!res || !res->data)
return NULL;
@@ -217,7 +217,7 @@
gfx_pixmap_t *
gfxr_interpreter_get_cursor(gfx_resstate_t *state, int nr, void *internal) {
- resource_mgr_t *resmgr = (resource_mgr_t *) state->misc_payload;
+ ResourceManager *resmgr = (ResourceManager *) state->misc_payload;
resource_t *res = scir_find_resource(resmgr, sci_cursor, nr, 0);
int resid = GFXR_RES_ID(GFX_RESOURCE_TYPE_CURSOR, nr);
@@ -239,7 +239,7 @@
int *
gfxr_interpreter_get_resources(gfx_resstate_t *state, gfx_resource_type_t type,
int version, int *entries_nr, void *internal) {
- resource_mgr_t *resmgr = (resource_mgr_t *) state->misc_payload;
+ ResourceManager *resmgr = (ResourceManager *) state->misc_payload;
int restype;
int *resources;
int count = 0;
@@ -292,7 +292,7 @@
gfx_pixmap_color_t *
gfxr_interpreter_get_palette(gfx_resstate_t *state, int version, int *colors_nr,
void *internal, int nr) {
- resource_mgr_t *resmgr = (resource_mgr_t *) state->misc_payload;
+ ResourceManager *resmgr = (ResourceManager *) state->misc_payload;
resource_t *res;
if (version < SCI_VERSION_01_VGA)
Modified: scummvm/trunk/engines/sci/include/engine.h
===================================================================
--- scummvm/trunk/engines/sci/include/engine.h 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/include/engine.h 2009-02-20 15:24:22 UTC (rev 38592)
@@ -88,7 +88,7 @@
char *resource_dir; /* Directory the resource files are kept in */
char *work_dir; /* Directory the game metadata should be written to */
- resource_mgr_t *resmgr; /* The resource manager */
+ ResourceManager *resmgr; /* The resource manager */
char *game_name; /* Designation of the primary object (which inherits from Game) */
char *game_version;
Modified: scummvm/trunk/engines/sci/include/gfx_resmgr.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_resmgr.h 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/include/gfx_resmgr.h 2009-02-20 15:24:22 UTC (rev 38592)
@@ -26,6 +26,10 @@
#ifndef _GFX_RESMGR_H_
#define _GFX_RESMGR_H_
+// FIXME/TODO: The name "(Graphics) resource manager", and the associated
+// filenames, are misleading. This should be renamed to "Graphics manager"
+// or something like that.
+
#include "sci/include/gfx_resource.h"
#include "sci/include/sbtree.h"
Modified: scummvm/trunk/engines/sci/include/sciresource.h
===================================================================
--- scummvm/trunk/engines/sci/include/sciresource.h 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/include/sciresource.h 2009-02-20 15:24:22 UTC (rev 38592)
@@ -190,13 +190,13 @@
/* LRU queue: lru_first points to the most recent entry */
unsigned char allow_patches;
-} resource_mgr_t;
+} ResourceManager;
/**** FUNCTION DECLARATIONS ****/
/**--- New Resource manager ---**/
-resource_mgr_t *
+ResourceManager *
scir_new_resource_manager(char *dir, int version, char allow_patches, int max_memory);
/* Creates a new FreeSCI resource manager
** Parameters: (char *) dir: Path to the resource and patch files (not modified or freed
@@ -206,16 +206,16 @@
** (char ) allow_patches: Set to 1 if external patches (those look like
** "view.101" or "script.093") should be applied
** (int) max_memory: Maximum number of bytes to allow allocated for resources
-** Returns : (resource_mgr_t *) A newly allocated resource manager
+** Returns : (ResourceManager *) A newly allocated resource manager
** max_memory will not be interpreted as a hard limit, only as a restriction for resources
** which are not explicitly locked. However, a warning will be issued whenever this limit
** is exceeded.
*/
resource_source_t *
-scir_add_patch_dir(resource_mgr_t *mgr, int type, char *path);
+scir_add_patch_dir(ResourceManager *mgr, int type, char *path);
/* Add a path to the resource manager's list of sources.
-** Parameters: (resource_mgr_t *) mgr: The resource manager to look up in
+** Parameters: (ResourceManager *) mgr: The resource manager to look up in
** (int) dirtype: The type of patch directory to add,
** either RESSOURCE_TYPE_DIRECTORY or RESSOURCE_TYPE_AUDIO_DIRECTORY
** (char *) path: The path to add
@@ -223,13 +223,13 @@
*/
resource_source_t *
-scir_get_volume(resource_mgr_t *mgr, resource_source_t *map, int volume_nr);
+scir_get_volume(ResourceManager *mgr, resource_source_t *map, int volume_nr);
resource_source_t *
-scir_add_volume(resource_mgr_t *mgr, resource_source_t *map, char *filename,
+scir_add_volume(ResourceManager *mgr, resource_source_t *map, char *filename,
int number, int extended_addressing);
/* Add a volume to the resource manager's list of sources.
-** Parameters: (resource_mgr_t *) mgr: The resource manager to look up in
+** Parameters: (ResourceManager *) mgr: The resource manager to look up in
** (resource_source_t *) map: The map associated with this volume
** (char *) filename: The name of the volume to add
** (int) extended_addressing: 1 if this volume uses extended addressing,
@@ -238,34 +238,34 @@
*/
resource_source_t *
-scir_add_external_map(resource_mgr_t *mgr, char *file_name);
+scir_add_external_map(ResourceManager *mgr, char *file_name);
/* Add an external (i.e. separate file) map resource to the resource manager's list of sources.
-** Parameters: (resource_mgr_t *) mgr: The resource manager to look up in
+** Parameters: (ResourceManager *) mgr: The resource manager to look up in
** (char *) file_name: The name of the volume to add
** Returns: A pointer to the added source structure, or NULL if an error occurred.
*/
resource_source_t *
-scir_add_internal_map(resource_mgr_t *mgr, resource_t *map);
+scir_add_internal_map(ResourceManager *mgr, resource_t *map);
/* Add an internal (i.e. a resource) map resource to the resource manager's list of sources.
-** Parameters: (resource_mgr_t *) mgr: The resource manager to look up in
+** Parameters: (ResourceManager *) mgr: The resource manager to look up in
** (char *) file_name: The name of the volume to add
** Returns: A pointer to the added source structure, or NULL if an error occurred.
*/
int
-scir_scan_new_sources(resource_mgr_t *mgr, int *detected_version);
+scir_scan_new_sources(ResourceManager *mgr, int *detected_version);
/* Scans newly registered resource sources for resources, earliest addition first.
-** Parameters: (resource_mgr_t *) mgr: The resource manager to look up in
+** Parameters: (ResourceManager *) mgr: The resource manager to look up in
** (int *) detected_version: Pointer to the detected version number,
** used during startup. May be NULL.
** Returns: One of SCI_ERROR_*.
*/
resource_t *
-scir_find_resource(resource_mgr_t *mgr, int type, int number, int lock);
+scir_find_resource(ResourceManager *mgr, int type, int number, int lock);
/* Looks up a resource's data
-** Parameters: (resource_mgr_t *) mgr: The resource manager to look up in
+** Parameters: (ResourceManager *) mgr: The resource manager to look up in
** (int) type: The resource type to look for
** (int) number: The resource number to search
** (int) lock: non-zero iff the resource should be locked
@@ -275,9 +275,9 @@
*/
void
-scir_unlock_resource(resource_mgr_t *mgr, resource_t *res, int restype, int resnum);
+scir_unlock_resource(ResourceManager *mgr, resource_t *res, int restype, int resnum);
/* Unlocks a previously locked resource
-** Parameters: (resource_mgr_t *) mgr: The manager the resource should be freed from
+** Parameters: (ResourceManager *) mgr: The manager the resource should be freed from
** (resource_t *) 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)
@@ -285,9 +285,9 @@
*/
resource_t *
-scir_test_resource(resource_mgr_t *mgr, int type, int number);
+scir_test_resource(ResourceManager *mgr, int type, int number);
/* Tests whether a resource exists
-** Parameters: (resource_mgr_t *) mgr: The resource manager to search in
+** Parameters: (ResourceManager *) mgr: The resource manager to search in
** (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
@@ -299,16 +299,16 @@
*/
void
-scir_free_resource_manager(resource_mgr_t *mgr);
+scir_free_resource_manager(ResourceManager *mgr);
/* Frees a resource manager and all memory handled by it
-** Parameters: (resource_mgr_t *) mgr: The Manager to free
+** Parameters: (ResourceManager *) mgr: The Manager to free
** Returns : (void)
*/
/**--- Resource map decoding functions ---*/
int
-sci0_read_resource_map(resource_mgr_t *mgr, resource_source_t *map, resource_t **resources, int *resource_nr_p, int *sci_version);
+sci0_read_resource_map(ResourceManager *mgr, resource_source_t *map, resource_t **resources, int *resource_nr_p, int *sci_version);
/* Reads the SCI0 resource.map file from a local directory
** Parameters: (char *) path: (unused)
** (resource_t **) resources: Pointer to a pointer
@@ -322,7 +322,7 @@
*/
int
-sci1_read_resource_map(resource_mgr_t *mgr, resource_source_t *map, resource_source_t *vol,
+sci1_read_resource_map(ResourceManager *mgr, resource_source_t *map, resource_source_t *vol,
resource_t **resource_p, int *resource_nr_p, int *sci_version);
/* Reads the SCI1 resource.map file from a local directory
** Parameters: (char *) path: (unused)
Modified: scummvm/trunk/engines/sci/include/script.h
===================================================================
--- scummvm/trunk/engines/sci/include/script.h 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/include/script.h 2009-02-20 15:24:22 UTC (rev 38592)
@@ -53,7 +53,7 @@
sci_obj_localvars
} script_object_types;
-void script_dissect(resource_mgr_t *resmgr, int res_no, char **snames, int snames_nr);
+void script_dissect(ResourceManager *resmgr, int res_no, char **snames, int snames_nr);
/* Opcode formats as used by script.c */
typedef enum {
Modified: scummvm/trunk/engines/sci/include/sfx_engine.h
===================================================================
--- scummvm/trunk/engines/sci/include/sfx_engine.h 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/include/sfx_engine.h 2009-02-20 15:24:22 UTC (rev 38592)
@@ -60,9 +60,9 @@
/***********/
void
-sfx_init(sfx_state_t *self, resource_mgr_t *resmgr, int flags);
+sfx_init(sfx_state_t *self, ResourceManager *resmgr, int flags);
/* Initializes the sound engine
-** Parameters: (resource_mgr_t *) resmgr: Resource manager for initialization
+** Parameters: (ResourceManager *) resmgr: Resource manager for initialization
** (int) flags: SFX_STATE_FLAG_*
*/
Modified: scummvm/trunk/engines/sci/include/sfx_player.h
===================================================================
--- scummvm/trunk/engines/sci/include/sfx_player.h 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/include/sfx_player.h 2009-02-20 15:24:22 UTC (rev 38592)
@@ -47,9 +47,9 @@
*/
int
- (*init)(resource_mgr_t *resmgr, int expected_latency);
+ (*init)(ResourceManager *resmgr, int expected_latency);
/* Initializes the player
- ** Parameters: (resource_mgr_t *) resmgr: A resource manager for driver initialization
+ ** Parameters: (ResourceManager *) resmgr: A resource manager for driver initialization
** (int) expected_latency: Expected delay in between calls to 'maintenance'
** (in microseconds)
** Returns : (int) SFX_OK on success, SFX_ERROR on failure
Modified: scummvm/trunk/engines/sci/include/vocabulary.h
===================================================================
--- scummvm/trunk/engines/sci/include/vocabulary.h 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/include/vocabulary.h 2009-02-20 15:24:22 UTC (rev 38592)
@@ -189,14 +189,14 @@
/*FIXME: These need freeing functions...*/
-int* vocabulary_get_classes(resource_mgr_t *resmgr, int *count);
+int* vocabulary_get_classes(ResourceManager *resmgr, int *count);
-int vocabulary_get_class_count(resource_mgr_t *resmgr);
+int vocabulary_get_class_count(ResourceManager *resmgr);
/**
* Returns a null terminated array of selector names.
*/
-char** vocabulary_get_snames(resource_mgr_t *resmgr, int *pcount, sci_version_t version);
+char** vocabulary_get_snames(ResourceManager *resmgr, int *pcount, sci_version_t version);
/**
* Frees the aforementioned array
@@ -210,7 +210,7 @@
/**
* Returns a null terminated array of opcodes.
*/
-opcode* vocabulary_get_opcodes(resource_mgr_t *resmgr);
+opcode* vocabulary_get_opcodes(ResourceManager *resmgr);
void
vocabulary_free_opcodes(opcode *opcodes);
@@ -227,15 +227,15 @@
* The returned array has the same format regardless of the format of the
* name table of the resource (the format changed between version 0 and 1).
*/
-char** vocabulary_get_knames(resource_mgr_t *resmgr, int* count);
+char** vocabulary_get_knames(ResourceManager *resmgr, int* count);
void vocabulary_free_knames(char** names);
word_t **
-vocab_get_words(resource_mgr_t *resmgr, int *word_counter);
+vocab_get_words(ResourceManager *resmgr, int *word_counter);
/* Gets all words from the main vocabulary
-** Parameters: (resource_mgr_t *) resmr: The resource manager to read from
+** Parameters: (ResourceManager *) resmr: The resource manager to read from
** (int *) word_counter: The int which the number of words is stored in
** Returns : (word_t **): A list of all words, dynamically allocated
*/
@@ -251,27 +251,27 @@
suffix_t **
-vocab_get_suffices(resource_mgr_t *resmgr, int *suffices_nr);
+vocab_get_suffices(ResourceManager *resmgr, int *suffices_nr);
/* Gets all suffixes from the suffix vocabulary
-** Parameters: (resource_mgr_t*) resmgr: Resource manager the resources are
+** Parameters: (ResourceManager*) resmgr: Resource manager the resources are
** read from
** (int *) suffices_nr: The variable to store the number of suffices in
** Returns : (suffix_t **): A list of suffixes
*/
void
-vocab_free_suffices(resource_mgr_t *resmgr, suffix_t **suffices, int suffices_nr);
+vocab_free_suffices(ResourceManager *resmgr, suffix_t **suffices, int suffices_nr);
/* Frees suffices_nr suffices
-** Parameters: (resource_mgr_t *) resmgr: The resource manager to free from
+** Parameters: (ResourceManager *) resmgr: The resource manager to free from
** (suffix_t **) suffices: The suffixes to free
** (int) suffices_nr: Number of entrie sin suffices
** Returns : (void)
*/
parse_tree_branch_t *
-vocab_get_branches(resource_mgr_t *resmgr, int *branches_nr);
+vocab_get_branches(ResourceManager *resmgr, int *branches_nr);
/* Retrieves all grammar rules from the resource data
-** Parameters: (resource_mgr_t*) resmgr: Resource manager the rules are
+** Parameters: (ResourceManager*) resmgr: Resource manager the rules are
** read from
** (int *) branches_nr: Pointer to the variable which the number of entries is to be
** stored in
Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/sci.cpp 2009-02-20 15:24:22 UTC (rev 38592)
@@ -182,7 +182,7 @@
} */
// FIXME/TODO: Move some of the stuff below to init()
- resource_mgr_t *resmgr;
+ ResourceManager *resmgr;
init_console(); /* So we can get any output */
Modified: scummvm/trunk/engines/sci/scicore/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource.cpp 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/scicore/resource.cpp 2009-02-20 15:24:22 UTC (rev 38592)
@@ -160,7 +160,7 @@
/*-----------------------------------*/
resource_source_t *
-scir_add_external_map(resource_mgr_t *mgr, char *file_name) {
+scir_add_external_map(ResourceManager *mgr, char *file_name) {
resource_source_t *newsrc = (resource_source_t *)
malloc(sizeof(resource_source_t));
@@ -177,7 +177,7 @@
}
resource_source_t *
-scir_add_volume(resource_mgr_t *mgr, resource_source_t *map, char *filename,
+scir_add_volume(ResourceManager *mgr, resource_source_t *map, char *filename,
int number, int extended_addressing) {
resource_source_t *newsrc = (resource_source_t *)
malloc(sizeof(resource_source_t));
@@ -195,7 +195,7 @@
}
resource_source_t *
-scir_add_patch_dir(resource_mgr_t *mgr, int type, char *dirname) {
+scir_add_patch_dir(ResourceManager *mgr, int type, char *dirname) {
resource_source_t *newsrc = (resource_source_t *)
malloc(sizeof(resource_source_t));
@@ -210,7 +210,7 @@
}
resource_source_t *
-scir_get_volume(resource_mgr_t *mgr, resource_source_t *map, int volume_nr) {
+scir_get_volume(ResourceManager *mgr, resource_source_t *map, int volume_nr) {
resource_source_t *seeker = mgr->sources;
while (seeker) {
@@ -229,7 +229,7 @@
/*------------------------------------------------*/
static void
-_scir_init_trivial(resource_mgr_t *mgr) {
+_scir_init_trivial(ResourceManager *mgr) {
mgr->resources_nr = 0;
mgr->resources = (resource_t*)sci_malloc(1);
}
@@ -252,7 +252,7 @@
}
static void
-_scir_load_resource(resource_mgr_t *mgr, resource_t *res, int protect) {
+_scir_load_resource(ResourceManager *mgr, resource_t *res, int protect) {
char filename[MAXPATHLEN];
int fh;
resource_t backup;
@@ -334,7 +334,7 @@
}
resource_t *
-scir_test_resource(resource_mgr_t *mgr, int type, int number) {
+scir_test_resource(ResourceManager *mgr, int type, int number) {
resource_t binseeker;
binseeker.type = type;
binseeker.number = number;
@@ -346,7 +346,7 @@
int sci0_get_compression_method(int resh);
int
-sci_test_view_type(resource_mgr_t *mgr) {
+sci_test_view_type(ResourceManager *mgr) {
int fh;
char filename[MAXPATHLEN];
int compression;
@@ -425,7 +425,7 @@
int
-scir_add_appropriate_sources(resource_mgr_t *mgr,
+scir_add_appropriate_sources(ResourceManager *mgr,
int allow_patches,
char *dir) {
const char *trailing_slash = "";
@@ -469,7 +469,7 @@
}
static int
-_scir_scan_new_sources(resource_mgr_t *mgr, int *detected_version, resource_source_t *source) {
+_scir_scan_new_sources(ResourceManager *mgr, int *detected_version, resource_source_t *source) {
int preset_version = mgr->sci_version;
int resource_error = 0;
int dummy = mgr->sci_version;
@@ -563,7 +563,7 @@
}
int
-scir_scan_new_sources(resource_mgr_t *mgr, int *detected_version) {
+scir_scan_new_sources(ResourceManager *mgr, int *detected_version) {
_scir_scan_new_sources(mgr, detected_version, mgr->sources);
return 0;
}
@@ -576,11 +576,11 @@
}
}
-resource_mgr_t *
+ResourceManager *
scir_new_resource_manager(char *dir, int version,
char allow_patches, int max_memory) {
int resource_error = 0;
- resource_mgr_t *mgr = (resource_mgr_t*)sci_malloc(sizeof(resource_mgr_t));
+ ResourceManager *mgr = (ResourceManager*)sci_malloc(sizeof(ResourceManager));
char *caller_cwd = sci_getcwd();
int resmap_version = version;
@@ -735,7 +735,7 @@
}
void
-scir_free_resource_manager(resource_mgr_t *mgr) {
+scir_free_resource_manager(ResourceManager *mgr) {
_scir_free_resources(mgr->resources, mgr->resources_nr);
_scir_free_resource_sources(mgr->sources);
mgr->resources = NULL;
@@ -753,7 +753,7 @@
static void
-_scir_remove_from_lru(resource_mgr_t *mgr, resource_t *res) {
+_scir_remove_from_lru(ResourceManager *mgr, resource_t *res) {
if (res->status != SCI_STATUS_ENQUEUED) {
sciprintf("Resmgr: Oops: trying to remove resource that isn't"
" enqueued\n");
@@ -775,7 +775,7 @@
}
static void
-_scir_add_to_lru(resource_mgr_t *mgr, resource_t *res) {
+_scir_add_to_lru(ResourceManager *mgr, resource_t *res) {
if (res->status != SCI_STATUS_ALLOCATED) {
sciprintf("Resmgr: Oops: trying to enqueue resource with state"
" %d\n", res->status);
@@ -802,7 +802,7 @@
}
static void
-_scir_print_lru_list(resource_mgr_t *mgr) {
+_scir_print_lru_list(ResourceManager *mgr) {
int mem = 0;
int entries = 0;
resource_t *res = mgr->lru_first;
@@ -821,7 +821,7 @@
}
static void
-_scir_free_old_resources(resource_mgr_t *mgr, int last_invulnerable) {
+_scir_free_old_resources(ResourceManager *mgr, int last_invulnerable) {
while (mgr->max_memory < mgr->memory_lru
&& (!last_invulnerable || mgr->lru_first != mgr->lru_last)) {
resource_t *goner = mgr->lru_last;
@@ -843,7 +843,7 @@
}
resource_t *
-scir_find_resource(resource_mgr_t *mgr, int type, int number, int lock) {
+scir_find_resource(ResourceManager *mgr, int type, int number, int lock) {
resource_t *retval;
if (number >= sci_max_resource_nr[mgr->sci_version]) {
@@ -893,7 +893,7 @@
}
void
-scir_unlock_resource(resource_mgr_t *mgr, resource_t *res, int resnum, int restype) {
+scir_unlock_resource(ResourceManager *mgr, resource_t *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_map.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource_map.cpp 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/scicore/resource_map.cpp 2009-02-20 15:24:22 UTC (rev 38592)
@@ -73,7 +73,7 @@
}
static int
-sci_res_read_entry(resource_mgr_t *mgr, resource_source_t *map,
+sci_res_read_entry(ResourceManager *mgr, resource_source_t *map,
byte *buf, resource_t *res, int sci_version) {
res->id = buf[0] | (buf[1] << 8);
res->type = SCI0_RESID_GET_TYPE(buf);
@@ -149,7 +149,7 @@
int
-sci0_read_resource_map(resource_mgr_t *mgr, resource_source_t *map, resource_t **resource_p, int *resource_nr_p, int *sci_version) {
+sci0_read_resource_map(ResourceManager *mgr, resource_source_t *map, resource_t **resource_p, int *resource_nr_p, int *sci_version) {
int fsize;
int fd;
resource_t *resources;
@@ -334,7 +334,7 @@
}
int
-sci1_read_resource_map(resource_mgr_t *mgr, resource_source_t *map, resource_source_t *vol,
+sci1_read_resource_map(ResourceManager *mgr, resource_source_t *map, resource_source_t *vol,
resource_t **resource_p, int *resource_nr_p, int *sci_version) {
int fsize;
int fd;
Modified: scummvm/trunk/engines/sci/scicore/script.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/script.cpp 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/scicore/script.cpp 2009-02-20 15:24:22 UTC (rev 38592)
@@ -335,7 +335,7 @@
void
-script_dissect(resource_mgr_t *resmgr, int res_no, char **snames, int snames_nr) {
+script_dissect(ResourceManager *resmgr, int res_no, char **snames, int snames_nr) {
int objectctr[11] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
unsigned int _seeker = 0;
resource_t *script = scir_find_resource(resmgr, sci_script, res_no, 0);
Modified: scummvm/trunk/engines/sci/scicore/vocab.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/vocab.cpp 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/scicore/vocab.cpp 2009-02-20 15:24:22 UTC (rev 38592)
@@ -66,7 +66,7 @@
word_t **
-vocab_get_words(resource_mgr_t *resmgr, int *word_counter) {
+vocab_get_words(ResourceManager *resmgr, int *word_counter) {
int counter = 0;
unsigned int seeker;
word_t **words;
@@ -190,7 +190,7 @@
}
suffix_t **
-vocab_get_suffices(resource_mgr_t *resmgr, int *suffices_nr) {
+vocab_get_suffices(ResourceManager *resmgr, int *suffices_nr) {
int counter = 0;
suffix_t **suffices;
resource_t *resource = scir_find_resource(resmgr, sci_vocab, VOCAB_RESOURCE_SUFFIX_VOCAB, 1);
@@ -241,7 +241,7 @@
void
-vocab_free_suffices(resource_mgr_t *resmgr, suffix_t **suffices, int suffices_nr) {
+vocab_free_suffices(ResourceManager *resmgr, suffix_t **suffices, int suffices_nr) {
int i;
scir_unlock_resource(resmgr, scir_find_resource(resmgr, sci_vocab, VOCAB_RESOURCE_SUFFIX_VOCAB, 0),
@@ -262,7 +262,7 @@
parse_tree_branch_t *
-vocab_get_branches(resource_mgr_t * resmgr, int *branches_nr) {
+vocab_get_branches(ResourceManager * resmgr, int *branches_nr) {
resource_t *resource = scir_find_resource(resmgr, sci_vocab,
VOCAB_RESOURCE_PARSE_TREE_BRANCHES, 0);
parse_tree_branch_t *retval;
Modified: scummvm/trunk/engines/sci/scicore/vocab_debug.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/vocab_debug.cpp 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/scicore/vocab_debug.cpp 2009-02-20 15:24:22 UTC (rev 38592)
@@ -153,7 +153,7 @@
return d[0] | (d[1] << 8);
}
-int* vocabulary_get_classes(resource_mgr_t *resmgr, int* count) {
+int* vocabulary_get_classes(ResourceManager *resmgr, int* count) {
resource_t* r;
int *c;
unsigned int i;
@@ -169,13 +169,13 @@
return c;
}
-int vocabulary_get_class_count(resource_mgr_t *resmgr) {
+int vocabulary_get_class_count(ResourceManager *resmgr) {
resource_t* r;
if ((r = scir_find_resource(resmgr, sci_vocab, 996, 0)) == 0) return 0;
return r->size / 4;
}
-char** vocabulary_get_snames(resource_mgr_t *resmgr, int* pcount, sci_version_t version) {
+char** vocabulary_get_snames(ResourceManager *resmgr, int* pcount, sci_version_t version) {
char** t;
int count;
int i, j;
@@ -237,7 +237,7 @@
free(snames_list);
}
-opcode* vocabulary_get_opcodes(resource_mgr_t *resmgr) {
+opcode* vocabulary_get_opcodes(ResourceManager *resmgr) {
opcode* o;
int count, i = 0;
resource_t* r = scir_find_resource(resmgr, sci_vocab, VOCAB_RESOURCE_OPCODES, 0);
@@ -319,7 +319,7 @@
}
-static char** vocabulary_get_knames0(resource_mgr_t *resmgr, int* names) {
+static char** vocabulary_get_knames0(ResourceManager *resmgr, int* names) {
char** t;
int count, i, index = 2, empty_to_add = 1;
resource_t* r = scir_find_resource(resmgr, sci_vocab, VOCAB_RESOURCE_KNAMES, 0);
@@ -369,7 +369,7 @@
}
/*NOTE: Untested*/
-static char** vocabulary_get_knames1(resource_mgr_t *resmgr, int *count) {
+static char** vocabulary_get_knames1(ResourceManager *resmgr, int *count) {
char** t = NULL;
unsigned int size = 64, used = 0, pos = 0;
resource_t* r = scir_find_resource(resmgr, sci_vocab, VOCAB_RESOURCE_KNAMES, 0);
@@ -392,7 +392,7 @@
return t;
}
-char** vocabulary_get_knames(resource_mgr_t *resmgr, int* count) {
+char** vocabulary_get_knames(ResourceManager *resmgr, int* count) {
switch (resmgr->sci_version) {
case SCI_VERSION_0:
case SCI_VERSION_01:
Modified: scummvm/trunk/engines/sci/sfx/core.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/core.cpp 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/sfx/core.cpp 2009-02-20 15:24:22 UTC (rev 38592)
@@ -430,7 +430,7 @@
}
void
-sfx_init(sfx_state_t *self, resource_mgr_t *resmgr, int flags) {
+sfx_init(sfx_state_t *self, ResourceManager *resmgr, int flags) {
callbackMutex = new Common::Mutex();
song_lib_init(&self->songlib);
self->song = NULL;
Modified: scummvm/trunk/engines/sci/sfx/player/polled.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/player/polled.cpp 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/sfx/player/polled.cpp 2009-02-20 15:24:22 UTC (rev 38592)
@@ -163,7 +163,7 @@
}
static int
-pp_init(resource_mgr_t *resmgr, int expected_latency) {
+pp_init(ResourceManager *resmgr, int expected_latency) {
resource_t *res = NULL, *res2 = NULL;
if (!mixer)
Modified: scummvm/trunk/engines/sci/sfx/player/realtime.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/player/realtime.cpp 2009-02-20 15:20:48 UTC (rev 38591)
+++ scummvm/trunk/engines/sci/sfx/player/realtime.cpp 2009-02-20 15:24:22 UTC (rev 38592)
@@ -152,7 +152,7 @@
}
static resource_t *
-find_patch(resource_mgr_t *resmgr, const char *seq_name, int patchfile) {
+find_patch(ResourceManager *resmgr, const char *seq_name, int patchfile) {
resource_t *res = NULL;
if (patchfile != SFX_SEQ_PATCHFILE_NONE) {
@@ -174,7 +174,7 @@
}
static int
-rt_init(resource_mgr_t *resmgr, int expected_latency) {
+rt_init(ResourceManager *resmgr, int expected_latency) {
resource_t *res = NULL, *res2 = NULL;
void *seq_dev = NULL;
GTimeVal foo = {0, 0};
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