From 72639b4d93e990524bb592cc48347efde8aeb301 Mon Sep 17 00:00:00 2001 From: Sergio Padrino Recio Date: Sun, 28 Apr 2019 13:38:15 +0200 Subject: [PATCH] Simplify installation with only 1 folder --- Makefile.switch | 6 +++++- README | 9 ++++----- src/io/dksfile.cpp | 6 ------ src/settings.h | 6 ------ src/triplane.h | 4 ---- 5 files changed, 9 insertions(+), 22 deletions(-) diff --git a/Makefile.switch b/Makefile.switch index 78f306d..5880dd8 100644 --- a/Makefile.switch +++ b/Makefile.switch @@ -57,7 +57,11 @@ ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE CFLAGS := -g -Wall -O2 -ffunction-sections \ $(ARCH) $(DEFINES) -CFLAGS += -D__SWITCH__ $(INCLUDE) `sdl2-config --cflags` -DHAVE_SDL_MIXER "-DTRIPLANE_VERSION=\"$(APP_VERSION)\"" +CFLAGS += -D__SWITCH__ $(INCLUDE) `sdl2-config --cflags` -DHAVE_SDL_MIXER "-DTRIPLANE_VERSION=\"$(APP_VERSION)\"" "-DTRIPLANE_DATA=\".\"" + +ifeq ($(DEBUG),1) + CFLAGS += -DDEBUG +endif CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions diff --git a/README b/README index 50c4698..98a848e 100644 --- a/README +++ b/README @@ -54,13 +54,12 @@ $ make -f Makefile.switch You need to put the following files in your SD card: / (root) | - |-- triplane/ - | | - | |-- fokker.dks - | |-- switch/ | - |-- triplane-turmoil.nro + |-- triplane-turmoil + | + |-- triplane-turmoil.nro + |-- fokker.dks Copyrights ========== diff --git a/src/io/dksfile.cpp b/src/io/dksfile.cpp index 9a2b891..ca0eb94 100644 --- a/src/io/dksfile.cpp +++ b/src/io/dksfile.cpp @@ -36,12 +36,6 @@ #include "util/wutil.h" #include "io/dksfile.h" -#ifdef __SWITCH__ -// Can't set this macro in the Makefile, mingw/msys keeps replacing the / -// with C:/mingw64 ¬_¬' -// -#define TRIPLANE_DATA "/triplane" -#endif #define MAX_ENTRIES 8192 #pragma pack(1) diff --git a/src/settings.h b/src/settings.h index b79c8b8..769a475 100644 --- a/src/settings.h +++ b/src/settings.h @@ -24,15 +24,9 @@ #include #define MAX_PLAYERS_IN_ROSTER 150 -#ifdef __SWITCH__ -#define ROSTER_FILENAME "/triplane/roster.dta" -#define CONFIGURATION_FILENAME "/triplane/triplane.cfg" -#define KEYSET_FILENAME "/triplane/keyset.dta" -#else #define ROSTER_FILENAME "roster.dta" #define CONFIGURATION_FILENAME "triplane.cfg" #define KEYSET_FILENAME "keyset.dta" -#endif struct keymap { SDL_Scancode up; diff --git a/src/triplane.h b/src/triplane.h index fbde077..7eee2d0 100644 --- a/src/triplane.h +++ b/src/triplane.h @@ -32,11 +32,7 @@ #define DKS_FILENAME "fokker.dks" -#ifdef __SWITCH__ -#define CALIBRATION_FILENAME "/triplane/joystic.dta" -#else #define CALIBRATION_FILENAME "joystic.dta" -#endif //\ Picturedata