From 848dad25cbc552bf6389cd20564b132d64518078 Mon Sep 17 00:00:00 2001 From: ALONSO Laurent Date: Sun, 28 Nov 2021 13:07:18 +0100 Subject: [PATCH] game[outdoor]: try to draw correctly wide/large monster... --- src/game/boe.graphutil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/boe.graphutil.cpp b/src/game/boe.graphutil.cpp index f1a5f4fa..6a763a8a 100644 --- a/src/game/boe.graphutil.cpp +++ b/src/game/boe.graphutil.cpp @@ -123,12 +123,12 @@ void draw_monsters() { rect_draw_some_item(src_gw, source_rect, terrain_screen_gworld,to_rect, sf::BlendAlpha); } } - if(picture_wanted < 1000) { + else { for(short k = 0; k < width * height; k++) { source_rect = get_monster_template_rect(picture_wanted,(enc.direction < 4) ? 0 : 1,k); to_rect = monst_rects[(width - 1) * 2 + height - 1][k]; to_rect.offset(13 + 28 * where_draw.x,13 + 36 * where_draw.y); - int which_sheet = m_pic_index[picture_wanted].i / 20; + int which_sheet = (m_pic_index[picture_wanted].i+k) / 20; Texture& monst_gworld = *ResMgr::textures.get("monst" + std::to_string(1 + which_sheet)); rect_draw_some_item(monst_gworld, source_rect, terrain_screen_gworld,to_rect, sf::BlendAlpha); }