diff options
author | Max Horn | 2009-02-20 15:24:22 +0000 |
---|---|---|
committer | Max Horn | 2009-02-20 15:24:22 +0000 |
commit | a2aba2f18e7bac99f21d095b9ccaaa19924e2e46 (patch) | |
tree | 92dce39b3c56ae5ad52625c12d6ac5ec1c94dc2f /engines/sci/scicore | |
parent | c3ffac5e6245a20b3311cedf619e3a6f5e40b02c (diff) | |
download | scummvm-rg350-a2aba2f18e7bac99f21d095b9ccaaa19924e2e46.tar.gz scummvm-rg350-a2aba2f18e7bac99f21d095b9ccaaa19924e2e46.tar.bz2 scummvm-rg350-a2aba2f18e7bac99f21d095b9ccaaa19924e2e46.zip |
SCI: Renamed resource_mgr_t -> ResourceManager; added remark to 'the other resource manager' that it should be renamed to GraphicsManager or so
svn-id: r38592
Diffstat (limited to 'engines/sci/scicore')
-rw-r--r-- | engines/sci/scicore/resource.cpp | 40 | ||||
-rw-r--r-- | engines/sci/scicore/resource_map.cpp | 6 | ||||
-rw-r--r-- | engines/sci/scicore/script.cpp | 2 | ||||
-rw-r--r-- | engines/sci/scicore/vocab.cpp | 8 | ||||
-rw-r--r-- | engines/sci/scicore/vocab_debug.cpp | 14 |
5 files changed, 35 insertions, 35 deletions
diff --git a/engines/sci/scicore/resource.cpp b/engines/sci/scicore/resource.cpp index 21af0711d7..69576159c4 100644 --- a/engines/sci/scicore/resource.cpp +++ b/engines/sci/scicore/resource.cpp @@ -160,7 +160,7 @@ _scir_find_resource_unsorted(resource_t *res, int res_nr, int type, int number) /*-----------------------------------*/ 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 @@ scir_add_external_map(resource_mgr_t *mgr, char *file_name) { } 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 @@ scir_add_volume(resource_mgr_t *mgr, resource_source_t *map, char *filename, } 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 @@ scir_add_patch_dir(resource_mgr_t *mgr, int type, char *dirname) { } 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 @@ scir_get_volume(resource_mgr_t *mgr, resource_source_t *map, int volume_nr) { /*------------------------------------------------*/ 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 @@ _scir_load_from_patch_file(int fh, resource_t *res, char *filename) { } 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 @@ _scir_load_resource(resource_mgr_t *mgr, resource_t *res, int protect) { } 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 @@ scir_test_resource(resource_mgr_t *mgr, int type, int number) { 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 @@ sci_test_view_type(resource_mgr_t *mgr) { 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 @@ scir_add_appropriate_sources(resource_mgr_t *mgr, } 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 @@ _scir_scan_new_sources(resource_mgr_t *mgr, int *detected_version, resource_sour } 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 @@ _scir_free_resource_sources(resource_source_t *rss) { } } -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 @@ _scir_free_resources(resource_t *resources, int resources_nr) { } 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 @@ _scir_unalloc(resource_t *res) { 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 @@ _scir_remove_from_lru(resource_mgr_t *mgr, resource_t *res) { } 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 @@ _scir_add_to_lru(resource_mgr_t *mgr, resource_t *res) { } 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 @@ _scir_print_lru_list(resource_mgr_t *mgr) { } 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 @@ _scir_free_old_resources(resource_mgr_t *mgr, int last_invulnerable) { } 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 @@ scir_find_resource(resource_mgr_t *mgr, int type, int number, int lock) { } 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); diff --git a/engines/sci/scicore/resource_map.cpp b/engines/sci/scicore/resource_map.cpp index 7e033c05b2..3af9b286f5 100644 --- a/engines/sci/scicore/resource_map.cpp +++ b/engines/sci/scicore/resource_map.cpp @@ -73,7 +73,7 @@ detect_odd_sci01(int fh) { } 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 sci1_parse_header(int fd, int *types, int *lastrt) { 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 @@ static int sci10_or_11(int *types) { } 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; diff --git a/engines/sci/scicore/script.cpp b/engines/sci/scicore/script.cpp index d6d1ba8422..b8300a2696 100644 --- a/engines/sci/scicore/script.cpp +++ b/engines/sci/scicore/script.cpp @@ -335,7 +335,7 @@ script_dump_class(char *data, int seeker, int objsize, char **snames, int snames 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); diff --git a/engines/sci/scicore/vocab.cpp b/engines/sci/scicore/vocab.cpp index cff7f336de..904c0d28c1 100644 --- a/engines/sci/scicore/vocab.cpp +++ b/engines/sci/scicore/vocab.cpp @@ -66,7 +66,7 @@ _vocab_cmp_words(const void *word1, const void *word2) { 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 @@ inverse_16(unsigned int foo) { } 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 @@ vocab_get_suffices(resource_mgr_t *resmgr, int *suffices_nr) { 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 @@ vocab_free_branches(parse_tree_branch_t *parser_branches) { 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; diff --git a/engines/sci/scicore/vocab_debug.cpp b/engines/sci/scicore/vocab_debug.cpp index 59d1530215..782b75432b 100644 --- a/engines/sci/scicore/vocab_debug.cpp +++ b/engines/sci/scicore/vocab_debug.cpp @@ -153,7 +153,7 @@ int getInt(unsigned char* d) { 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 @@ int* vocabulary_get_classes(resource_mgr_t *resmgr, int* count) { 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 @@ vocabulary_free_snames(char **snames_list) { 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_knames0alt(int *names, resource_t *r) { } -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 @@ static char** vocabulary_get_knames0(resource_mgr_t *resmgr, int* names) { } /*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 @@ static char** vocabulary_get_knames1(resource_mgr_t *resmgr, int *count) { 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: |