aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/renderer.hpp
diff options
context:
space:
mode:
authorEmil A. Overbeck <emil.a.overbeck@gmail.com>2026-07-18 02:40:25 +0200
committerEmil A. Overbeck <emil.a.overbeck@gmail.com>2026-07-18 02:40:25 +0200
commit0807c89343480b15c7b63a0e864782179eb28ef5 (patch)
tree0da6e1a5600997faf240025fa3dcaaa223a87ae8 /src/engine/renderer.hpp
parent0837872bed3d97d3433d7e0cbafffa7f271ebee1 (diff)
downloadforts_clone-0807c89343480b15c7b63a0e864782179eb28ef5.tar.gz
forts_clone-0807c89343480b15c7b63a0e864782179eb28ef5.zip
More Forts assets
Diffstat (limited to 'src/engine/renderer.hpp')
-rw-r--r--src/engine/renderer.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/engine/renderer.hpp b/src/engine/renderer.hpp
index ddc8055..f5a087f 100644
--- a/src/engine/renderer.hpp
+++ b/src/engine/renderer.hpp
@@ -25,6 +25,13 @@ public:
// Load a texture (cached by path). Returns nullptr on failure.
SDL_Texture* load_texture(const std::string& path);
+ // Load `primary` if set, falling back to `fallback` if it is empty or fails
+ // to load. Used for BYO Forts art ("forts:...") that degrades to the CC0
+ // placeholder when the game is not installed. Returns nullptr if neither
+ // loads.
+ SDL_Texture* load_texture_or(const std::string& primary,
+ const std::string& fallback);
+
// Draw a textured quad in world coordinates, colour-modulated by (r,g,b,a).
void draw_sprite(float cx, float cy, float half_w, float half_h,
float angle, SDL_Texture* tex,