aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/include
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/include')
-rw-r--r--engines/sci/include/gfx_resource.h4
-rw-r--r--engines/sci/include/kdebug.h4
-rw-r--r--engines/sci/include/kernel.h1
-rw-r--r--engines/sci/include/sci_memory.h10
4 files changed, 10 insertions, 9 deletions
diff --git a/engines/sci/include/gfx_resource.h b/engines/sci/include/gfx_resource.h
index 8632710556..b6c9385035 100644
--- a/engines/sci/include/gfx_resource.h
+++ b/engines/sci/include/gfx_resource.h
@@ -424,13 +424,13 @@ gfxr_endianness_adjust(gfx_pixmap_t *pixmap, gfx_mode_t *mode);
static inline int
-get_uint_16(byte *offset)
+get_uint_16(const byte *offset)
{
return ((unsigned int) offset[0] | (((unsigned int) offset[1]) << 8));
}
static inline int
-get_int_16(byte *offset)
+get_int_16(const byte *offset)
{
return ((int) offset[0] | (((int) offset[1]) << 8));
}
diff --git a/engines/sci/include/kdebug.h b/engines/sci/include/kdebug.h
index 9c69126e41..74db2365eb 100644
--- a/engines/sci/include/kdebug.h
+++ b/engines/sci/include/kdebug.h
@@ -67,7 +67,7 @@ struct _state;
#ifdef SCI_KERNEL_DEBUG
-#ifdef __GNUC__
+#ifdef __GNUC__XXX
#define SCIkdebug(arguments...) _SCIGNUkdebug(__PRETTY_FUNCTION__, ## arguments)
@@ -85,7 +85,7 @@ struct _state;
-#ifdef __GNUC__
+#ifdef __GNUC__XXX
#define SCIkwarn(arguments...) _SCIGNUkdebug(__PRETTY_FUNCTION__, ## arguments)
diff --git a/engines/sci/include/kernel.h b/engines/sci/include/kernel.h
index d34a884cd5..a58f0bfc9d 100644
--- a/engines/sci/include/kernel.h
+++ b/engines/sci/include/kernel.h
@@ -32,6 +32,7 @@
#include "sci/include/kdebug.h"
#include "sci/include/uinput.h"
#include "sci/include/event.h"
+#include "sci/include/vm.h"
#include "sci/include/console.h" /* sciprintf() */
#ifdef HAVE_FNMATCH_H
diff --git a/engines/sci/include/sci_memory.h b/engines/sci/include/sci_memory.h
index 4b02454e1d..ce66a75aa1 100644
--- a/engines/sci/include/sci_memory.h
+++ b/engines/sci/include/sci_memory.h
@@ -134,14 +134,14 @@ do {\
#define ALLOC_MEM(alloc_statement, size, filename, linenum, funcname)\
do {\
- if (size < 0)\
+ if (size == 0)\
{\
- PANIC_MEMORY(size, filename, linenum, funcname, "Cannot allocate negative bytes of memory!")\
- BREAKPOINT()\
+ PANIC_MEMORY(size, filename, linenum, funcname, "WARNING: allocating zero bytes of memory.")\
}\
- else if (size == 0)\
+ else if (!(size > 0))\
{\
- PANIC_MEMORY(size, filename, linenum, funcname, "WARNING: allocating zero bytes of memory.")\
+ PANIC_MEMORY(size, filename, linenum, funcname, "Cannot allocate negative bytes of memory!")\
+ BREAKPOINT()\
}\
\
alloc_statement; /* attempt to allocate the memory */\