summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkipcode66 <egamer1010@gmail.com>2021-01-12 20:28:04 -0500
committerkipcode66 <egamer1010@gmail.com>2021-01-12 20:28:04 -0500
commitef13ceee12818a2b7a052068d5936ae3e3a32d2d (patch)
treee627e1fc7599d5d3d620728e48679ba3f92ef58a
parent2ebf2e1b67edac744cbf4917969f6e4589e3e290 (diff)
start of wii port
-rw-r--r--Makefile4
-rw-r--r--include/card.h5
2 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 34e15d4..57d3ed6 100644
--- a/Makefile
+++ b/Makefile
@@ -22,12 +22,14 @@ EXTERNAL := external
DATA := data
INCLUDES := include external
MAKEFILES := $(shell find . -mindepth 2 -name Makefile)
+REGION := "NTSCU"
+PLATFORM := "GCN"
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
-CFLAGS = -g -c -O2 -Wall $(MACHDEP) $(INCLUDE)
+CFLAGS = -g -c -O2 -Wall $(MACHDEP) $(INCLUDE) -D $(PLATFORM)_$(REGION)
CXXFLAGS = $(CFLAGS)
#---------------------------------------------------------------------------------
diff --git a/include/card.h b/include/card.h
index 4b3a3b8..a38b0c3 100644
--- a/include/card.h
+++ b/include/card.h
@@ -62,7 +62,12 @@ typedef struct CARDStat {
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
+#ifdef WII_PLATFORM
+int32_t my_CARDOpen(int32_t channel, char* fileName, CardInfo* fileInfo);
+#define CARDOpen my_CARDOpen
+#else
int32_t CARDOpen(int32_t channel, char* fileName, CardInfo* fileInfo);
+#endif
int32_t CARDRead(CardInfo* fileInfo, void* buf, int32_t length, int32_t offset);
int32_t CARDClose(CardInfo* fileInfo);
int32_t CARDCreate(int32_t channel, char* fileName, uint32_t size, CardInfo* fileInfo);