aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/renderer.hpp
diff options
context:
space:
mode:
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,