mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
SCI: Untangling #include dependencies a bit
svn-id: r38740
This commit is contained in:
parent
a25c7debe1
commit
041869ed36
@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
#include "sci/engine/message.h"
|
||||
#include "sci/tools.h"
|
||||
|
||||
namespace Sci {
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "sci/tools.h"
|
||||
#include "sci/include/sys_strings.h"
|
||||
#include "sci/include/sci_memory.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"
|
||||
|
||||
|
@ -44,7 +44,6 @@
|
||||
#define _SCI_MEMORY_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "sci/tools.h"
|
||||
|
||||
namespace Sci {
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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];
|
||||
|
||||
|
@ -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
|
||||
|
@ -23,19 +23,17 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#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 {
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -27,6 +27,9 @@
|
||||
** This is for SCI version 0 style compression.
|
||||
*/
|
||||
|
||||
#include "common/stream.h"
|
||||
#include "common/endian.h"
|
||||
|
||||
#include "sci/include/sci_memory.h"
|
||||
#include "sci/include/sciresource.h"
|
||||
|
||||
@ -188,7 +191,7 @@ gint16 getc2(guint8 *node, guint8 *src, guint16 *bytectr, guint16 *bitctr, int c
|
||||
node += next << 1;
|
||||
}
|
||||
|
||||
return getInt16(node);
|
||||
return (int16)READ_UINT16(node);
|
||||
}
|
||||
|
||||
// Huffman token decryptor
|
||||
|
@ -25,7 +25,9 @@
|
||||
|
||||
// Reads data from a resource file and stores the result in memory
|
||||
|
||||
#include "common/stream.h"
|
||||
#include "common/util.h"
|
||||
|
||||
#include "sci/include/sci_memory.h"
|
||||
#include "sci/include/sciresource.h"
|
||||
|
||||
|
@ -25,6 +25,8 @@
|
||||
|
||||
// Reads data from a resource file and stores the result in memory
|
||||
|
||||
#include "common/stream.h"
|
||||
|
||||
#include "sci/include/sci_memory.h"
|
||||
#include "sci/include/sciresource.h"
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "common/file.h"
|
||||
#include "common/util.h"
|
||||
|
||||
#include "sci/tools.h"
|
||||
#include "sci/include/sci_memory.h"
|
||||
#include "sci/include/sciresource.h"
|
||||
#include "sci/include/vocabulary.h"
|
||||
|
@ -23,8 +23,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "sci/include/sci_memory.h"
|
||||
#include "common/util.h"
|
||||
#include "sci/tools.h"
|
||||
#include "sci/include/sci_memory.h"
|
||||
|
||||
namespace Sci {
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include "common/mutex.h"
|
||||
|
||||
#include "sci/tools.h"
|
||||
#include "sci/sfx/mixer.h"
|
||||
#include "sci/include/sci_memory.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user