From 0807c89343480b15c7b63a0e864782179eb28ef5 Mon Sep 17 00:00:00 2001 From: "Emil A. Overbeck" Date: Sat, 18 Jul 2026 02:40:25 +0200 Subject: More Forts assets --- src/engine/renderer.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/engine/renderer.hpp') 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, -- cgit v1.3