summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fba3971)
raw | patch | inline | side by side (parent: fba3971)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Tue, 10 Nov 2020 11:53:46 +0000 (14:53 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Tue, 10 Nov 2020 12:46:00 +0000 (15:46 +0300) |
src/cmake/i686-w64-mingw32.cmake | [new file with mode: 0755] | patch | blob |
src/cmake/x86_64-w64-mingw32.cmake | [new file with mode: 0755] | patch | blob |
src/gl/render.c | patch | blob | history | |
src/save.c | patch | blob | history |
diff --git a/src/cmake/i686-w64-mingw32.cmake b/src/cmake/i686-w64-mingw32.cmake
--- /dev/null
@@ -0,0 +1,20 @@
+# Usage:
+# cmake -DCMAKE_TOOLCHAIN_FILE=path/to/i686-w64-mingw32.cmake ..
+
+set(CMAKE_SYSTEM_NAME Windows)
+set(TOOLCHAIN_PREFIX i686-w64-mingw32)
+
+# cross compilers to use for C, C++ and Fortran
+set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
+set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
+set(CMAKE_Fortran_COMPILER ${TOOLCHAIN_PREFIX}-gfortran)
+set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
+
+# target environment on the build host system
+set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX}/sys-root/mingw)
+
+# modify default behavior of FIND_XXX() commands
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
\ No newline at end of file
diff --git a/src/cmake/x86_64-w64-mingw32.cmake b/src/cmake/x86_64-w64-mingw32.cmake
--- /dev/null
@@ -0,0 +1,20 @@
+# Usage:
+# cmake -DCMAKE_TOOLCHAIN_FILE=path/to/x86_64-w64-mingw32.cmake ..
+
+set(CMAKE_SYSTEM_NAME Windows)
+set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
+
+# cross compilers to use for C, C++ and Fortran
+set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
+set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
+set(CMAKE_Fortran_COMPILER ${TOOLCHAIN_PREFIX}-gfortran)
+set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
+
+# target environment on the build host system
+set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX}/sys-root/mingw)
+
+# modify default behavior of FIND_XXX() commands
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
\ No newline at end of file
diff --git a/src/gl/render.c b/src/gl/render.c
index d6f021de16a267021e347dfc8cda8b4c3b6eb76f..b7b5c248c67c68ccc7cb9c0a40862ef7ded56596 100644 (file)
--- a/src/gl/render.c
+++ b/src/gl/render.c
}
static void R_draw_player (player_t *p) {
- enum {STAND, GO, DIE, SLOP, DEAD, MESS, OUT, FALL}; // copypasted from player.c!
+ enum {STAND, GO, DIE, SLOP, DEAD, MESS, OUT_, FALL}; // copypasted from player.c!
static const int wytab[] = {-1, -2, -1, 0};
int s = 'A';
int w = 0;
case SLOP:
s = plr_slopanim[p->s];
break;
- case OUT:
+ case OUT_:
s = 0;
break;
}
diff --git a/src/save.c b/src/save.c
index fe52cc4982c6f3985774ed8da7d7aeb2c76e1381..27534214bf681a495663bd351bb60061bcf3c056 100644 (file)
--- a/src/save.c
+++ b/src/save.c
static char *getsavfpname (int n, int ro) {
static char fn[] = "savgame0.dat";
+ static char p[100];
fn[7] = n + '0';
#ifndef WIN32
- static char p[100];
char *e = getenv("HOME");
strncpy(p, e, 60);
strcat(p, "/.flatwaifu");