From d060e3a50c987d10799ccc739bdbf9d7d7a13c10 Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Thu, 6 Feb 2025 18:24:59 +0100 Subject: implement settings --- lib/nes/app/graphics/renderer.hh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/nes/app/graphics/renderer.hh') diff --git a/lib/nes/app/graphics/renderer.hh b/lib/nes/app/graphics/renderer.hh index d4d7cc4..2e24ad3 100644 --- a/lib/nes/app/graphics/renderer.hh +++ b/lib/nes/app/graphics/renderer.hh @@ -46,7 +46,7 @@ namespace nes::app /// Render an image at the given tile coordinates. auto render_image(i32 x, i32 y, image_view) -> void; /// Render a string of text at the given tile coordinates (one tile per character). - auto render_text(i32 x, i32 y, std::string_view, color, text_attributes = text_attributes{}) -> void; + auto render_text(i32 x, i32 y, std::string_view, color, text_attributes = text_attributes{}) -> u32; template auto render_text_format( @@ -55,8 +55,7 @@ namespace nes::app { string_buffer buffer{}; buffer.append_format(fmt, args...); - render_text(x, y, buffer.get_result(), c, attrs); - return static_cast(buffer.get_result().length()); + return render_text(x, y, buffer.get_result(), c, attrs); } template @@ -75,6 +74,6 @@ namespace nes::app private: auto resolve_color(color) const -> rgb; - auto resolve_character(u32) const -> mask_tile; + auto resolve_character(char) const -> mask_tile; }; } // namespace nes::app \ No newline at end of file -- cgit v1.3.1