shithub: cstory

Download patch

ref: 0424c3e275810b04599f9f2d50d9426d13fe798b
parent: a3bb651194f90d5022ab5d2c749d084f8752bb22
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Sep 4 09:51:49 EDT 2019

More portability improvements

Now this actually compile on Linux, but it doesn't run.

--- a/Makefile
+++ b/Makefile
@@ -34,12 +34,6 @@
 	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 @@
 		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 @@
 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
--- a/README.md
+++ b/README.md
@@ -25,6 +25,7 @@
 * `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)
--- a/src/Organya.cpp
+++ b/src/Organya.cpp
@@ -397,9 +397,6 @@
 // 曲情報を設定。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 @@
 	if (flag & SETWAIT)
 	{
 		info.wait = mi->wait;
-#ifndef FIX_BUGS
-		itoa(mi->wait, str, 10);
-#endif
 	}
 
 	if (flag & SETREPEAT)
--