Review PrintAMelevList

Closes #49
This commit is contained in:
Alexander Batalov 2023-02-27 15:53:46 +03:00
parent 716ee7a3b8
commit d2bfd8012b

View File

@ -1587,15 +1587,9 @@ static int PrintAMelevList(int a1)
} }
} }
for (int map = 0; map < 5; map++) { for (int index = 0; index < 5; index++) {
if (map == amcty_indx) { int map = get_map_idx_same(amcty_indx, index);
continue; if (map != -1) {
}
if (get_map_idx_same(amcty_indx, map) == -1) {
continue;
}
for (int elevation = 0; elevation < ELEVATION_COUNT; elevation++) { for (int elevation = 0; elevation < ELEVATION_COUNT; elevation++) {
if (automapHeader->offsets[map][elevation] > 0) { if (automapHeader->offsets[map][elevation] > 0) {
sortlist[line].name = map_get_elev_idx(map, elevation); sortlist[line].name = map_get_elev_idx(map, elevation);
@ -1605,6 +1599,7 @@ static int PrintAMelevList(int a1)
} }
} }
} }
}
buf_to_buf(pipbmp[PIPBOY_FRM_BACKGROUND] + PIPBOY_WINDOW_WIDTH * PIPBOY_WINDOW_CONTENT_VIEW_Y + PIPBOY_WINDOW_CONTENT_VIEW_X, buf_to_buf(pipbmp[PIPBOY_FRM_BACKGROUND] + PIPBOY_WINDOW_WIDTH * PIPBOY_WINDOW_CONTENT_VIEW_Y + PIPBOY_WINDOW_CONTENT_VIEW_X,
PIPBOY_WINDOW_CONTENT_VIEW_WIDTH, PIPBOY_WINDOW_CONTENT_VIEW_WIDTH,