ref: 0b8c49b984d5c7be84372210ec129bbf778c3208
parent: 13e5f446af50b89fe73e7c8b1a40060264939c99
author: Clownacy <Clownacy@users.noreply.github.com>
date: Mon Oct 14 18:20:21 EDT 2019
Rename SDL RENDERER options Been meaning to do this for ages
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,7 @@
option(FIX_BUGS "Fix various bugs in the game" OFF)
option(DEBUG_SAVE "Re-enable the ability to drag-and-drop save files onto the window" OFF)
option(FORCE_LOCAL_LIBS "Compile the built-in versions of SDL2, FreeType, and FLTK instead of using the system-provided ones" OFF)
-set(RENDERER "Texture" CACHE STRING "Which renderer the game should use: 'OpenGL3' for an OpenGL 3.2 renderer, 'Texture' for SDL2's hardware-accelerated Texture API, 'Surface' for SDL2's software-rendered Surface API, or 'Software' for a handwritten software renderer")
+set(RENDERER "Texture" CACHE STRING "Which renderer the game should use: 'OpenGL3' for an OpenGL 3.2 renderer, 'SDLTexture' for SDL2's hardware-accelerated Texture API, 'SDLSurface' for SDL2's software-rendered Surface API, or 'Software' for a handwritten software renderer")
project(CSE2 LANGUAGES C CXX)
@@ -249,9 +249,9 @@
if(RENDERER MATCHES "OpenGL3")
target_sources(CSE2 PRIVATE "src/Backends/Rendering/OpenGL3.cpp")
-elseif(RENDERER MATCHES "Texture")
+elseif(RENDERER MATCHES "SDLTexture")
target_sources(CSE2 PRIVATE "src/Backends/Rendering/SDLTexture.cpp")
-elseif(RENDERER MATCHES "Surface")
+elseif(RENDERER MATCHES "SDLSurface")
target_sources(CSE2 PRIVATE "src/Backends/Rendering/SDLSurface.cpp")
elseif(RENDERER MATCHES "Software")
target_sources(CSE2 PRIVATE "src/Backends/Rendering/Software.cpp")
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@
ASSETS_DIRECTORY = assets
# Default options
-RENDERER ?= Texture
+RENDERER ?= SDLTexture
ifeq ($(WINDOWS), 1)
EXE_EXTENSION = .exe
@@ -216,9 +216,9 @@
else
LIBS += -lGL
endif
-else ifeq ($(RENDERER), Texture)
+else ifeq ($(RENDERER), SDLTexture)
SOURCES += src/Backends/Rendering/SDLTexture
-else ifeq ($(RENDERER), Surface)
+else ifeq ($(RENDERER), SDLSurface)
SOURCES += src/Backends/Rendering/SDLSurface
else ifeq ($(RENDERER), Software)
SOURCES += src/Backends/Rendering/Software
--- a/README.md
+++ b/README.md
@@ -64,8 +64,8 @@
`-DDEBUG_SAVE=ON` | Re-enable the ability to drag-and-drop save files onto the window
`-DFORCE_LOCAL_LIBS=ON` | Compile the built-in versions of SDL2, FreeType, and FLTK instead of using the system-provided ones
`-DRENDERER=OpenGL3` | Use the hardware-accelerated OpenGL 3.2 renderer
-`-DRENDERER=Texture` | Use the hardware-accelerated SDL2 Texture API renderer (default)
-`-DRENDERER=Surface` | Use the software-rendered SDL2 Surface API renderer
+`-DRENDERER=SDLTexture` | Use the hardware-accelerated SDL2 Texture API renderer (default)
+`-DRENDERER=SDLSurface` | Use the software-rendered SDL2 Surface API renderer
`-DRENDERER=Software` | Use the handwritten software renderer
Then compile CSE2 with this command:
@@ -93,8 +93,8 @@
`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)
-`RENDERER=Surface` | Use the software-rendered SDL2 Surface API renderer
+`RENDERER=SDLTexture` | Use the hardware-accelerated SDL2 Texture API renderer (default)
+`RENDERER=SDLSurface` | Use the software-rendered SDL2 Surface API renderer
`RENDERER=Software` | Use the hand-written software renderer
Once built, the executables and assets can be found in the newly-generated `game` folder.
--
⑨