aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/include
diff options
context:
space:
mode:
authorMax Horn2009-02-21 21:16:41 +0000
committerMax Horn2009-02-21 21:16:41 +0000
commitff17899d8ef0a9bf82334819444646b4c323b29e (patch)
tree06289cbe5b36c014ea52dc2eb376431d6fc2c9ba /engines/sci/include
parent2acb44d1574abb831c99e11f52f6f956d40b6d8b (diff)
downloadscummvm-rg350-ff17899d8ef0a9bf82334819444646b4c323b29e.tar.gz
scummvm-rg350-ff17899d8ef0a9bf82334819444646b4c323b29e.tar.bz2
scummvm-rg350-ff17899d8ef0a9bf82334819444646b4c323b29e.zip
SCI: Got rid of include/scitypes.h
svn-id: r38746
Diffstat (limited to 'engines/sci/include')
-rw-r--r--engines/sci/include/kernel.h10
-rw-r--r--engines/sci/include/sciresource.h8
-rw-r--r--engines/sci/include/scitypes.h50
-rw-r--r--engines/sci/include/versions.h2
-rw-r--r--engines/sci/include/vm.h18
-rw-r--r--engines/sci/include/vm_types.h2
6 files changed, 18 insertions, 72 deletions
diff --git a/engines/sci/include/kernel.h b/engines/sci/include/kernel.h
index e8b7c39ca4..906e864522 100644
--- a/engines/sci/include/kernel.h
+++ b/engines/sci/include/kernel.h
@@ -57,11 +57,11 @@ typedef struct {
#define GET_SEL32(_o_, _slc_) read_selector(s, _o_, s->selector_map._slc_, __FILE__, __LINE__)
#define GET_SEL32V(_o_, _slc_) (GET_SEL32(_o_, _slc_).offset)
-#define GET_SEL32SV(_o_, _slc_) ((gint16)(GET_SEL32(_o_, _slc_).offset))
+#define GET_SEL32SV(_o_, _slc_) ((int16)(GET_SEL32(_o_, _slc_).offset))
/* Retrieves a selector from an object
** Parameters: (reg_t) object: The address of the object which the selector should be read from
** (selector_name) selector: The selector to read
-** Returns : (gint16/guint16/reg_t) The selector value
+** Returns : (int16/uint16/reg_t) The selector value
** This macro halts on error. 'selector' must be a selector name registered in vm.h's
** selector_map_t and mapped in script.c.
*/
@@ -71,7 +71,7 @@ typedef struct {
/* Writes a selector value to an object
** Parameters: (reg_t) object: The address of the object which the selector should be written to
** (selector_name) selector: The selector to read
-** (gint16) value: The value to write
+** (int16) value: The value to write
** Returns : (void)
** This macro halts on error. 'selector' must be a selector name registered in vm.h's
** selector_map_t and mapped in script.c.
@@ -140,8 +140,8 @@ bool is_object(EngineState *s, reg_t obj);
#define KP_ALT(x, alt) ((x < argc)? argv[x] : (alt))
-#define KP_UINT(x) ((guint16) x.offset)
-#define KP_SINT(x) ((gint16) x.offset)
+#define KP_UINT(x) ((uint16) x.offset)
+#define KP_SINT(x) ((int16) x.offset)
#define SKPV(x) KP_SINT(argv[x])
diff --git a/engines/sci/include/sciresource.h b/engines/sci/include/sciresource.h
index 1dd35b5d8d..37af0ec695 100644
--- a/engines/sci/include/sciresource.h
+++ b/engines/sci/include/sciresource.h
@@ -35,8 +35,6 @@ namespace Common {
class ReadStream;
}
-#include "sci/include/scitypes.h"
-
namespace Sci {
/** The maximum allowed size for a compressed or decompressed resource */
@@ -145,7 +143,7 @@ struct resource_t {
unsigned short number;
unsigned short type;
- guint16 id; /* contains number and type */
+ uint16 id; /* contains number and type */
unsigned int size;
@@ -376,11 +374,11 @@ int decompress11(resource_t *result, Common::ReadStream &stream, int sci_version
*/
-int decrypt2(guint8* dest, guint8* src, int length, int complength);
+int decrypt2(uint8* dest, uint8* src, int length, int complength);
/* Huffman token decryptor - defined in decompress0.c and used in decompress01.c
*/
-int decrypt4(guint8* dest, guint8* src, int length, int complength);
+int decrypt4(uint8* dest, uint8* src, int length, int complength);
/* DCL inflate- implemented in decompress1.c
*/
diff --git a/engines/sci/include/scitypes.h b/engines/sci/include/scitypes.h
deleted file mode 100644
index f7bd150d02..0000000000
--- a/engines/sci/include/scitypes.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-#ifndef SCI_TYPES
-#define SCI_TYPES
-
-#include "common/scummsys.h"
-
-namespace Sci {
-
-typedef int8 gint8;
-typedef uint8 guint8;
-
-typedef int16 gint16;
-typedef uint16 guint16;
-
-typedef int32 gint32;
-typedef uint32 guint32;
-
-#undef byte
-
-typedef gint8 sbyte;
-typedef guint8 byte;
-typedef guint16 word;
-
-} // End of namespace Sci
-
-#endif /* !SCI_TYPES */
diff --git a/engines/sci/include/versions.h b/engines/sci/include/versions.h
index da06f3f2c8..2fdf61ac7a 100644
--- a/engines/sci/include/versions.h
+++ b/engines/sci/include/versions.h
@@ -28,8 +28,6 @@
#ifndef _SCI_VERSIONS_H_
#define _SCI_VERSIONS_H_
-#include "sci/include/scitypes.h"
-
namespace Sci {
#define SCI_VERSION(_major_, _minor_, _patchlevel_) (((_major_)<<20) | ((_minor_)<<10) | _patchlevel_)
diff --git a/engines/sci/include/vm.h b/engines/sci/include/vm.h
index 690c29dbdc..67561b76ed 100644
--- a/engines/sci/include/vm.h
+++ b/engines/sci/include/vm.h
@@ -145,8 +145,8 @@ typedef struct {
int methods_nr;
byte *base; /* Points to a buffer all relative references (code, strings) point to */
byte *base_obj; /* base + object offset within base */
- guint16 *base_method; /* Pointer to the method selector area for this object */
- guint16 *base_vars; /* Pointer to the varselector area for this object */
+ uint16 *base_method; /* Pointer to the method selector area for this object */
+ uint16 *base_vars; /* Pointer to the varselector area for this object */
reg_t *variables;
} object_t;
@@ -189,7 +189,7 @@ typedef struct {
byte *synonyms; /* Synonyms block or 0 if not present*/
byte *heap_start; /* Start of heap if SCI1.1, NULL otherwise */
- guint16 *export_table; /* Abs. offset of the export table or 0 if not present */
+ uint16 *export_table; /* Abs. offset of the export table or 0 if not present */
int_hash_map_t *obj_indices;
@@ -397,7 +397,7 @@ typedef struct {
typedef struct _breakpoint {
int type;
union {
- guint32 address; /* Breakpoints on exports */
+ uint32 address; /* Breakpoints on exports */
char *name; /* Breakpoints on selector names */
} data;
struct _breakpoint *next;
@@ -450,15 +450,15 @@ extern kernel_function* kfuncs[];
extern int max_instance;
/*inline*/
-exec_stack_t *execute_method(EngineState *s, word script, word pubfunct, stack_ptr_t sp, reg_t calling_obj,
- word argc, stack_ptr_t argp);
+exec_stack_t *execute_method(EngineState *s, uint16 script, uint16 pubfunct, stack_ptr_t sp, reg_t calling_obj,
+ uint16 argc, stack_ptr_t argp);
/* Executes function pubfunct of the specified script.
** Parameters: (EngineState *) s: The state which is to be executed with
-** (word) script: The script which is called
-** (word) pubfunct: The exported script function which is to be called
+** (uint16) script: The script which is called
+** (uint16) pubfunct: The exported script function which is to be called
** (stack_ptr_t) sp: Stack pointer position
** (reg_t) calling_obj: The heap address of the object which executed the call
-** (word) argc: Number of arguments supplied
+** (uint16) argc: Number of arguments supplied
** (stack_ptr_t) argp: Pointer to the first supplied argument
** Returns : (exec_stack_t *): A pointer to the new exec stack TOS entry
*/
diff --git a/engines/sci/include/vm_types.h b/engines/sci/include/vm_types.h
index 5bf0d8114e..64fe330189 100644
--- a/engines/sci/include/vm_types.h
+++ b/engines/sci/include/vm_types.h
@@ -26,7 +26,7 @@
#ifndef _SCI_VM_TYPES_H_
#define _SCI_VM_TYPES_H_
-#include "sci/include/scitypes.h"
+#include "common/scummsys.h"
namespace Sci {