aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ds/arm9/source/portdefs.h
diff options
context:
space:
mode:
authorNeil Millstone2007-04-06 18:34:53 +0000
committerNeil Millstone2007-04-06 18:34:53 +0000
commitc6d41c07558eb74a18e88b3fc68c5ec76bb3f9fe (patch)
treed53d35422e0d3d700a48d4f1bca587eb1b7af79d /backends/platform/ds/arm9/source/portdefs.h
parent40245fe4504ecc7cb26ccfc5b5c7d5d2b15cbbe7 (diff)
downloadscummvm-rg350-c6d41c07558eb74a18e88b3fc68c5ec76bb3f9fe.tar.gz
scummvm-rg350-c6d41c07558eb74a18e88b3fc68c5ec76bb3f9fe.tar.bz2
scummvm-rg350-c6d41c07558eb74a18e88b3fc68c5ec76bb3f9fe.zip
Updating DS port for changes in main codebase. Code changes for DevkitArm r20 and latest libnds.
svn-id: r26394
Diffstat (limited to 'backends/platform/ds/arm9/source/portdefs.h')
-rw-r--r--backends/platform/ds/arm9/source/portdefs.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/backends/platform/ds/arm9/source/portdefs.h b/backends/platform/ds/arm9/source/portdefs.h
index 02d54d3850..2266a1d986 100644
--- a/backends/platform/ds/arm9/source/portdefs.h
+++ b/backends/platform/ds/arm9/source/portdefs.h
@@ -33,11 +33,32 @@ typedef signed int s32;
//#define double float
+// Somebody removed these from scummsys.h, but they're still required, so I'm adding them here
+// in the hope that they'll stay.
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <ctype.h>
+#include <math.h>
+#include <time.h>
+
+
#define CT_NO_TRANSPARENCY
+#include "scummconsole.h"
+
+
+//#undef assert
+//#define assert(expr) consolePrintf("Asserted!")
+#define NO_DEBUG_MSGS
+
+#ifdef assert
#undef assert
-#define assert(expr) consolePrintf("Asserted!")
-//#define NO_DEBUG_MSGS
+#endif
+
+#define assert(s) if (!(s)) consolePrintf("Assertion failed: '##s##' at file %s, line %d\n", __FILE__, __LINE__)
+
#include "ds-fs.h"
//#define debug(fmt, ...) consolePrintf(fmt, ##__VA_ARGS__)
@@ -45,6 +66,13 @@ typedef signed int s32;
#define time(t) DS_time(t)
//#define memcpy(dest, src, size) DS_memcpy(dest, src, size)
+#define ITCM_DATA __attribute__((section(".itcm")))
+
+
+
+#include "common/array.h"
+#include "common/str.h"
+
time_t DS_time(time_t* t);
time_t DS_time(long* t);
void* DS_memcpy(void* s1, void const* s2, size_t n);