diff options
author | Max Horn | 2009-02-21 19:54:15 +0000 |
---|---|---|
committer | Max Horn | 2009-02-21 19:54:15 +0000 |
commit | 041869ed360551d9ebc435a1e7dac418578f6a3b (patch) | |
tree | def2637f27381baf46d35b1dcf3c5bc483565167 /engines/sci/include | |
parent | a25c7debe1d730cbbb5509b81fe8d26bfd412d39 (diff) | |
download | scummvm-rg350-041869ed360551d9ebc435a1e7dac418578f6a3b.tar.gz scummvm-rg350-041869ed360551d9ebc435a1e7dac418578f6a3b.tar.bz2 scummvm-rg350-041869ed360551d9ebc435a1e7dac418578f6a3b.zip |
SCI: Untangling #include dependencies a bit
svn-id: r38740
Diffstat (limited to 'engines/sci/include')
-rw-r--r-- | engines/sci/include/engine.h | 4 | ||||
-rw-r--r-- | engines/sci/include/sci_memory.h | 1 | ||||
-rw-r--r-- | engines/sci/include/sciresource.h | 8 | ||||
-rw-r--r-- | engines/sci/include/script.h | 19 | ||||
-rw-r--r-- | engines/sci/include/sys_strings.h | 24 | ||||
-rw-r--r-- | engines/sci/include/vm.h | 14 | ||||
-rw-r--r-- | engines/sci/include/vocabulary.h | 2 |
7 files changed, 39 insertions, 33 deletions
diff --git a/engines/sci/include/engine.h b/engines/sci/include/engine.h index 27416b3beb..e7425c6929 100644 --- a/engines/sci/include/engine.h +++ b/engines/sci/include/engine.h @@ -33,15 +33,15 @@ namespace Common { class WriteStream; } -#include "sci/tools.h" +#include "sci/include/vocabulary.h" #include "sci/include/sciresource.h" #include "sci/include/script.h" -#include "sci/include/vocabulary.h" #include "sci/include/sciconsole.h" #include "sci/include/vm.h" #include "sci/include/menubar.h" #include "sci/include/versions.h" #include "sci/include/kernel.h" +#include "sci/engine/seg_manager.h" #include "sci/gfx/gfx_state_internal.h" #include "sci/sfx/sfx_engine.h" diff --git a/engines/sci/include/sci_memory.h b/engines/sci/include/sci_memory.h index 85a23a1fc6..d9ba069719 100644 --- a/engines/sci/include/sci_memory.h +++ b/engines/sci/include/sci_memory.h @@ -44,7 +44,6 @@ #define _SCI_MEMORY_H #include "common/scummsys.h" -#include "sci/tools.h" namespace Sci { diff --git a/engines/sci/include/sciresource.h b/engines/sci/include/sciresource.h index 8d885d9d9b..1dd35b5d8d 100644 --- a/engines/sci/include/sciresource.h +++ b/engines/sci/include/sciresource.h @@ -29,11 +29,13 @@ /*#define _SCI_RESOURCE_DEBUG */ /*#define _SCI_DECOMPRESS_DEBUG*/ -#include "common/stream.h" #include "common/str.h" -#include "sci/tools.h" -#include "sci/include/versions.h" +namespace Common { + class ReadStream; +} + +#include "sci/include/scitypes.h" namespace Sci { diff --git a/engines/sci/include/script.h b/engines/sci/include/script.h index 9d3d7ee22a..eb53e1d5aa 100644 --- a/engines/sci/include/script.h +++ b/engines/sci/include/script.h @@ -30,18 +30,21 @@ namespace Sci { +struct EngineState; +struct ResourceManager; + /*#define SCRIPT_DEBUG */ #define SCI_SCRIPTS_NR 1000 -typedef struct script_opcode_ { +struct script_opcode { unsigned opcode; int arg1, arg2, arg3; int pos, size; -} script_opcode; +}; -typedef enum { +enum script_object_types { sci_obj_terminator, sci_obj_object, sci_obj_code, @@ -53,12 +56,12 @@ typedef enum { sci_obj_pointers, sci_obj_preload_text, /* This is really just a flag. */ sci_obj_localvars -} script_object_types; +}; void script_dissect(ResourceManager *resmgr, int res_no, char **snames, int snames_nr); /* Opcode formats as used by script.c */ -typedef enum { +enum opcode_format { Script_Invalid = -1, Script_None = 0, Script_Byte, @@ -75,9 +78,9 @@ typedef enum { Script_Param, Script_Offset, Script_End -} opcode_format; +}; -typedef enum { /* FIXME */ +enum sci_opcodes { /* FIXME */ op_bnot = 0, op_add, op_sub, @@ -201,7 +204,7 @@ typedef enum { /* FIXME */ op_minussli, op_minussti, op_minusspi -} sci_opcodes; +}; extern opcode_format formats[128][4]; diff --git a/engines/sci/include/sys_strings.h b/engines/sci/include/sys_strings.h index b9586268f2..2d89a263d8 100644 --- a/engines/sci/include/sys_strings.h +++ b/engines/sci/include/sys_strings.h @@ -23,27 +23,29 @@ * */ -#ifndef _FREESCI_SYSTEM_STRINGS_H_ -#define _FREESCI_SYSTEM_STRINGS_H_ +#ifndef SCI_SYS_STRINGS_H +#define SCI_SYS_STRINGS_H namespace Sci { -#define SYS_STRINGS_MAX 4 +enum { + SYS_STRINGS_MAX = 4, -#define SYS_STRING_SAVEDIR 0 -#define SYS_STRING_PARSER_BASE 1 + SYS_STRING_SAVEDIR = 0, + SYS_STRING_PARSER_BASE = 1, -#define MAX_PARSER_BASE 64 + MAX_PARSER_BASE = 64 +}; -typedef struct { +struct sys_string_t { char *name; int max_size; char *value; -} sys_string_t; +}; -typedef struct { +struct sys_strings_t { sys_string_t strings[SYS_STRINGS_MAX]; -} sys_strings_t; +}; void sys_string_acquire(sys_strings_t *strings, int index, const char *name, int max_len); /* Reserves a new system string @@ -75,4 +77,4 @@ void sys_string_free_all(sys_strings_t *strings); } // End of namespace Sci -#endif /* !_FREESCI_SYSTEM_STRINGS_H_ */ +#endif // SCI_SYS_STRINGS_H diff --git a/engines/sci/include/vm.h b/engines/sci/include/vm.h index 6771e04c06..690c29dbdc 100644 --- a/engines/sci/include/vm.h +++ b/engines/sci/include/vm.h @@ -23,19 +23,17 @@ * */ -/* VM and kernel declarations */ +#ifndef _SCI_VM_H +#define _SCI_VM_H +/* VM and kernel declarations */ -#include "sci/include/script.h" -#include "sci/include/vocabulary.h" -#include "sci/include/versions.h" -#include "sci/engine/seg_manager.h" -#include "sci/include/vm_types.h" +#include "sci/include/versions.h" // for sci_version_t +#include "sci/include/vm_types.h" // for reg_t #include "sci/include/sys_strings.h" #include "sci/include/heapmgr.h" -#ifndef _SCI_VM_H -#define _SCI_VM_H +#include "sci/engine/int_hashmap.h" namespace Sci { diff --git a/engines/sci/include/vocabulary.h b/engines/sci/include/vocabulary.h index 74f745d39d..25f68bce78 100644 --- a/engines/sci/include/vocabulary.h +++ b/engines/sci/include/vocabulary.h @@ -31,6 +31,8 @@ namespace Sci { +struct ResourceManager; + /*#define VOCABULARY_DEBUG */ /*#define SCI_SIMPLE_SAID_CODE */ /* Whether the simplified Said() matching should be used */ /*#define SCI_SIMPLE_SAID_DEBUG */ /* uncomment to enable simple said debugging */ |