From 92489ef27dfa4b4bffd439ef3de4f0d1ea0c6f00 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Sun, 8 Jan 2023 11:33:14 -0800 Subject: [PATCH] get things to compile with the recent structure updates --- library/modules/Buildings.cpp | 5 +++-- library/modules/Gui.cpp | 4 ++-- library/modules/Job.cpp | 22 +++++++++---------- .../remotefortressreader/dwarf_control.cpp | 3 +-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/library/modules/Buildings.cpp b/library/modules/Buildings.cpp index 21d63862c..2e7143533 100644 --- a/library/modules/Buildings.cpp +++ b/library/modules/Buildings.cpp @@ -1263,7 +1263,8 @@ bool Buildings::deconstruct(df::building *bld) // Assume: no parties. unlinkRooms(bld); // Assume: not unit destroy target - vector_erase_at(plotinfo->tax_collection.rooms, linear_index(plotinfo->tax_collection.rooms, bld->id)); + int id = bld->id; + vector_erase_at(plotinfo->tax_collection.rooms, linear_index(plotinfo->tax_collection.rooms, id)); // Assume: not used in punishment // Assume: not used in non-own jobs // Assume: does not affect pathfinding @@ -1283,7 +1284,7 @@ bool Buildings::deconstruct(df::building *bld) { auto item = ui_look_list->items[i]; if (item->type == df::ui_look_list::T_items::Building && - item->data.Building == bld) + item->data.building.bld_id == id) { vector_erase_at(ui_look_list->items, i); delete item; diff --git a/library/modules/Gui.cpp b/library/modules/Gui.cpp index bf2b2e745..8a009c1dc 100644 --- a/library/modules/Gui.cpp +++ b/library/modules/Gui.cpp @@ -2024,8 +2024,8 @@ bool Gui::revealInDwarfmodeMap(int32_t x, int32_t y, int32_t z, bool center) *window_x = clip_range(new_win_x, 0, (world->map.x_count - w)); *window_y = clip_range(new_win_y, 0, (world->map.y_count - h)); *window_z = clip_range(new_win_z, 0, (world->map.z_count - 1)); - game->minimap.need_render = true; - game->minimap.need_scan = true; + game->minimap.update = true; + game->minimap.mustmake = true; return true; } diff --git a/library/modules/Job.cpp b/library/modules/Job.cpp index cd574684f..1976d2e12 100644 --- a/library/modules/Job.cpp +++ b/library/modules/Job.cpp @@ -593,17 +593,17 @@ std::string Job::getName(df::job *job) std::string desc; auto button = df::allocate(); - button->reaction_name = job->reaction_name; - button->hist_figure_id = job->hist_figure_id; - button->job_type = job->job_type; - button->item_type = job->item_type; - button->item_subtype = job->item_subtype; - button->mat_type = job->mat_type; - button->mat_index = job->mat_index; - button->item_category = job->item_category; - button->material_category = job->material_category; - - button->getLabel(&desc); + button->mstring = job->reaction_name; + button->spec_id = job->hist_figure_id; + button->jobtype = job->job_type; + button->itemtype = job->item_type; + button->subtype = job->item_subtype; + button->material = job->mat_type; + button->matgloss = job->mat_index; + button->specflag = job->item_category; + button->job_item_flag = job->material_category; + + button->text(&desc); delete button; return desc; diff --git a/plugins/remotefortressreader/dwarf_control.cpp b/plugins/remotefortressreader/dwarf_control.cpp index 5b8f2b282..a96cbdc04 100644 --- a/plugins/remotefortressreader/dwarf_control.cpp +++ b/plugins/remotefortressreader/dwarf_control.cpp @@ -1,3 +1,4 @@ + #include "dwarf_control.h" #include "DataDefs.h" #include "df_version_int.h" @@ -10,8 +11,6 @@ #include "df/building_def_workshopst.h" #include "df/job.h" #include "df/job_list_link.h" -#include "df/interface_button_construction_building_selectorst.h" -#include "df/interface_button_construction_category_selectorst.h" #include "df/plotinfost.h" #include "df/buildreq.h" #include "df/gamest.h"