From 8fb3f302a098bed2bc10021fc9d9d47ae78ad9a5 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Mon, 15 Jul 2019 17:58:33 +0100 Subject: [PATCH] Got the Makefile working again, and updated the readme --- Makefile | 9 +++++++++ README.md | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/Makefile b/Makefile index 3c4bb65b..a732774b 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,9 @@ NATIVECXX = c++ BUILD_DIRECTORY = game ASSETS_DIRECTORY = assets +# Default options +RENDERER ?= Texture + ifeq ($(RELEASE), 1) CXXFLAGS = -O3 -flto LDFLAGS = -s @@ -202,6 +205,12 @@ ifneq ($(WINDOWS), 1) RESOURCES += ICON/ICON_MINI.bmp endif +ifeq ($(RENDERER), Texture) + SOURCES += Backends/Rendering/SDLTexture.cpp +else ifeq ($(RENDERER), Software) + SOURCES += Backends/Rendering/Software.cpp +endif + OBJECTS = $(addprefix obj/$(FILENAME)/, $(addsuffix .o, $(SOURCES))) DEPENDENCIES = $(addprefix obj/$(FILENAME)/, $(addsuffix .o.d, $(SOURCES))) diff --git a/README.md b/README.md index b05ead4e..c9c734f6 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ You can also add the following flags: * `-DFIX_BUGS=ON` - Fix bugs in the game (see [src/Bug Fixes.txt](src/Bug%20Fixes.txt)) * `-DNONPORTABLE=ON` - Enable bits of code that aren't portable, but are what the original game used * `-DFORCE_LOCAL_LIBS=ON` - Compile the built-in versions of SDL2, FreeType, and FLTK instead of using the system-provided ones +* `-DRENDERER=Texture` - Use the hardware-accelerated SDL2 Texture API renderer (default) +* `-DRENDERER=Software` - Use the software renderer Then compile CSE2 with this command: @@ -53,6 +55,8 @@ Run 'make' in this folder, preferably with some of the following settings: * `WINDOWS=1` - Enable Windows-only features like a unique file/taskbar icon, and system font loading (needed for the font setting in Config.dat to do anything) * `RASPBERRY_PI=1` - Enable tweaks to improve performance on Raspberry Pis * `NONPORTABLE=1` - Enable bits of code that aren't portable, but are what the original game used +* `RENDERER=Texture` - Use the hardware-accelerated SDL2 Texture API renderer (default) +* `RENDERER=Software` - Use the software renderer ### Visual Studio .NET 2003