about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--assets/subway.pngbin222481 -> 232357 bytes
-rw-r--r--assets/subway.yaml440
-rw-r--r--src/game_data.cpp11
-rw-r--r--src/game_data.h2
-rw-r--r--src/subway_map.cpp134
5 files changed, 298 insertions, 289 deletions
diff --git a/assets/subway.png b/assets/subway.png index f8f97cd..8128004 100644 --- a/assets/subway.png +++ b/assets/subway.png
Binary files differ
diff --git a/assets/subway.yaml b/assets/subway.yaml index b691304..f90f945 100644 --- a/assets/subway.yaml +++ b/assets/subway.yaml
@@ -5,50 +5,46 @@
5- pos: [986, 1034] 5- pos: [986, 1034]
6 room: Starting Room 6 room: Starting Room
7 door: Rhyme Room Entrance 7 door: Rhyme Room Entrance
8- pos: [990, 956] 8- pos: [996, 964]
9 special: starting_room_paintings # Early Color Hallways painting is a hardcoded special case 9 special: starting_room_overhead
10 paintings: 10 painting: arrows_painting
11 - arrows_painting 11- pos: [1044, 1012]
12- pos: [905, 841] 12 special: early_color_hallways
13 painting: color_hallways
14- pos: [915, 851]
13 room: Hedge Maze 15 room: Hedge Maze
14 door: Painting Shortcut 16 door: Painting Shortcut
15 paintings: 17 painting: garden_painting_tower2
16 - garden_painting_tower2
17 entrances: 18 entrances:
18 - garden_starting 19 - garden_starting
19- pos: [1066, 841] 20- pos: [1076, 851]
20 room: Courtyard 21 room: Courtyard
21 door: Painting Shortcut 22 door: Painting Shortcut
22 paintings: 23 painting: flower_painting_8
23 - flower_painting_8
24 entrances: 24 entrances:
25 - flower_starting 25 - flower_starting
26- pos: [905, 895] 26- pos: [915, 905]
27 room: The Wondrous (Doorknob) 27 room: The Wondrous (Doorknob)
28 door: Painting Shortcut 28 door: Painting Shortcut
29 paintings: 29 painting: symmetry_painting_a_starter
30 - symmetry_painting_a_starter
31 entrances: 30 entrances:
32 - symmetry_starting 31 - symmetry_starting
33- pos: [1066, 868] 32- pos: [1076, 905]
34 room: Outside The Bold 33 room: Outside The Bold
35 door: Painting Shortcut 34 door: Painting Shortcut
36 paintings: 35 painting: pencil_painting6
37 - pencil_painting6
38 entrances: 36 entrances:
39 - pencil_starting 37 - pencil_starting
40- pos: [1066, 895] 38- pos: [1076, 878]
41 room: Outside The Undeterred 39 room: Outside The Undeterred
42 door: Painting Shortcut 40 door: Painting Shortcut
43 paintings: 41 painting: blueman_painting_3
44 - blueman_painting_3
45 entrances: 42 entrances:
46 - blueman_starting 43 - blueman_starting
47- pos: [905, 868] 44- pos: [915, 878]
48 room: Outside The Agreeable 45 room: Outside The Agreeable
49 door: Painting Shortcut 46 door: Painting Shortcut
50 paintings: 47 painting: eyes_yellow_painting2
51 - eyes_yellow_painting2
52 entrances: 48 entrances:
53 - street_starting 49 - street_starting
54- pos: [1211, 879] 50- pos: [1211, 879]
@@ -63,9 +59,8 @@
63- pos: [1174, 981] 59- pos: [1174, 981]
64 room: Hidden Room 60 room: Hidden Room
65 door: Rhyme Room Entrance 61 door: Rhyme Room Entrance
66- pos: [1116, 939] 62- pos: [1114, 937]
67 paintings: 63 painting: owl_painting
68 - owl_painting
69 entrances: 64 entrances:
70 - owl_hidden 65 - owl_hidden
71- pos: [986, 793] 66- pos: [986, 793]
@@ -86,9 +81,8 @@
86- pos: [1372, 729] 81- pos: [1372, 729]
87 room: Hub Room 82 room: Hub Room
88 door: Traveled Entrance 83 door: Traveled Entrance
89- pos: [1313, 686] 84- pos: [1312, 696]
90 paintings: 85 painting: maze_painting
91 - maze_painting
92 exits: 86 exits:
93 - green_owl 87 - green_owl
94 - green_numbers 88 - green_numbers
@@ -105,19 +99,19 @@
105- pos: [1276, 820] 99- pos: [1276, 820]
106 room: Number Hunt 100 room: Number Hunt
107 door: Eights 101 door: Eights
108- pos: [1263, 867] 102- pos: [1253, 889]
109 paintings: 103 painting: smile_painting_6
110 - smile_painting_6
111 entrances: 104 entrances:
112 - smiley_deadend 105 - smiley_deadend
113- pos: [1013, 1087] 106- pos: [1013, 1087]
114 sunwarp: 107 sunwarp:
115 dots: 6 108 dots: 6
116 type: final 109 type: final
117- pos: [938, 1002] 110- pos: [948, 1012]
118 room: Pilgrim Antechamber 111 room: Pilgrim Antechamber
119 door: Sun Painting 112 door: Sun Painting
120 special: sun_painting 113 special: sun_painting
114 painting: pilgrim_painting2
121- pos: [1053, 1090] 115- pos: [1053, 1090]
122 invisible: true 116 invisible: true
123 special: sun_painting_exit 117 special: sun_painting_exit
@@ -151,9 +145,8 @@
151- pos: [509, 434] 145- pos: [509, 434]
152 room: Crossroads 146 room: Crossroads
153 door: Roof Access 147 door: Roof Access
154- pos: [756, 400] 148- pos: [712, 514]
155 paintings: 149 painting: smile_painting_4
156 - smile_painting_4
157 entrances: 150 entrances:
158 - smiley_crossroads 151 - smiley_crossroads
159- pos: [878, 509] 152- pos: [878, 509]
@@ -172,9 +165,8 @@
172- pos: [954, 247] 165- pos: [954, 247]
173 room: Amen Name Area 166 room: Amen Name Area
174 door: Exit 167 door: Exit
175- pos: [954, 222] 168- pos: [985, 235]
176 paintings: 169 painting: west_afar
177 - west_afar
178- pos: [986, 697] 170- pos: [986, 697]
179 room: The Tenacious 171 room: The Tenacious
180 door: Shortcut to Hub Room 172 door: Shortcut to Hub Room
@@ -205,9 +197,8 @@
205- pos: [1216, 525] 197- pos: [1216, 525]
206 room: Outside The Agreeable 198 room: Outside The Agreeable
207 door: Agreeable Entrance 199 door: Agreeable Entrance
208- pos: [1138, 287] 200- pos: [1156, 299]
209 paintings: 201 painting: eyes_yellow_painting
210 - eyes_yellow_painting
211 exits: 202 exits:
212 - street_starting 203 - street_starting
213- pos: [1088, 385] 204- pos: [1088, 385]
@@ -217,9 +208,8 @@
217- pos: [1195, 445] 208- pos: [1195, 445]
218 room: Compass Room 209 room: Compass Room
219 door: Lookout Entrance 210 door: Lookout Entrance
220- pos: [1214, 457] 211- pos: [1226, 481]
221 paintings: 212 painting: pencil_painting7
222 - pencil_painting7
223 entrances: 213 entrances:
224 - pencil_compass 214 - pencil_compass
225- pos: [1196, 417] 215- pos: [1196, 417]
@@ -248,9 +238,8 @@
248- pos: [1714, 434] 238- pos: [1714, 434]
249 room: Hedge Maze 239 room: Hedge Maze
250 door: Observant Entrance 240 door: Observant Entrance
251- pos: [1477, 343] 241- pos: [1526, 401]
252 paintings: 242 painting: garden_painting_tower
253 - garden_painting_tower
254 exits: 243 exits:
255 - garden_starting 244 - garden_starting
256- pos: [1565, 311] 245- pos: [1565, 311]
@@ -268,19 +257,16 @@
268- pos: [1694, 659] 257- pos: [1694, 659]
269 room: The Incomparable 258 room: The Incomparable
270 door: Eight Door 259 door: Eight Door
271- pos: [1784, 569] 260- pos: [1799, 583]
272 paintings: 261 painting: crown_painting
273 - crown_painting
274 exits: 262 exits:
275 - crown_tower6 263 - crown_tower6
276- pos: [1653, 717] 264- pos: [1644, 685]
277 paintings: 265 painting: eight_painting2
278 - eight_painting2
279 entrances: 266 entrances:
280 - eight_alcove 267 - eight_alcove
281- pos: [1653, 662] 268- pos: [1660, 664]
282 paintings: 269 painting: eight_painting
283 - eight_painting
284 exits: 270 exits:
285 - eight_alcove 271 - eight_alcove
286- pos: [697, 1471] 272- pos: [697, 1471]
@@ -383,10 +369,10 @@
383- pos: [1173, 1248] 369- pos: [1173, 1248]
384 room: Orange Tower Third Floor 370 room: Orange Tower Third Floor
385 door: Rhyme Room Entrance 371 door: Rhyme Room Entrance
386- pos: [1270, 1231] 372- pos: [1274, 1253]
387 paintings: 373 painting: arrows_painting_6
388 - arrows_painting_6 374- pos: [1293, 1234]
389 - flower_painting_5 375 painting: flower_painting_5
390- pos: [1216, 1216] 376- pos: [1216, 1216]
391 sunwarp: 377 sunwarp:
392 dots: 2 378 dots: 2
@@ -405,9 +391,8 @@
405- pos: [878, 155] 391- pos: [878, 155]
406 room: Number Hunt 392 room: Number Hunt
407 door: Eights 393 door: Eights
408- pos: [844, 134] 394- pos: [862, 144]
409 paintings: 395 painting: smile_painting_8
410 - smile_painting_8
411 entrances: 396 entrances:
412 - smiley_hotcrusts 397 - smiley_hotcrusts
413- pos: [798, 155] 398- pos: [798, 155]
@@ -420,59 +405,65 @@
420- pos: [723, 953] 405- pos: [723, 953]
421 room: Orange Tower Fifth Floor 406 room: Orange Tower Fifth Floor
422 door: Welcome Back 407 door: Welcome Back
423- pos: [683, 944] 408- pos: [690, 937]
424 paintings: 409 painting: east_afar
425 - east_afar 410- pos: [535, 1205]
426- pos: [548, 1221] 411 painting: hi_solved_painting3
427 paintings: 412- pos: [1574, 1424]
428 - hi_solved_painting3 413 painting: hi_solved_painting2
429- pos: [1574, 1425] 414- pos: [316, 1269]
430 paintings: 415 painting: arrows_painting_10
431 - hi_solved_painting2 416- pos: [332, 1253]
432- pos: [411, 1186] 417 painting: scenery_painting_5d_2
433 paintings: 418- pos: [347, 1237]
434 - arrows_painting_10 419 painting: panda_painting_2
435 - owl_painting_3
436 - clock_painting
437 - scenery_painting_5d_2
438 - symmetry_painting_b_7
439 - panda_painting_2
440 - crown_painting2
441 - colors_painting2
442 - cherry_painting2
443 - hi_solved_painting
444 entrances: 420 entrances:
445 - owl_tower6
446 - clock_tower6
447 - panda_tower6 421 - panda_tower6
448 - crown_tower6 422- pos: [363, 1221]
449 - apple_tower6 423 painting: colors_painting2
424- pos: [380, 1205]
425 painting: clock_painting
426 entrances:
427 - clock_tower6
428- pos: [396, 1221]
429 painting: hi_solved_painting
450 exits: 430 exits:
451 - hi_scientific 431 - hi_scientific
452- pos: [349, 1124] 432- pos: [380, 1237]
453 paintings: 433 painting: crown_painting2
454 - map_painting2 434 entrances:
435 - crown_tower6
436- pos: [363, 1253]
437 painting: owl_painting_3
438 entrances:
439 - owl_tower6
440- pos: [347, 1269]
441 painting: symmetry_painting_b_7
442- pos: [332, 1285]
443 painting: cherry_painting2
444 entrances:
445 - apple_tower6
446- pos: [360, 1135]
447 # TODO: there isn't really a spot for this one
448 painting: map_painting2
455- pos: [436, 1159] 449- pos: [436, 1159]
456 room: Orange Tower Seventh Floor 450 room: Orange Tower Seventh Floor
457 door: Mastery 451 door: Mastery
458- pos: [544, 1159] 452- pos: [535, 1146]
459 paintings: 453 painting: arrows_painting_11
460 - arrows_painting_11
461- pos: [498, 284] 454- pos: [498, 284]
462 room: Courtyard 455 room: Courtyard
463 door: Green Barrier 456 door: Green Barrier
464- pos: [556, 233] 457- pos: [589, 230]
465 paintings: 458 painting: flower_painting_7
466 - flower_painting_7
467 exits: 459 exits:
468 - flower_starting 460 - flower_starting
469 - flower_arrow 461 - flower_arrow
470- pos: [600, 332] 462- pos: [600, 332]
471 room: Number Hunt 463 room: Number Hunt
472 door: Nines 464 door: Nines
473- pos: [579, 350] 465- pos: [589, 369]
474 paintings: 466 painting: blueman_painting
475 - blueman_painting
476 entrances: 467 entrances:
477 - blueman_courtyard 468 - blueman_courtyard
478- pos: [530, 310] 469- pos: [530, 310]
@@ -508,9 +499,8 @@
508- pos: [922, 107] 499- pos: [922, 107]
509 room: The Colorful (Gray) 500 room: The Colorful (Gray)
510 door: Progress Door 501 door: Progress Door
511- pos: [967, 107] 502- pos: [969, 96]
512 paintings: 503 painting: arrows_painting_12
513 - arrows_painting_12
514- pos: [878, 954] 504- pos: [878, 954]
515 room: Welcome Back Area 505 room: Welcome Back Area
516 door: Shortcut to Starting Room 506 door: Shortcut to Starting Room
@@ -555,17 +545,19 @@
555- pos: [1478, 498] 545- pos: [1478, 498]
556 room: Owl Hallway 546 room: Owl Hallway
557 door: Shortcut to Hedge Maze 547 door: Shortcut to Hedge Maze
558- pos: [1480, 551] 548- pos: [1467, 535]
559 paintings: 549 painting: arrows_painting_8
560 - arrows_painting_8 550- pos: [1467, 562]
561 - maze_painting_2 551 painting: maze_painting_2
562 - owl_painting_2
563 - clock_painting_4
564 entrances: 552 entrances:
565 - green_owl 553 - green_owl
554- pos: [1510, 535]
555 painting: owl_painting_2
566 exits: 556 exits:
567 - owl_hidden 557 - owl_hidden
568 - owl_tower6 558 - owl_tower6
559- pos: [1510, 562]
560 painting: clock_painting_4
569- pos: [1478, 938] 561- pos: [1478, 938]
570 room: Number Hunt 562 room: Number Hunt
571 door: Sevens 563 door: Sevens
@@ -605,15 +597,14 @@
605- pos: [1580, 729] 597- pos: [1580, 729]
606 room: The Incomparable 598 room: The Incomparable
607 door: "Eight Door (Outside The Initiated)" 599 door: "Eight Door (Outside The Initiated)"
608- pos: [1530, 938] 600- pos: [1548, 948]
609 paintings: 601 painting: clock_painting_5
610 - clock_painting_5
611 entrances: 602 entrances:
612 - clock_initiated 603 - clock_initiated
613- pos: [1546, 938] 604- pos: [1575, 969]
614 paintings: 605 painting: arrows_painting_2
615 - clock_painting_2 606- pos: [1575, 926]
616 - arrows_painting_2 607 painting: clock_painting_2
617 exits: 608 exits:
618 - clock_tower6 609 - clock_tower6
619 - clock_initiated 610 - clock_initiated
@@ -621,9 +612,8 @@
621 sunwarp: 612 sunwarp:
622 dots: 3 613 dots: 3
623 type: exit 614 type: exit
624- pos: [1444, 896] 615- pos: [1462, 915]
625 paintings: 616 painting: smile_painting_1
626 - smile_painting_1
627 entrances: 617 entrances:
628 - smiley_initiated 618 - smiley_initiated
629- pos: [1430, 691] 619- pos: [1430, 691]
@@ -668,14 +658,14 @@
668- pos: [1468, 1377] 658- pos: [1468, 1377]
669 room: Outside The Bold 659 room: Outside The Bold
670 door: Bold Entrance 660 door: Bold Entrance
671- pos: [1425, 1358] 661- pos: [1446, 1344]
672 paintings: 662 painting: pencil_painting2
673 - pencil_painting2
674 - north_missing2
675 exits: 663 exits:
676 - pencil_compass 664 - pencil_compass
677 - pencil_starting 665 - pencil_starting
678 - pencil_directional 666 - pencil_directional
667- pos: [1580, 1344]
668 painting: north_missing2
679- pos: [1334, 1419] 669- pos: [1334, 1419]
680 room: Outside The Bold 670 room: Outside The Bold
681 door: Steady Entrance 671 door: Steady Entrance
@@ -697,17 +687,15 @@
697- pos: [242, 1071] 687- pos: [242, 1071]
698 room: Outside The Undeterred 688 room: Outside The Undeterred
699 door: Undeterred Entrance 689 door: Undeterred Entrance
700- pos: [60, 1017] 690- pos: [149, 937]
701 paintings: 691 painting: blueman_painting_2
702 - blueman_painting_2
703 exits: 692 exits:
704 - blueman_courtyard 693 - blueman_courtyard
705 - blueman_starting 694 - blueman_starting
706- pos: [402, 1012] 695- pos: [412, 1017]
707 room: Outside The Undeterred 696 room: Outside The Undeterred
708 door: Green Painting 697 door: Green Painting
709 paintings: 698 painting: maze_painting_3
710 - maze_painting_3
711 entrances: 699 entrances:
712 - green_numbers 700 - green_numbers
713- pos: [134, 1007] 701- pos: [134, 1007]
@@ -738,11 +726,10 @@
738- pos: [525, 1002] 726- pos: [525, 1002]
739 room: Number Hunt 727 room: Number Hunt
740 door: Door to Directional Gallery 728 door: Door to Directional Gallery
741- pos: [659, 1014] 729- pos: [572, 1017]
742 room: Number Hunt 730 room: Number Hunt
743 door: Eights 731 door: Eights
744 paintings: 732 painting: smile_painting_5
745 - smile_painting_5
746 entrances: 733 entrances:
747 - smiley_numbers 734 - smiley_numbers
748- pos: [557, 953] 735- pos: [557, 953]
@@ -766,31 +753,26 @@
766- pos: [242, 980] 753- pos: [242, 980]
767 room: Directional Gallery 754 room: Directional Gallery
768 door: Shortcut to The Undeterred 755 door: Shortcut to The Undeterred
769- pos: [351, 927] 756- pos: [364, 942]
770 paintings: 757 painting: boxes_painting
771 - boxes_painting
772 entrances: 758 entrances:
773 - lattice_directional 759 - lattice_directional
774- pos: [272, 927] 760- pos: [278, 942]
775 paintings: 761 painting: smile_painting_7
776 - smile_painting_7
777 entrances: 762 entrances:
778 - smiley_directional 763 - smiley_directional
779- pos: [214, 822] 764- pos: [278, 803]
780 paintings: 765 painting: cherry_painting
781 - cherry_painting
782 entrances: 766 entrances:
783 - apple_directional 767 - apple_directional
784- pos: [266, 735] 768- pos: [262, 573]
785 room: Number Hunt 769 room: Number Hunt
786 door: Sixes 770 door: Sixes
787 paintings: 771 painting: pencil_painting3
788 - pencil_painting3
789 entrances: 772 entrances:
790 - pencil_directional 773 - pencil_directional
791- pos: [215, 735] 774- pos: [278, 685]
792 paintings: 775 painting: flower_painting_4
793 - flower_painting_4
794- pos: [626, 851] 776- pos: [626, 851]
795 sunwarp: 777 sunwarp:
796 dots: 6 778 dots: 6
@@ -798,21 +780,18 @@
798- pos: [1334, 1377] 780- pos: [1334, 1377]
799 room: Color Hunt 781 room: Color Hunt
800 door: Shortcut to The Steady 782 door: Shortcut to The Steady
801- pos: [1280, 1375] 783- pos: [1312, 1333]
802 paintings: 784 painting: arrows_painting_7
803 - arrows_painting_7 785- pos: [1226, 1333]
804- pos: [1233, 1321]
805 room: Outside The Initiated 786 room: Outside The Initiated
806 door: Entrance 787 door: Entrance
807 paintings: 788 painting: fruitbowl_painting3
808 - fruitbowl_painting3
809- pos: [1260, 1323] 789- pos: [1260, 1323]
810 sunwarp: 790 sunwarp:
811 dots: 5 791 dots: 5
812 type: exit 792 type: exit
813- pos: [1154, 1332] 793- pos: [1092, 1333]
814 paintings: 794 painting: colors_painting
815 - colors_painting
816- pos: [1640, 1260] 795- pos: [1640, 1260]
817 room: The Bearer 796 room: The Bearer
818 door: Backside Door 797 door: Backside Door
@@ -825,10 +804,10 @@
825- pos: [1388, 1152] 804- pos: [1388, 1152]
826 room: Bearer Side Area 805 room: Bearer Side Area
827 door: Shortcut to Tower 806 door: Shortcut to Tower
828- pos: [1273, 1442] 807- pos: [1264, 1430]
829 paintings: 808 painting: pencil_painting5
830 - pencil_painting5 809- pos: [1291, 1430]
831 - pencil_painting4 810 painting: pencil_painting4
832- pos: [1355, 1092] 811- pos: [1355, 1092]
833 room: Knight Night (Final) 812 room: Knight Night (Final)
834 door: Exit 813 door: Exit
@@ -839,9 +818,8 @@
839 # Complex case, because this is also blocked by Knight Night (Final) - Exit 818 # Complex case, because this is also blocked by Knight Night (Final) - Exit
840 room: Number Hunt 819 room: Number Hunt
841 door: Sevens 820 door: Sevens
842- pos: [1653, 101] 821- pos: [1687, 117]
843 paintings: 822 painting: smile_painting_9
844 - smile_painting_9
845 exits: 823 exits:
846 - smiley_crossroads 824 - smiley_crossroads
847 - smiley_deadend 825 - smiley_deadend
@@ -857,26 +835,23 @@
857- pos: [1711, 140] 835- pos: [1711, 140]
858 entrances: 836 entrances:
859 - undeterred_artistic 837 - undeterred_artistic
860- pos: [1653, 169] 838- pos: [1687, 224]
861 paintings: 839 painting: panda_painting_3
862 - panda_painting_3
863 exits: 840 exits:
864 - panda_tower6 841 - panda_tower6
865 - panda_hallway 842 - panda_hallway
866- pos: [1731, 215] 843- pos: [1731, 215]
867 room: The Artistic (Panda) 844 room: The Artistic (Panda)
868 door: Door to Lattice 845 door: Door to Lattice
869- pos: [1761, 169] 846- pos: [1794, 224]
870 paintings: 847 painting: boxes_painting2
871 - boxes_painting2
872 exits: 848 exits:
873 - lattice_directional 849 - lattice_directional
874- pos: [1785, 161] 850- pos: [1785, 161]
875 room: The Artistic (Lattice) 851 room: The Artistic (Lattice)
876 door: Door to Apple 852 door: Door to Apple
877- pos: [1761, 101] 853- pos: [1794, 117]
878 paintings: 854 painting: cherry_painting3
879 - cherry_painting3
880 exits: 855 exits:
881 - apple_tower6 856 - apple_tower6
882 - apple_directional 857 - apple_directional
@@ -886,50 +861,75 @@
886- pos: [370, 563] 861- pos: [370, 563]
887 room: Number Hunt 862 room: Number Hunt
888 door: Eights 863 door: Eights
889- pos: [411, 685] 864- pos: [637, 605]
890 paintings: 865 painting: eye_painting
891 - eye_painting_2 866 entrances:
892 - smile_painting_2 867 - crossroads_eyewall
868- pos: [610, 605]
869 exits:
870 - crossroads_eyewall
871- pos: [417, 573]
872 painting: eye_painting_2
873 exits:
874 - crossroads_eyewall
875- pos: [342, 573]
876 painting: smile_painting_2
893 entrances: 877 entrances:
894 - smiley_theysee 878 - smiley_theysee
895- pos: [311, 750] 879- pos: [311, 750]
896 room: The Eyes They See 880 room: The Eyes They See
897 door: Exit 881 door: Exit
898- pos: [334, 798] 882- pos: [348, 803]
899 paintings: 883 painting: arrows_painting_5
900 - arrows_painting_5
901- pos: [370, 751] 884- pos: [370, 751]
902 room: Outside The Wondrous 885 room: Outside The Wondrous
903 door: Wondrous Entrance 886 door: Wondrous Entrance
904- pos: [367, 752] 887- pos: [428, 696]
905 paintings: 888 painting: symmetry_painting_a_1
906 - symmetry_painting_a_1
907 - symmetry_painting_b_1
908 - symmetry_painting_a_3
909 - symmetry_painting_a_5
910 - symmetry_painting_b_4
911 - symmetry_painting_a_2
912 - symmetry_painting_b_2
913 - symmetry_painting_a_6
914 - symmetry_painting_b_6
915 exits: 889 exits:
916 - symmetry_starting 890 - symmetry_starting
891 - symmetry_a_chandelier
892 - symmetry_a_table
893- pos: [428, 749]
894 painting: symmetry_painting_b_1
895 entrances:
896 - symmetry_b_table
897- pos: [471, 696]
898 painting: symmetry_painting_a_3
899- pos: [538, 699]
900 painting: symmetry_painting_a_5
901 entrances:
902 - symmetry_a_chandelier
903- pos: [562, 728]
904 painting: symmetry_painting_b_4
905- pos: [422, 647]
906 painting: symmetry_painting_a_2
907 entrances:
908 - symmetry_a_table
909- pos: [364, 648]
910 painting: symmetry_painting_b_2
911 exits:
912 - symmetry_b_table
913 - symmetry_b_fire
914- pos: [449, 647]
915 painting: symmetry_painting_a_6
916- pos: [508, 647]
917 painting: symmetry_painting_b_6
918 entrances:
919 - symmetry_b_fire
917- pos: [558, 665] 920- pos: [558, 665]
918 room: The Wondrous 921 room: The Wondrous
919 door: Exit 922 door: Exit
920- pos: [407, 755] 923- pos: [535, 647]
921 room: The Wondrous 924 room: The Wondrous
922 door: Exit 925 door: Exit
923 paintings: 926 painting: arrows_painting_9
924 - arrows_painting_9 927- pos: [610, 674]
925- pos: [449, 755] 928 painting: flower_painting_6
926 paintings:
927 - flower_painting_6
928 entrances: 929 entrances:
929 - flower_arrow 930 - flower_arrow
930- pos: [1101, 222] 931- pos: [1156, 262]
931 paintings: 932 painting: panda_painting
932 - panda_painting
933 entrances: 933 entrances:
934 - panda_hallway 934 - panda_hallway
935- pos: [1152, 209] 935- pos: [1152, 209]
@@ -950,9 +950,8 @@
950- pos: [1415, 140] 950- pos: [1415, 140]
951 room: Number Hunt 951 room: Number Hunt
952 door: Nines 952 door: Nines
953- pos: [1458, 133] 953- pos: [1424, 85]
954 paintings: 954 painting: south_afar
955 - south_afar
956- pos: [826, 1452] 955- pos: [826, 1452]
957 room: Outside The Wanderer 956 room: Outside The Wanderer
958 door: Wanderer Entrance 957 door: Wanderer Entrance
@@ -979,15 +978,18 @@
979- pos: [1511, 1119] 978- pos: [1511, 1119]
980 room: Art Gallery 979 room: Art Gallery
981 door: Exit 980 door: Exit
982- pos: [1654, 1116] 981- pos: [1730, 1162]
983 paintings: 982 painting: flower_painting_2
984 - smile_painting_3 983- pos: [1730, 1189]
985 - flower_painting_2 984 painting: map_painting
986 - scenery_painting_0a 985- pos: [1698, 1189]
987 - map_painting 986 painting: smile_painting_3
988 - fruitbowl_painting4
989 entrances: 987 entrances:
990 - smiley_gallery 988 - smiley_gallery
989- pos: [1714, 1215]
990 painting: fruitbowl_painting4
991- pos: [1714, 1242]
992 painting: scenery_painting_0a
991- pos: [1120, 1286] 993- pos: [1120, 1286]
992 room: Rhyme Room (Smiley) 994 room: Rhyme Room (Smiley)
993 door: Door to Target 995 door: Door to Target
@@ -1006,9 +1008,8 @@
1006- pos: [1120, 1195] 1008- pos: [1120, 1195]
1007 room: Rhyme Room (Circle) 1009 room: Rhyme Room (Circle)
1008 door: Door to Smiley 1010 door: Door to Smiley
1009- pos: [1118, 1137] 1011- pos: [1130, 1124]
1010 paintings: 1012 painting: arrows_painting_3
1011 - arrows_painting_3
1012- pos: [1050, 1142] 1013- pos: [1050, 1142]
1013 room: Rhyme Room (Looped Square) 1014 room: Rhyme Room (Looped Square)
1014 door: Door to Circle 1015 door: Door to Circle
@@ -1021,24 +1022,21 @@
1021- pos: [852, 1200] 1022- pos: [852, 1200]
1022 room: Rhyme Room (Target) 1023 room: Rhyme Room (Target)
1023 door: Door to Cross 1024 door: Door to Cross
1024- pos: [850, 1138] 1025- pos: [862, 1124]
1025 paintings: 1026 painting: arrows_painting_4
1026 - arrows_painting_4
1027- pos: [1592, 1442] 1027- pos: [1592, 1442]
1028 room: Room Room 1028 room: Room Room
1029 door: Cellar Exit 1029 door: Cellar Exit
1030- pos: [1623, 938] 1030- pos: [1623, 938]
1031 room: Outside The Wise 1031 room: Outside The Wise
1032 door: Wise Entrance 1032 door: Wise Entrance
1033- pos: [1653, 935] 1033- pos: [1665, 920]
1034 paintings: 1034 painting: clock_painting_3
1035 - clock_painting_3
1036- pos: [241, 348] 1035- pos: [241, 348]
1037 room: Outside The Scientific 1036 room: Outside The Scientific
1038 door: Scientific Entrance 1037 door: Scientific Entrance
1039- pos: [294, 602] 1038- pos: [176, 326]
1040 paintings: 1039 painting: hi_solved_painting4
1041 - hi_solved_painting4
1042 entrances: 1040 entrances:
1043 - hi_scientific 1041 - hi_scientific
1044- pos: [815, 1002] 1042- pos: [815, 1002]
diff --git a/src/game_data.cpp b/src/game_data.cpp index 54b25b4..8ccc0da 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp
@@ -778,13 +778,10 @@ struct GameData {
778 subway_it["door"].as<std::string>()); 778 subway_it["door"].as<std::string>());
779 } 779 }
780 780
781 if (subway_it["paintings"]) { 781 if (subway_it["painting"]) {
782 for (const auto &painting_it : subway_it["paintings"]) { 782 std::string painting_id = subway_it["painting"].as<std::string>();
783 std::string painting_id = painting_it.as<std::string>(); 783 subway_item.painting = painting_id;
784 784 subway_item_by_painting_[painting_id] = subway_item.id;
785 subway_item.paintings.push_back(painting_id);
786 subway_item_by_painting_[painting_id] = subway_item.id;
787 }
788 } 785 }
789 786
790 if (subway_it["tags"]) { 787 if (subway_it["tags"]) {
diff --git a/src/game_data.h b/src/game_data.h index b087734..be10900 100644 --- a/src/game_data.h +++ b/src/game_data.h
@@ -157,7 +157,7 @@ struct SubwayItem {
157 int x; 157 int x;
158 int y; 158 int y;
159 std::optional<int> door; 159 std::optional<int> door;
160 std::vector<std::string> paintings; 160 std::optional<std::string> painting;
161 std::vector<std::string> tags; // 2-way teleports 161 std::vector<std::string> tags; // 2-way teleports
162 std::vector<std::string> entrances; // teleport entrances 162 std::vector<std::string> entrances; // teleport entrances
163 std::vector<std::string> exits; // teleport exits 163 std::vector<std::string> exits; // teleport exits
diff --git a/src/subway_map.cpp b/src/subway_map.cpp index 9a35eef..f00f03f 100644 --- a/src/subway_map.cpp +++ b/src/subway_map.cpp
@@ -14,8 +14,23 @@
14 14
15constexpr int AREA_ACTUAL_SIZE = 21; 15constexpr int AREA_ACTUAL_SIZE = 21;
16constexpr int OWL_ACTUAL_SIZE = 32; 16constexpr int OWL_ACTUAL_SIZE = 32;
17constexpr int PAINTING_RADIUS = 9; // the actual circles on the map are radius 11
18constexpr int PAINTING_EXIT_RADIUS = 6;
17 19
18enum class ItemDrawType { kNone, kBox, kOwl }; 20enum class ItemDrawType { kNone, kBox, kOwl, kOwlExit };
21
22namespace {
23
24wxPoint GetSubwayItemMapCenter(const SubwayItem &subway_item) {
25 if (subway_item.painting) {
26 return {subway_item.x, subway_item.y};
27 } else {
28 return {subway_item.x + AREA_ACTUAL_SIZE / 2,
29 subway_item.y + AREA_ACTUAL_SIZE / 2};
30 }
31}
32
33} // namespace
19 34
20SubwayMap::SubwayMap(wxWindow *parent) : wxPanel(parent, wxID_ANY) { 35SubwayMap::SubwayMap(wxWindow *parent) : wxPanel(parent, wxID_ANY) {
21 SetBackgroundStyle(wxBG_STYLE_PAINT); 36 SetBackgroundStyle(wxBG_STYLE_PAINT);
@@ -68,11 +83,11 @@ void SubwayMap::OnConnect() {
68 std::map<std::string, std::vector<int>> exits; 83 std::map<std::string, std::vector<int>> exits;
69 for (const SubwayItem &subway_item : GD_GetSubwayItems()) { 84 for (const SubwayItem &subway_item : GD_GetSubwayItems()) {
70 if (AP_HasEarlyColorHallways() && 85 if (AP_HasEarlyColorHallways() &&
71 subway_item.special == "starting_room_paintings") { 86 subway_item.special == "early_color_hallways") {
72 entrances["early_ch"].push_back(subway_item.id); 87 entrances["early_ch"].push_back(subway_item.id);
73 } 88 }
74 89
75 if (AP_IsPaintingShuffle() && !subway_item.paintings.empty()) { 90 if (AP_IsPaintingShuffle() && subway_item.painting) {
76 continue; 91 continue;
77 } 92 }
78 93
@@ -319,10 +334,8 @@ void SubwayMap::OnPaint(wxPaintEvent &event) {
319 const SubwayItem &item1 = GD_GetSubwayItem(node.entry); 334 const SubwayItem &item1 = GD_GetSubwayItem(node.entry);
320 const SubwayItem &item2 = GD_GetSubwayItem(node.exit); 335 const SubwayItem &item2 = GD_GetSubwayItem(node.exit);
321 336
322 wxPoint item1_pos = MapPosToRenderPos( 337 wxPoint item1_pos = MapPosToRenderPos(GetSubwayItemMapCenter(item1));
323 {item1.x + AREA_ACTUAL_SIZE / 2, item1.y + AREA_ACTUAL_SIZE / 2}); 338 wxPoint item2_pos = MapPosToRenderPos(GetSubwayItemMapCenter(item2));
324 wxPoint item2_pos = MapPosToRenderPos(
325 {item2.x + AREA_ACTUAL_SIZE / 2, item2.y + AREA_ACTUAL_SIZE / 2});
326 339
327 int left = std::min(item1_pos.x, item2_pos.x); 340 int left = std::min(item1_pos.x, item2_pos.x);
328 int top = std::min(item1_pos.y, item2_pos.y); 341 int top = std::min(item1_pos.y, item2_pos.y);
@@ -508,11 +521,12 @@ void SubwayMap::OnClickHelp(wxCommandEvent &event) {
508 "your mouse. Click again to stop.\nHover over a door to see the " 521 "your mouse. Click again to stop.\nHover over a door to see the "
509 "requirements to open it.\nHover over a warp or active painting to see " 522 "requirements to open it.\nHover over a warp or active painting to see "
510 "what it is connected to.\nFor one-way connections, there will be a " 523 "what it is connected to.\nFor one-way connections, there will be a "
511 "circle at the exit.\nIn painting shuffle, paintings that have not " 524 "circle at the exit.\nCircles represent paintings.\nA red circle means "
512 "yet been checked will not show their connections.\nA green shaded owl " 525 "that the painting is locked by a door.\nA blue circle means painting "
513 "means that there is a painting entrance there.\nA red shaded owl means " 526 "shuffle is enabled and the painting has not been checked yet.\nA black "
514 "that there are only painting exits there.\nClick on a door or " 527 "circle means the painting is not a warp.\nA green circle means that the "
515 "warp to make the popup stick until you click again.", 528 "painting is a warp.\nPainting exits will be indicated with an X.\nClick "
529 "on a door or warp to make the popup stick until you click again.",
516 "Subway Map Help"); 530 "Subway Map Help");
517} 531}
518 532
@@ -529,20 +543,20 @@ void SubwayMap::Redraw() {
529 for (const SubwayItem &subway_item : GD_GetSubwayItems()) { 543 for (const SubwayItem &subway_item : GD_GetSubwayItems()) {
530 ItemDrawType draw_type = ItemDrawType::kNone; 544 ItemDrawType draw_type = ItemDrawType::kNone;
531 const wxBrush *brush_color = wxGREY_BRUSH; 545 const wxBrush *brush_color = wxGREY_BRUSH;
532 std::optional<wxColour> shade_color;
533 std::optional<int> subway_door = GetRealSubwayDoor(subway_item); 546 std::optional<int> subway_door = GetRealSubwayDoor(subway_item);
534 547
535 if (AP_HasEarlyColorHallways() && 548 if (AP_HasEarlyColorHallways() &&
536 subway_item.special == "starting_room_paintings") { 549 subway_item.special == "early_color_hallways") {
537 draw_type = ItemDrawType::kOwl; 550 draw_type = ItemDrawType::kOwl;
538 shade_color = wxColour(0, 255, 0, 128); 551 brush_color = wxGREEN_BRUSH;
552 } else if (subway_item.special == "starting_room_overhead") {
553 // Do not draw.
539 } else if (subway_item.special == "sun_painting") { 554 } else if (subway_item.special == "sun_painting") {
540 if (!AP_IsPilgrimageEnabled()) { 555 if (!AP_IsPilgrimageEnabled()) {
556 draw_type = ItemDrawType::kOwl;
541 if (IsDoorOpen(*subway_item.door)) { 557 if (IsDoorOpen(*subway_item.door)) {
542 draw_type = ItemDrawType::kOwl; 558 brush_color = wxGREEN_BRUSH;
543 shade_color = wxColour(0, 255, 0, 128);
544 } else { 559 } else {
545 draw_type = ItemDrawType::kBox;
546 brush_color = wxRED_BRUSH; 560 brush_color = wxRED_BRUSH;
547 } 561 }
548 } 562 }
@@ -556,41 +570,28 @@ void SubwayMap::Redraw() {
556 } else { 570 } else {
557 brush_color = wxRED_BRUSH; 571 brush_color = wxRED_BRUSH;
558 } 572 }
559 } else if (!subway_item.paintings.empty()) { 573 } else if (subway_item.painting) {
560 if (AP_IsPaintingShuffle()) { 574 if (subway_door && !IsDoorOpen(*subway_door)) {
561 bool has_checked_painting = false; 575 draw_type = ItemDrawType::kOwl;
562 bool has_unchecked_painting = false; 576 brush_color = wxRED_BRUSH;
563 bool has_mapped_painting = false; 577 } else if (AP_IsPaintingShuffle()) {
564 bool has_codomain_painting = false; 578 if (!checked_paintings_.count(*subway_item.painting)) {
565
566 for (const std::string &painting_id : subway_item.paintings) {
567 if (checked_paintings_.count(painting_id)) {
568 has_checked_painting = true;
569
570 if (painting_mapping.count(painting_id)) {
571 has_mapped_painting = true;
572 } else if (AP_IsPaintingMappedTo(painting_id)) {
573 has_codomain_painting = true;
574 }
575 } else {
576 has_unchecked_painting = true;
577 }
578 }
579
580 if (has_unchecked_painting || has_mapped_painting ||
581 has_codomain_painting) {
582 draw_type = ItemDrawType::kOwl; 579 draw_type = ItemDrawType::kOwl;
583 580 brush_color = wxBLUE_BRUSH;
584 if (has_checked_painting) { 581 } else if (painting_mapping.count(*subway_item.painting)) {
585 if (has_mapped_painting) { 582 draw_type = ItemDrawType::kOwl;
586 shade_color = wxColour(0, 255, 0, 128); 583 brush_color = wxGREEN_BRUSH;
587 } else { 584 } else if (AP_IsPaintingMappedTo(*subway_item.painting)) {
588 shade_color = wxColour(255, 0, 0, 128); 585 draw_type = ItemDrawType::kOwlExit;
589 } 586 brush_color = wxGREEN_BRUSH;
590 }
591 } 587 }
592 } else if (subway_item.HasWarps()) { 588 } else if (subway_item.HasWarps()) {
593 draw_type = ItemDrawType::kOwl; 589 brush_color = wxGREEN_BRUSH;
590 if (!subway_item.exits.empty()) {
591 draw_type = ItemDrawType::kOwlExit;
592 } else {
593 draw_type = ItemDrawType::kOwl;
594 }
594 } 595 }
595 } else if (subway_door) { 596 } else if (subway_door) {
596 draw_type = ItemDrawType::kBox; 597 draw_type = ItemDrawType::kBox;
@@ -611,14 +612,20 @@ void SubwayMap::Redraw() {
611 gcdc.SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1)); 612 gcdc.SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1));
612 gcdc.SetBrush(*brush_color); 613 gcdc.SetBrush(*brush_color);
613 gcdc.DrawRectangle(real_area_pos, {real_area_size, real_area_size}); 614 gcdc.DrawRectangle(real_area_pos, {real_area_size, real_area_size});
614 } else if (draw_type == ItemDrawType::kOwl) { 615 } else if (draw_type == ItemDrawType::kOwl || draw_type == ItemDrawType::kOwlExit) {
615 wxBitmap owl_bitmap = wxBitmap(owl_image_.Scale( 616 gcdc.SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1));
616 real_area_size, real_area_size, wxIMAGE_QUALITY_BILINEAR)); 617 gcdc.SetBrush(*brush_color);
617 gcdc.DrawBitmap(owl_bitmap, real_area_pos); 618 gcdc.DrawCircle(real_area_pos, PAINTING_RADIUS);
618 619
619 if (shade_color) { 620 if (draw_type == ItemDrawType::kOwlExit) {
620 gcdc.SetBrush(wxBrush(*shade_color)); 621 gcdc.DrawLine(subway_item.x - PAINTING_EXIT_RADIUS,
621 gcdc.DrawRectangle(real_area_pos, {real_area_size, real_area_size}); 622 subway_item.y - PAINTING_EXIT_RADIUS,
623 subway_item.x + PAINTING_EXIT_RADIUS,
624 subway_item.y + PAINTING_EXIT_RADIUS);
625 gcdc.DrawLine(subway_item.x + PAINTING_EXIT_RADIUS,
626 subway_item.y - PAINTING_EXIT_RADIUS,
627 subway_item.x - PAINTING_EXIT_RADIUS,
628 subway_item.y + PAINTING_EXIT_RADIUS);
622 } 629 }
623 } 630 }
624 } 631 }
@@ -796,6 +803,13 @@ std::optional<int> SubwayMap::GetRealSubwayDoor(const SubwayItem subway_item) {
796 803
797quadtree::Box<float> SubwayMap::GetItemBox::operator()(const int &id) const { 804quadtree::Box<float> SubwayMap::GetItemBox::operator()(const int &id) const {
798 const SubwayItem &subway_item = GD_GetSubwayItem(id); 805 const SubwayItem &subway_item = GD_GetSubwayItem(id);
799 return {static_cast<float>(subway_item.x), static_cast<float>(subway_item.y), 806 if (subway_item.painting) {
800 AREA_ACTUAL_SIZE, AREA_ACTUAL_SIZE}; 807 return {static_cast<float>(subway_item.x) - PAINTING_RADIUS,
808 static_cast<float>(subway_item.y) - PAINTING_RADIUS,
809 PAINTING_RADIUS * 2, PAINTING_RADIUS * 2};
810 } else {
811 return {static_cast<float>(subway_item.x),
812 static_cast<float>(subway_item.y), AREA_ACTUAL_SIZE,
813 AREA_ACTUAL_SIZE};
814 }
801} 815}