aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ds/arm9
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/ds/arm9')
-rw-r--r--backends/platform/ds/arm9/makefile6
-rw-r--r--backends/platform/ds/arm9/source/portdefs.h20
2 files changed, 17 insertions, 9 deletions
diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile
index fac50178b4..eedf75c256 100644
--- a/backends/platform/ds/arm9/makefile
+++ b/backends/platform/ds/arm9/makefile
@@ -205,7 +205,6 @@ CXX = arm-eabi-g++
LD = arm-eabi-g++
CFLAGS = -Wno-multichar -Wall\
- -Wno-multichar -mcpu=arm9tdmi -mtune=arm9tdmi \
-mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer\
-mthumb-interwork -DUSE_ARM_COSTUME_ASM=1 -DDISABLE_SID
@@ -281,7 +280,6 @@ PORT_OBJS := \
$(portdir)/source/blitters_arm.o \
$(portdir)/source/cdaudio.o \
$(portdir)/source/dsmain.o \
- $(portdir)/../../../fs/ds/ds-fs.o \
$(portdir)/source/gbampsave.o \
$(portdir)/source/scummhelp.o \
$(portdir)/source/osystem_ds.o \
@@ -297,14 +295,14 @@ ifdef USE_PROFILER
endif
-DATA_OBJS :=
+DATA_OBJS := \
$(portdir)/data/icons.o \
$(portdir)/data/keyboard.o \
$(portdir)/data/keyboard_pal.o \
$(portdir)/data/default_font.o \
$(portdir)/data/8x8font_tga.o
-FAT_OBJS :=
+FAT_OBJS := \
$(portdir)/source/fat/disc_io.o \
$(portdir)/source/fat/gba_nds_fat.o \
$(portdir)/source/fat/io_fcsr.o \
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