From 898e23d6a5bcaf2c5077336c1b2fd69772e494e8 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Tue, 3 Jan 2023 12:08:09 -0800 Subject: [PATCH] use lookup instead of hardcoding texpos --- plugins/pathable.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/pathable.cpp b/plugins/pathable.cpp index 344388fae..7ed7fffd0 100644 --- a/plugins/pathable.cpp +++ b/plugins/pathable.cpp @@ -33,6 +33,9 @@ static void paintScreen(df::coord target, bool skip_unrevealed = false) { bool use_graphics = Screen::inGraphicsMode(); + int selected_tile_texpos = 0; + Screen::findGraphicsTile("CURSORS", 4, 3, &selected_tile_texpos); + auto dims = Gui::getDwarfmodeViewDims().map(); for (int y = dims.first.y; y <= dims.second.y; ++y) { for (int x = dims.first.x; x <= dims.second.x; ++x) { @@ -70,7 +73,7 @@ static void paintScreen(df::coord target, bool skip_unrevealed = false) { if (use_graphics) { if (map_pos == target) { - cur_tile.tile = 100711; // highlighted selection + cur_tile.tile = selected_tile_texpos; } else{ cur_tile.tile = can_walk ? 779 : 782; }