From dd0a5f17ff07d8adc0a1fc43da3910da1bb3394f Mon Sep 17 00:00:00 2001 From: wvpm <24685035+wvpm@users.noreply.github.com> Date: Mon, 11 Dec 2023 12:40:24 +0100 Subject: Calculate and assign province centers Renamed generate_and_load_province_adjacencies to initialize_province_adjacencies_and_center Calculate and assign province centers Ignore null index and substract 1 Moved province center calculation to load_map_images Revert "Renamed generate_and_load_province_adjacencies to initialize_province_adjacencies_and_center" This reverts commit 8b75bb8f1ea79e883b97987a3a85e254fa3e714b. Remove 0 as vector initial values. Revert "Wait for key to close headless" This reverts commit c7a4956de520a8c3ec53c3b68440b7056f9f5dd6. Use idx instead of province.index -1 Use array_index instead of pixel_index to identify province. Unindent set_terrain Reverted changes in _generate_province_adjacencies Move province center code out of set_terrain Divide by zero check Move province center logic back into set_terrain --- src/openvic-simulation/map/Province.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/openvic-simulation/map/Province.hpp') diff --git a/src/openvic-simulation/map/Province.hpp b/src/openvic-simulation/map/Province.hpp index 0b98588..e73dec3 100644 --- a/src/openvic-simulation/map/Province.hpp +++ b/src/openvic-simulation/map/Province.hpp @@ -43,6 +43,7 @@ namespace OpenVic { }; struct province_positions_t { + fvec2_t center; fvec2_t text; fixed_point_t text_rotation; fixed_point_t text_scale; -- cgit v1.2.3-56-ga3b1