From 0f559a2193e031430f263d4fc5882fde6e8278e9 Mon Sep 17 00:00:00 2001 From: Cameron Reikes Date: Sat, 1 Apr 2023 15:14:54 -0700 Subject: [PATCH] Tune scale, correctly show mobile button --- assets/new_level.json | 13 ++++++++++++- main.c | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/assets/new_level.json b/assets/new_level.json index 8df432c..daf4779 100644 --- a/assets/new_level.json +++ b/assets/new_level.json @@ -493,6 +493,17 @@ "width":32, "x":482.666666666667, "y":433.333333333333 + }, + { + "class":"ITEM", + "height":32, + "id":16, + "name":"Boots", + "rotation":0, + "visible":true, + "width":32, + "x":1108, + "y":842.666666666667 }], "opacity":1, "type":"objectgroup", @@ -501,7 +512,7 @@ "y":0 }], "nextlayerid":5, - "nextobjectid":16, + "nextobjectid":17, "orientation":"orthogonal", "renderorder":"right-down", "tiledversion":"1.9.2", diff --git a/main.c b/main.c index 74b176d..235009a 100644 --- a/main.c +++ b/main.c @@ -2252,7 +2252,7 @@ void frame(void) // better for vertical aspect ratios if(screen_size().x < 0.7f*screen_size().y) { - cam.scale = 2.2f; + cam.scale = 2.3f; } else { @@ -3256,7 +3256,7 @@ void frame(void) draw_quad((DrawParams){false, quad_centered(thumbstick_base_pos, V2(thumbstick_base_size(), thumbstick_base_size())), IMG(image_mobile_thumbstick_base), WHITE, .y_coord_sorting = Y_COORD_IN_FRONT}); draw_quad((DrawParams){false, quad_centered(thumbstick_nub_pos, V2(thumbstick_nub_size, thumbstick_nub_size)), IMG(image_mobile_thumbstick_nub), WHITE, .y_coord_sorting = Y_COORD_IN_FRONT}); - if(interacting_with) + if(interacting_with || gete(player->holding_item)) { draw_quad((DrawParams){false, quad_centered(interact_button_pos(), V2(mobile_button_size(), mobile_button_size())), IMG(image_mobile_button), WHITE, .y_coord_sorting = Y_COORD_IN_FRONT}); }