From 35e33646750a7a315fd2c3fd15cdbe2ffc29131c Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 24 Feb 2009 02:59:50 +0000 Subject: SCI: Renamed int_hashmap to IntMapper, and added docs that explain that this is *not* a hashmap (at least not a plain hashmap) svn-id: r38823 --- engines/sci/include/vm.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'engines/sci/include') diff --git a/engines/sci/include/vm.h b/engines/sci/include/vm.h index 1a720988de..d89b868e5a 100644 --- a/engines/sci/include/vm.h +++ b/engines/sci/include/vm.h @@ -33,7 +33,7 @@ #include "sci/include/sys_strings.h" #include "sci/include/heapmgr.h" -#include "sci/engine/int_hashmap.h" +#include "sci/engine/intmap.h" namespace Sci { @@ -111,7 +111,7 @@ struct class_t { reg_t reg; /* offset; script-relative offset, segment: 0 if not instantiated */ }; -#define RAW_GET_CLASS_INDEX(scr, reg) ((scr)->obj_indices->check_value(reg.offset, false)) +#define RAW_GET_CLASS_INDEX(scr, reg) ((scr)->obj_indices->checkKey(reg.offset, false)) #define RAW_IS_OBJECT(datablock) (getUInt16(((byte *) datablock) + SCRIPT_OBJECT_MAGIC_OFFSET) == SCRIPT_OBJECT_MAGIC_NUMBER) #define IS_CLASS(obj) (obj->variables[SCRIPT_INFO_SELECTOR].offset & SCRIPT_INFO_CLASS) @@ -177,9 +177,6 @@ struct code_block_t { -//#define VM_OBJECT_SET_INDEX(ptr, index) { ((byte *) (ptr))[0] = (index) & 0xff; ((byte *) (ptr))[1] = ((index) >> 8) & 0xff; } -//#define VM_OBJECT_GET_INDEX(scr, reg) (int_hash_map_check_value(scr->obj_indices, reg.offset, 0, NULL)) - struct script_t { int nr; /* Script number */ byte* buf; /* Static data buffer, or NULL if not used */ @@ -191,7 +188,7 @@ struct script_t { byte *heap_start; /* Start of heap if SCI1.1, NULL otherwise */ uint16 *export_table; /* Abs. offset of the export table or 0 if not present */ - int_hash_map_t *obj_indices; + IntMapper *obj_indices; int exports_nr; /* Number of entries in the exports table */ int synonyms_nr; /* Number of entries in the synonyms block */ -- cgit v1.2.3