From c2d6debcd8bac2a93ba9e17a918cff601a9b68bd Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Sat, 28 Jan 2023 23:59:36 -0800 Subject: [PATCH 1/2] add on/off light textures and expose to lua --- data/art/on-off.png | Bin 0 -> 273 bytes library/LuaApi.cpp | 1 + library/include/modules/Textures.h | 5 +++++ library/modules/Textures.cpp | 7 +++++++ 4 files changed, 13 insertions(+) create mode 100644 data/art/on-off.png diff --git a/data/art/on-off.png b/data/art/on-off.png new file mode 100644 index 0000000000000000000000000000000000000000..2b731e1c6b89ab99485a34c31cf65d6b9cd949b1 GIT binary patch literal 273 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~e!2~3qw63}aq$EpRBT9nv(@M${i&7aJQ}UBi z6+Ckj(^G>|6H_V+Po~-c70vW?aSW-rl{97I#6$&F1ICZ)-u%=4nO3>WISWkSo_JV~ zZ;NB%SI+h9|Lg0Gn3Z;a&TsT!<576T Date: Sun, 29 Jan 2023 00:35:12 -0800 Subject: [PATCH 2/2] use new icons in pathable --- plugins/pathable.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/pathable.cpp b/plugins/pathable.cpp index b66099a1f..dd26a712f 100644 --- a/plugins/pathable.cpp +++ b/plugins/pathable.cpp @@ -1,6 +1,7 @@ #include "modules/Gui.h" #include "modules/Maps.h" #include "modules/Screen.h" +#include "modules/Textures.h" #include "Debug.h" #include "LuaTools.h" @@ -38,6 +39,11 @@ static void paintScreen(df::coord target, bool skip_unrevealed = false) { long pathable_tile_texpos = 779; long unpathable_tile_texpos = 782; + long on_off_texpos = Textures::getOnOffTexposStart(); + if (on_off_texpos > 0) { + pathable_tile_texpos = on_off_texpos + 0; + unpathable_tile_texpos = on_off_texpos + 1; + } auto dims = Gui::getDwarfmodeViewDims().map(); for (int y = dims.first.y; y <= dims.second.y; ++y) {