diff options
author | Tony Puccinelli | 2010-08-10 23:21:08 +0000 |
---|---|---|
committer | Tony Puccinelli | 2010-08-10 23:21:08 +0000 |
commit | 682807f0e916b189c69b60765418ee1ccc327cbf (patch) | |
tree | e8b220b934f6b14d4dac290181fce0c1b209579a /backends/platform/ds/arm9/source/portdefs.h | |
parent | 83f1531cb8fa5ba43c246143ecdde2cb1d140a8e (diff) | |
parent | fffec23a02cc88ed8daba0a3b50007b7e220c075 (diff) | |
download | scummvm-rg350-682807f0e916b189c69b60765418ee1ccc327cbf.tar.gz scummvm-rg350-682807f0e916b189c69b60765418ee1ccc327cbf.tar.bz2 scummvm-rg350-682807f0e916b189c69b60765418ee1ccc327cbf.zip |
merged trunk into branch, reverted Cruise Singleton changes
svn-id: r51961
Diffstat (limited to 'backends/platform/ds/arm9/source/portdefs.h')
-rw-r--r-- | backends/platform/ds/arm9/source/portdefs.h | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/backends/platform/ds/arm9/source/portdefs.h b/backends/platform/ds/arm9/source/portdefs.h index 5472b711b8..cc38d66a73 100644 --- a/backends/platform/ds/arm9/source/portdefs.h +++ b/backends/platform/ds/arm9/source/portdefs.h @@ -8,39 +8,29 @@ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ * */ #ifndef _PORTDEFS_H_ #define _PORTDEFS_H_ - - -/* -typedef unsigned char u8; -typedef signed char s8; - -typedef unsigned short u16; -typedef signed short s16; - -typedef unsigned int u32; -typedef signed int s32; -*/ - +// 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. +// 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> @@ -50,18 +40,21 @@ typedef signed int s32; #define double float -#define CT_NO_TRANSPARENCY - +#ifndef DISABLE_TEXT_CONSOLE #define DISABLE_TEXT_CONSOLE +#endif + +#ifndef DISABLE_COMMAND_LINE #define DISABLE_COMMAND_LINE +#endif +#ifndef STREAM_AUDIO_FROM_DISK #define STREAM_AUDIO_FROM_DISK +#endif -//#undef assert -//#define assert(expr) consolePrintf("Asserted!") +// FIXME: What is "NO_DEBUG_MSGS" good for? #define NO_DEBUG_MSGS - // This is defined in dsmain.cpp #ifdef __cplusplus extern "C" { @@ -76,14 +69,22 @@ void consolePrintf(const char *format, ...); #undef assert #endif -#define assert(s) if (!(s)) consolePrintf("Assertion failed: '##s##' at file %s, line %d\n", __FILE__, __LINE__) +#ifdef NDEBUG -//#include "ds-fs.h" +#define assert(e) ((void)0) -//#define debug(fmt, ...) consolePrintf(fmt, ##__VA_ARGS__) -//#define debug(fmt, ...) debug(0, fmt, ##__VA_ARGS__) +#else -#define ITCM_DATA __attribute__((section(".itcm"))) +// 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)) { \ + consolePrintf("Assertion failed: '##s##' at file %s, line %d\n", __FILE__, __LINE__); \ + } \ + } while (0) + +#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 |