From 0424c3e275810b04599f9f2d50d9426d13fe798b Mon Sep 17 00:00:00 2001 From: Clownacy Date: Wed, 4 Sep 2019 13:51:49 +0000 Subject: [PATCH] More portability improvements Now this actually compile on Linux, but it doesn't run. --- Makefile | 18 +++++++----------- README.md | 1 + src/Organya.cpp | 6 ------ 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 5f4a1b58..337a4823 100644 --- a/Makefile +++ b/Makefile @@ -34,12 +34,6 @@ ifeq ($(FIX_BUGS), 1) CXXFLAGS += -DFIX_BUGS endif -ifeq ($(CONSOLE), 1) - CXXFLAGS += -mconsole -else - CXXFLAGS += -mwindows -endif - ifeq ($(DEBUG_SAVE), 1) CXXFLAGS += -DDEBUG_SAVE endif @@ -207,11 +201,11 @@ ifeq ($(RENDERER), OpenGL3) LIBS += `pkg-config glew --libs` endif -# ifeq ($(WINDOWS), 1) + ifeq ($(WINDOWS), 1) LIBS += -lopengl32 -# else -# LIBS += -lGL -# endif + else + LIBS += -lGL + endif else ifeq ($(RENDERER), Texture) SOURCES += src/Backends/Rendering/SDLTexture else ifeq ($(RENDERER), Surface) @@ -225,7 +219,9 @@ endif OBJECTS = $(addprefix obj/$(FILENAME)/, $(addsuffix .o, $(SOURCES))) DEPENDENCIES = $(addprefix obj/$(FILENAME)/, $(addsuffix .o.d, $(SOURCES))) -OBJECTS += obj/$(FILENAME)/windows_resources.o +ifeq ($(WINDOWS), 1) + OBJECTS += obj/$(FILENAME)/windows_resources.o +endif all: $(BUILD_DIRECTORY)/$(FILENAME) $(BUILD_DIRECTORY)/data $(BUILD_DIRECTORY)/$(DOCONFIG_FILENAME) @echo Finished diff --git a/README.md b/README.md index 4b595e2f..62167147 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Run 'make' in this folder, preferably with some of the following settings: * `STATIC=1` - Produce a statically-linked executable (so you don't need to bundle DLL files) * `JAPANESE=1` - Enable the Japanese-language build (instead of the unofficial Aeon Genesis English translation) * `FIX_BUGS=1` - Fix bugs in the game (see [src/Bug Fixes.txt](src/Bug%20Fixes.txt)) +* `WINDOWS=1` - Build for Windows * `DEBUG_SAVE=1` - Re-enable the ability to drag-and-drop save files onto the window * `RENDERER=OpenGL3` - Use the hardware-accelerated OpenGL 3.2 renderer * `RENDERER=Texture` - Use the hardware-accelerated SDL2 Texture API renderer (default) diff --git a/src/Organya.cpp b/src/Organya.cpp index e4eeff86..aefac803 100644 --- a/src/Organya.cpp +++ b/src/Organya.cpp @@ -397,9 +397,6 @@ void OrgData::InitOrgData(void) // 曲情報を設定。flagはアイテムを指定 (Set song information. flag specifies an item) BOOL OrgData::SetMusicInfo(MUSICINFO *mi, unsigned long flag) { -#ifndef FIX_BUGS // Leftover debug junk - char str[32]; -#endif int i; if (flag & SETGRID) // グリッドを有効に (Enable grid) @@ -411,9 +408,6 @@ BOOL OrgData::SetMusicInfo(MUSICINFO *mi, unsigned long flag) if (flag & SETWAIT) { info.wait = mi->wait; -#ifndef FIX_BUGS - itoa(mi->wait, str, 10); -#endif } if (flag & SETREPEAT)