Rename SDL RENDERER options

Been meaning to do this for ages
This commit is contained in:
Clownacy 2019-10-14 22:20:21 +00:00
parent 13e5f446af
commit 0b8c49b984
3 changed files with 10 additions and 10 deletions

View file

@ -11,7 +11,7 @@ option(JAPANESE "Enable the Japanese-language build" OFF)
option(FIX_BUGS "Fix various bugs in the game" OFF) 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(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) 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) project(CSE2 LANGUAGES C CXX)
@ -249,9 +249,9 @@ endif()
if(RENDERER MATCHES "OpenGL3") if(RENDERER MATCHES "OpenGL3")
target_sources(CSE2 PRIVATE "src/Backends/Rendering/OpenGL3.cpp") 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") 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") target_sources(CSE2 PRIVATE "src/Backends/Rendering/SDLSurface.cpp")
elseif(RENDERER MATCHES "Software") elseif(RENDERER MATCHES "Software")
target_sources(CSE2 PRIVATE "src/Backends/Rendering/Software.cpp") target_sources(CSE2 PRIVATE "src/Backends/Rendering/Software.cpp")

View file

@ -7,7 +7,7 @@ BUILD_DIRECTORY = game
ASSETS_DIRECTORY = assets ASSETS_DIRECTORY = assets
# Default options # Default options
RENDERER ?= Texture RENDERER ?= SDLTexture
ifeq ($(WINDOWS), 1) ifeq ($(WINDOWS), 1)
EXE_EXTENSION = .exe EXE_EXTENSION = .exe
@ -216,9 +216,9 @@ ifeq ($(RENDERER), OpenGL3)
else else
LIBS += -lGL LIBS += -lGL
endif endif
else ifeq ($(RENDERER), Texture) else ifeq ($(RENDERER), SDLTexture)
SOURCES += src/Backends/Rendering/SDLTexture SOURCES += src/Backends/Rendering/SDLTexture
else ifeq ($(RENDERER), Surface) else ifeq ($(RENDERER), SDLSurface)
SOURCES += src/Backends/Rendering/SDLSurface SOURCES += src/Backends/Rendering/SDLSurface
else ifeq ($(RENDERER), Software) else ifeq ($(RENDERER), Software)
SOURCES += src/Backends/Rendering/Software SOURCES += src/Backends/Rendering/Software

View file

@ -64,8 +64,8 @@ Name | Function
`-DDEBUG_SAVE=ON` | Re-enable the ability to drag-and-drop save files onto the window `-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 `-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=OpenGL3` | Use the hardware-accelerated OpenGL 3.2 renderer
`-DRENDERER=Texture` | Use the hardware-accelerated SDL2 Texture API renderer (default) `-DRENDERER=SDLTexture` | Use the hardware-accelerated SDL2 Texture API renderer (default)
`-DRENDERER=Surface` | Use the software-rendered SDL2 Surface API renderer `-DRENDERER=SDLSurface` | Use the software-rendered SDL2 Surface API renderer
`-DRENDERER=Software` | Use the handwritten software renderer `-DRENDERER=Software` | Use the handwritten software renderer
Then compile CSE2 with this command: Then compile CSE2 with this command:
@ -93,8 +93,8 @@ Name | Function
`WINDOWS=1` | Build for Windows `WINDOWS=1` | Build for Windows
`DEBUG_SAVE=1` | Re-enable the ability to drag-and-drop save files onto the window `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=OpenGL3` | Use the hardware-accelerated OpenGL 3.2 renderer
`RENDERER=Texture` | Use the hardware-accelerated SDL2 Texture API renderer (default) `RENDERER=SDLTexture` | Use the hardware-accelerated SDL2 Texture API renderer (default)
`RENDERER=Surface` | Use the software-rendered SDL2 Surface API renderer `RENDERER=SDLSurface` | Use the software-rendered SDL2 Surface API renderer
`RENDERER=Software` | Use the hand-written software renderer `RENDERER=Software` | Use the hand-written software renderer
Once built, the executables and assets can be found in the newly-generated `game` folder. Once built, the executables and assets can be found in the newly-generated `game` folder.