aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ds/arm9/source/portdefs.h
diff options
context:
space:
mode:
authorAlejandro Marzini2010-08-06 03:21:21 +0000
committerAlejandro Marzini2010-08-06 03:21:21 +0000
commit33e40e1a20c4cc60031854c87d6da5e461f9eb73 (patch)
treef76425d516e75d147ffbbacbec3fad49297da1b1 /backends/platform/ds/arm9/source/portdefs.h
parentf97809a9a62a2d8840229facb2c2b6f75e37bad3 (diff)
parent6c8bcd2ba1cad1312f0a588ca284110bbbb81ccc (diff)
downloadscummvm-rg350-33e40e1a20c4cc60031854c87d6da5e461f9eb73.tar.gz
scummvm-rg350-33e40e1a20c4cc60031854c87d6da5e461f9eb73.tar.bz2
scummvm-rg350-33e40e1a20c4cc60031854c87d6da5e461f9eb73.zip
Merged from trunk, from r51495 to r51775
svn-id: r51776
Diffstat (limited to 'backends/platform/ds/arm9/source/portdefs.h')
-rw-r--r--backends/platform/ds/arm9/source/portdefs.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/backends/platform/ds/arm9/source/portdefs.h b/backends/platform/ds/arm9/source/portdefs.h
index bdb42993d1..cc38d66a73 100644
--- a/backends/platform/ds/arm9/source/portdefs.h
+++ b/backends/platform/ds/arm9/source/portdefs.h
@@ -26,6 +26,9 @@
#ifndef _PORTDEFS_H_
#define _PORTDEFS_H_
+// Include ndstypes.h for uint16 etc. typedefs
+#include "nds/ndstypes.h"
+
// 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>
@@ -49,6 +52,7 @@
#define STREAM_AUDIO_FROM_DISK
#endif
+// FIXME: What is "NO_DEBUG_MSGS" good for?
#define NO_DEBUG_MSGS
// This is defined in dsmain.cpp
@@ -65,16 +69,22 @@ void consolePrintf(const char *format, ...);
#undef assert
#endif
+#ifdef NDEBUG
+
+#define assert(e) ((void)0)
+
+#else
+
+// FIXME: Shouldn't assert() also bail out / exit / halt the program? Right now we just
+// print an error message...
#define assert(s) \
do { \
- if (!(s)) \
+ if (!(s)) { \
consolePrintf("Assertion failed: '##s##' at file %s, line %d\n", __FILE__, __LINE__); \
+ } \
} while (0)
-//#include "ds-fs.h"
-
-//#define debug(fmt, ...) consolePrintf(fmt, ##__VA_ARGS__)
-//#define debug(fmt, ...) debug(0, fmt, ##__VA_ARGS__)
+#endif
// FIXME: Since I can't change the engine at the moment (post lockdown) this define can go here.
// This define changes the mouse-relative motion which doesn't make sense on a touch screen to