about summary refs log tree commit diff stats
path: root/src/subway_map.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-03-11 17:49:13 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2025-03-11 17:49:13 -0400
commit009cfbee0c28bb9c80e305de4a9c430350d6dde6 (patch)
tree18f06b090d2fd749aa5c653ce28977a945a815e0 /src/subway_map.cpp
parent8ad881fed6e388f7a254350532ce58552ef47a1d (diff)
downloadlingo-ap-tracker-009cfbee0c28bb9c80e305de4a9c430350d6dde6.tar.gz
lingo-ap-tracker-009cfbee0c28bb9c80e305de4a9c430350d6dde6.tar.bz2
lingo-ap-tracker-009cfbee0c28bb9c80e305de4a9c430350d6dde6.zip
Handled tilted subway items
Diffstat (limited to 'src/subway_map.cpp')
-rw-r--r--src/subway_map.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/subway_map.cpp b/src/subway_map.cpp index f00f03f..94292fd 100644 --- a/src/subway_map.cpp +++ b/src/subway_map.cpp
@@ -611,7 +611,18 @@ void SubwayMap::Redraw() {
611 if (draw_type == ItemDrawType::kBox) { 611 if (draw_type == ItemDrawType::kBox) {
612 gcdc.SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1)); 612 gcdc.SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1));
613 gcdc.SetBrush(*brush_color); 613 gcdc.SetBrush(*brush_color);
614 gcdc.DrawRectangle(real_area_pos, {real_area_size, real_area_size}); 614
615 if (subway_item.tilted) {
616 constexpr int AREA_TILTED_SIDE =
617 static_cast<int>(AREA_ACTUAL_SIZE / 1.41421356237);
618 const wxPoint poly_points[] = {{AREA_TILTED_SIDE, 0},
619 {2 * AREA_TILTED_SIDE, AREA_TILTED_SIDE},
620 {AREA_TILTED_SIDE, 2 * AREA_TILTED_SIDE},
621 {0, AREA_TILTED_SIDE}};
622 gcdc.DrawPolygon(4, poly_points, subway_item.x, subway_item.y);
623 } else {
624 gcdc.DrawRectangle(real_area_pos, {real_area_size, real_area_size});
625 }
615 } else if (draw_type == ItemDrawType::kOwl || draw_type == ItemDrawType::kOwlExit) { 626 } else if (draw_type == ItemDrawType::kOwl || draw_type == ItemDrawType::kOwlExit) {
616 gcdc.SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1)); 627 gcdc.SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1));
617 gcdc.SetBrush(*brush_color); 628 gcdc.SetBrush(*brush_color);