diff options
author | vimene <vincent.menegaux@gmail.com> | 2023-11-21 02:26:46 +0100 |
---|---|---|
committer | vimene <vincent.menegaux@gmail.com> | 2023-11-21 02:26:46 +0100 |
commit | 5f5d5d07c3ea8bead4241d6cce9ee14be226610b (patch) | |
tree | c7ff40a360cc6fb4096047f3c6bba22ebb349d8a /src | |
parent | ccd5e68160be5037782516253cb9a5ffa4b830a6 (diff) | |
download | engine-5f5d5d07c3ea8bead4241d6cce9ee14be226610b.tar.gz |
started working on windows support
Diffstat (limited to 'src')
-rw-r--r-- | src/config.h.in | 31 | ||||
-rw-r--r-- | src/main.cpp | 22 |
2 files changed, 32 insertions, 21 deletions
diff --git a/src/config.h.in b/src/config.h.in index 7020488..48c15d1 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -1,8 +1,5 @@ /* src/config.h.in. Generated from configure.ac by autoheader. */ -/* Enable ncurses */ -#undef ENABLE_NCURSES - /* Define to 1 if you have the `floor' function. */ #undef HAVE_FLOOR @@ -36,6 +33,9 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* test */ +#undef HAVE_W32API_H + /* Name of package */ #undef PACKAGE @@ -62,23 +62,32 @@ backward compatibility; new code need not use it. */ #undef STDC_HEADERS +/* test */ +#undef STRICT + /* Version number of package */ #undef VERSION -/* Linux OS */ -#undef VIMENE_LINUX - -/* OS */ -#undef VIMENE_OS - -/* Windows OS */ -#undef VIMENE_WINDOWS +/* test */ +#undef WINVER /* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>, <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT32_T +/* test */ +#undef __GNUWIN32__ + +/* test */ +#undef __WIN95__ + +/* test */ +#undef __WINDOWS__ + +/* test */ +#undef __WXMSW__ + /* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef uint32_t diff --git a/src/main.cpp b/src/main.cpp index 2ee007f..840d2f9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,9 +1,11 @@ #include "config.h" #include <iostream> -//#include <ncurses.h> +#ifdef ENABLE_NCURSES +#include <ncurses.h> +#endif -#if VIMENE_OS==VIMENE_WINDOWS +#ifdef __WINDOWS__ #include <windows.h> #endif @@ -30,7 +32,7 @@ #define PI 3.1415926535f -#if ENABLE_NCURSES==1 +#ifdef ENABLE_NCURSES void main_term() { // init setlocale(LC_ALL, ""); @@ -491,18 +493,18 @@ void main_SDL() { SDL_Quit(); } -#if VIMENE_OS==VIMENE_LINUX +#ifdef __WINDOWS__ +int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow) { + (void) hInstance; + (void) hPrevInstance; + (void) pCmdLine; + (void) nCmdShow; +#else int main(int argc, char *argv[]) { (void) argc; (void) argv; -#elif VIMENE_OS==VIMENE_WINDOWS -int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow) { #endif // main_term(); main_SDL(); -#if VIMENE_OS==VIMENE_LINUX return EXIT_SUCCESS; -#elif VIMENE_OS==VIMENE_WINDOWS - return 0; -#endif } |