diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-02-06 18:24:59 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-02-06 18:24:59 +0100 |
| commit | d060e3a50c987d10799ccc739bdbf9d7d7a13c10 (patch) | |
| tree | 4b5585383ada85608b57bcf76e5828817962fddf /lib/nes/app/graphics/renderer.hh | |
| parent | dbed1c0fa5599b1b96c221b89b10f1e350351645 (diff) | |
implement settings
Diffstat (limited to 'lib/nes/app/graphics/renderer.hh')
| -rw-r--r-- | lib/nes/app/graphics/renderer.hh | 7 |
1 files changed, 3 insertions, 4 deletions
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<typename... Args> auto render_text_format( @@ -55,8 +55,7 @@ namespace nes::app { string_buffer<width> buffer{}; buffer.append_format(fmt, args...); - render_text(x, y, buffer.get_result(), c, attrs); - return static_cast<u32>(buffer.get_result().length()); + return render_text(x, y, buffer.get_result(), c, attrs); } template<typename... Args> @@ -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 |
