From 0f21814c4177d6406bbbb5d3c594e38485633f91 Mon Sep 17 00:00:00 2001 From: doyle Date: Sat, 14 Oct 2023 13:21:38 +1100 Subject: [PATCH] fp: Use correctly sized end-screen graphic --- Data/Textures/atlas.png | 4 ++-- Data/Textures/atlas.txt | 4 ++-- Data/Textures/atlas/end_screen.png | 4 ++-- feely_pona.cpp | 34 +++++++++++++++--------------- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Data/Textures/atlas.png b/Data/Textures/atlas.png index dfbe039..7e63ba6 100644 --- a/Data/Textures/atlas.png +++ b/Data/Textures/atlas.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:98e2f1d2b9f433270c5dcaeace69cfba358d09abadb5c1d401403d3163b2a7c6 -size 13761750 +oid sha256:07f942ce81957e8ab70fcc60ef823d89670803c9e4e17cc681213db475c6e4c4 +size 13979505 diff --git a/Data/Textures/atlas.txt b/Data/Textures/atlas.txt index a17263c..4e1aee4 100644 --- a/Data/Textures/atlas.txt +++ b/Data/Textures/atlas.txt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:12e87642f9a6f1e5e0c6096a0280b64f99b0460841a05ffebe7593c21dd39f1e -size 11512 +oid sha256:39c78d7d9439b82ff19853e42149c52f6c1098d7dbef097b16e8544a0fe53b91 +size 11501 diff --git a/Data/Textures/atlas/end_screen.png b/Data/Textures/atlas/end_screen.png index 827b169..d919a53 100644 --- a/Data/Textures/atlas/end_screen.png +++ b/Data/Textures/atlas/end_screen.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68909215c9c7faf68710ec8e8aa580a1cddb650b8df4a898a08379e8b919f26b -size 70490 +oid sha256:4495df5d3c52cb55e6ea8db061d390779aa3de09277526baaef5fbb4f51f8043 +size 167029 diff --git a/feely_pona.cpp b/feely_pona.cpp index 916f81e..12e4478 100644 --- a/feely_pona.cpp +++ b/feely_pona.cpp @@ -3269,6 +3269,23 @@ void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *renderer, tex_scalar = desired_width / tex_rect.size.w; } + // NOTE: Draw title text =========================================================== + { + TELY_AssetSpriteAnimation *anim = TELY_Asset_GetSpriteAnimation(&game->atlas_sprite_sheet, g_anim_names.intro_screen_title); + Dqn_Rect tex_rect = game->atlas_sprite_sheet.rects.data[anim->index]; + Dqn_Rect dest_rect = {}; + dest_rect.size = tex_rect.size * tex_scalar; + dest_rect.pos = Dqn_Rect_InterpolatedPoint(window_rect, Dqn_V2_InitNx2(0.5f, 0.5f)) - (dest_rect.size * .5f); + + TELY_Render_TextureColourV4(renderer, + game->atlas_sprite_sheet.tex_handle, + tex_rect, + dest_rect, + Dqn_V2_Zero /*rotate origin*/, + 0.f /*rotation*/, + TELY_COLOUR_WHITE_V4); + } + if (game->play.state == FP_GameState_IntroScreen) { // NOTE: Draw terry logo =========================================================== { @@ -3287,23 +3304,6 @@ void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *renderer, TELY_COLOUR_WHITE_V4); } - // NOTE: Draw title text =========================================================== - { - TELY_AssetSpriteAnimation *anim = TELY_Asset_GetSpriteAnimation(&game->atlas_sprite_sheet, g_anim_names.intro_screen_title); - Dqn_Rect tex_rect = game->atlas_sprite_sheet.rects.data[anim->index]; - Dqn_Rect dest_rect = {}; - dest_rect.size = tex_rect.size * tex_scalar; - dest_rect.pos = Dqn_Rect_InterpolatedPoint(window_rect, Dqn_V2_InitNx2(0.5f, 0.5f)) - (dest_rect.size * .5f); - - TELY_Render_TextureColourV4(renderer, - game->atlas_sprite_sheet.tex_handle, - tex_rect, - dest_rect, - Dqn_V2_Zero /*rotate origin*/, - 0.f /*rotation*/, - TELY_COLOUR_WHITE_V4); - } - // NOTE: Draw title subtitle ======================================================= { TELY_AssetSpriteAnimation *anim = TELY_Asset_GetSpriteAnimation(&game->atlas_sprite_sheet, g_anim_names.intro_screen_subtitle);