aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/scicore/vocab_debug.cpp
diff options
context:
space:
mode:
authorGreg Frieger2009-02-28 20:45:36 +0000
committerGreg Frieger2009-02-28 20:45:36 +0000
commit4dd1b7dad55333fdbfefb6c1ea7acb55a5127863 (patch)
tree07c7b74de7e3f50273dc53cc8927e90075f0ce4c /engines/sci/scicore/vocab_debug.cpp
parent460131f5d35fffba4126cdf4ea24f2f32cfebc25 (diff)
downloadscummvm-rg350-4dd1b7dad55333fdbfefb6c1ea7acb55a5127863.tar.gz
scummvm-rg350-4dd1b7dad55333fdbfefb6c1ea7acb55a5127863.tar.bz2
scummvm-rg350-4dd1b7dad55333fdbfefb6c1ea7acb55a5127863.zip
Turned ResourceManager into a class, along with all related functions
svn-id: r38978
Diffstat (limited to 'engines/sci/scicore/vocab_debug.cpp')
-rw-r--r--engines/sci/scicore/vocab_debug.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/sci/scicore/vocab_debug.cpp b/engines/sci/scicore/vocab_debug.cpp
index 2cb3f40e24..6a9eb4183b 100644
--- a/engines/sci/scicore/vocab_debug.cpp
+++ b/engines/sci/scicore/vocab_debug.cpp
@@ -159,7 +159,7 @@ int *vocabulary_get_classes(ResourceManager *resmgr, int* count) {
int *c;
unsigned int i;
- if ((r = scir_find_resource(resmgr, sci_vocab, 996, 0)) == NULL)
+ if ((r = resmgr->findResource(sci_vocab, 996, 0)) == NULL)
return 0;
c = (int *)sci_malloc(sizeof(int) * r->size / 2);
@@ -174,7 +174,7 @@ int *vocabulary_get_classes(ResourceManager *resmgr, int* count) {
int vocabulary_get_class_count(ResourceManager *resmgr) {
resource_t* r;
- if ((r = scir_find_resource(resmgr, sci_vocab, 996, 0)) == 0)
+ if ((r = resmgr->findResource(sci_vocab, 996, 0)) == 0)
return 0;
return r->size / 4;
@@ -183,7 +183,7 @@ int vocabulary_get_class_count(ResourceManager *resmgr) {
bool vocabulary_get_snames(ResourceManager *resmgr, sci_version_t version, Common::StringList &selectorNames) {
int count;
- resource_t *r = scir_find_resource(resmgr, sci_vocab, 997, 0);
+ resource_t *r = resmgr->findResource(sci_vocab, 997, 0);
if (!r) // No such resource?
return false;
@@ -218,7 +218,7 @@ int vocabulary_lookup_sname(const Common::StringList &selectorNames, const char
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);
+ resource_t* r = resmgr->findResource(sci_vocab, VOCAB_RESOURCE_OPCODES, 0);
// if the resource couldn't be loaded, leave
if (r == NULL) {
@@ -295,7 +295,7 @@ static char **_vocabulary_get_knames0alt(int *names, resource_t *r) {
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);
+ resource_t *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_knames0(ResourceManager *resmgr, int* names) {
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);
+ resource_t *r = resmgr->findResource(sci_vocab, VOCAB_RESOURCE_KNAMES, 0);
while (pos < r->size) {
int len;