From a108df30a753bc062d2e2c041c70a4477f08b671 Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Wed, 30 Dec 2009 21:11:38 +0000 Subject: Add Nintendo 64 port to trunk. svn-id: r46773 --- common/debug.cpp | 7 +++++++ common/scummsys.h | 25 +++++++++++++++++++++++++ common/util.cpp | 3 +++ 3 files changed, 35 insertions(+) (limited to 'common') diff --git a/common/debug.cpp b/common/debug.cpp index 11b36e7d12..afdb794273 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -45,6 +45,13 @@ #define fflush(file) DS::std_fflush(file) #endif +#ifdef __N64__ + #include + + #define fputs(str, file) asm("nop"); + #define fflush(a) asm("nop"); + #define OutputDebugString addLineTextLayer +#endif // TODO: Move gDebugLevel into namespace Common. diff --git a/common/scummsys.h b/common/scummsys.h index aa801afd03..98dd47e171 100644 --- a/common/scummsys.h +++ b/common/scummsys.h @@ -301,6 +301,31 @@ #define SCUMM_LITTLE_ENDIAN #define SCUMM_NEED_ALIGNMENT +#elif defined(__N64__) + + #define scumm_stricmp strcasecmp + #define scumm_strnicmp strncasecmp + + #define SCUMM_BIG_ENDIAN + #define SCUMM_NEED_ALIGNMENT + + #define STRINGBUFLEN 256 + + #define SCUMMVM_DONT_DEFINE_TYPES + typedef unsigned char byte; + + typedef unsigned char uint8; + typedef signed char int8; + + typedef unsigned short int uint16; + typedef signed short int int16; + + typedef unsigned int uint32; + typedef signed int int32; + + typedef unsigned long long uint64; + typedef signed long long int64; + #elif defined(__PSP__) #include diff --git a/common/util.cpp b/common/util.cpp index 94f5906b80..d131064e6c 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -46,6 +46,9 @@ extern bool isSmartphone(); #define fputs(str, file) DS::std_fwrite(str, strlen(str), 1, file) #endif +#ifdef __N64__ + #define fputs(str, file) asm("nop"); +#endif namespace Common { -- cgit v1.2.3